[PATCH] D32990: [NewGVN] Take in account incoming edges computing congruent PhiExpression(s)
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 9 11:38:23 PDT 2017
efriedma 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);
+ });
----------------
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.
Repository:
rL LLVM
https://reviews.llvm.org/D32990
More information about the llvm-commits
mailing list