[PATCH] D118590: [DFAJumpThreading] make update order deterministic

Alexey Zhikhartsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 31 11:11:14 PST 2022


alexey.zhikhar added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/DFAJumpThreading.cpp:1129
   void updateDefMap(DefMap &NewDefs, ValueToValueMapTy &VMap) {
+    std::vector<std::pair<Instruction *, Instruction *>> NewDefsVector;
+    NewDefsVector.reserve(VMap.size());
----------------
Please use `SmallVector` instead of the STL vector.


================
Comment at: llvm/lib/Transforms/Scalar/DFAJumpThreading.cpp:1150
+      auto [Instr1, Cloned1] = KV1;
+      auto [Instr2, Cloned2] = KV2;
+      if (Instr1 == Instr2)
----------------
Structured binding is a C++17 feature and as far as I know LLVM is still C++14

https://llvm.org/docs/CodingStandards.html#c-standard-versions


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118590



More information about the llvm-commits mailing list