[PATCH] D26391: [JumpThreading] Unfold selects that depend on the same condition

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 8 12:02:24 PST 2016


efriedma added inline comments.


================
Comment at: llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp:2053
+      std::sort(Selects.begin(), Selects.end());
+      auto NewEnd = std::unique(Selects.begin(), Selects.end());
+
----------------
efriedma wrote:
> This needs a large comment explaining why sorting by pointer addresses doesn't introduce non-determinism.
Actually, thinking about it a bit more, I'm 99% sure this does introduce non-determinism, at least in the ordering of use-lists.  Could you use a SetVector here instead?


Repository:
  rL LLVM

https://reviews.llvm.org/D26391





More information about the llvm-commits mailing list