[PATCH] D42180: [NewGVN] Add ops as dependency if we cannot find a leader for ValueOp.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 7 09:28:46 PST 2018


fhahn updated this revision to Diff 137415.
fhahn retitled this revision from "[NewGVN] Re-evaluate phi of ops if expr operands change. " to "[NewGVN] Add ops as dependency if we cannot find a leader for ValueOp.".
fhahn edited the summary of this revision.
fhahn added a comment.

Updated to add additional users for the translated operands of the current ValueOp, if we cannot find a leader for the ValueOp.

If those operands change, we might find a leader for ValueOp, which
could enable new phi-of-op creation.

This fixes a case where we missed creating a phi-of-ops node. With
this patch, bootstrapping clang/llvm works with -enable-newgvn, whereas
without it, the "value changed after iteration" assertion is triggered.

This is based on @dberlin's patch shared for https://reviews.llvm.org/D43865, because it is
slightly clearer what's going on, but it does not really depend on it.


https://reviews.llvm.org/D42180

Files:
  lib/Transforms/Scalar/NewGVN.cpp
  test/Transforms/NewGVN/pr35074.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42180.137415.patch
Type: text/x-patch
Size: 4606 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180307/4333bd65/attachment.bin>


More information about the llvm-commits mailing list