[PATCH] D86974: [IRSim] Adding basic implementation of llvm-sim.

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 16 09:50:42 PDT 2020


vsk added inline comments.


================
Comment at: llvm/tools/llvm-sim/llvm-sim.cpp:134
+      for (Instruction &I : BB)
+        LLVMInstNum.insert(std::make_pair(&I, InstructionNumber++));
+
----------------
Very minor nit -- any reason not to prefer a shorter way to write this, maybe 'map[&I] = Num++' or 'map.emplace(&I, Num++)' if it's necessary to avoid default-constructing a DenseMapPair?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86974/new/

https://reviews.llvm.org/D86974



More information about the llvm-commits mailing list