[PATCH] D32990: [NewGVN] Take in account incoming edges computing congruent PhiExpression(s)

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 9 11:43:03 PDT 2017


davide added inline comments.


================
Comment at: llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp:742
+            [&](const Use *U1, const Use *U2) {
+              return PN->getIncomingBlock(*U1) < PN->getIncomingBlock(*U2);
+            });
----------------
efriedma wrote:
> davide wrote:
> > efriedma wrote:
> > > Is there any possibility that sorting by pointer values here will give non-deterministic output?  If there isn't, please add a comment explaining why.
> > I thought about this when writing the patch, and I think the answer is no (but I'm nervous when it comes to ordering based on pointers given I tracked down several non-determinism bugs because of these).
> > As far as I can tell, we don't actually rely on the ordering for anything significant, e.g. we don't create new instructions based on that ordering.
> > Does this make sense? If so, I'll add a comment. (and thanks for your feedback).
> Yes, that makes sense.
r302566. Thanks.


Repository:
  rL LLVM

https://reviews.llvm.org/D32990





More information about the llvm-commits mailing list