[PATCH] D42180: [NewGVN] Re-evaluate phi of ops if expr operands change.

Daniel Berlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 17 08:06:06 PST 2018


dberlin added a comment.

This is definitely not right, unfortunately.

This is already taken care of by code below:
 // When these operand changes, it could change whether there is a

  // leader for us or not, so we have to add additional users.
  if (isa<PHINode>(Op)) {
    Op = Op->DoPHITranslation(PHIBlock, PredBB);
    if (Op != OrigOp && Op != I)
      Deps.insert(Op);
  } else if (auto *ValuePHI = RealToTemp.lookup(Op)) {
    if (getBlockForValue(ValuePHI) == PHIBlock)
      Op = ValuePHI->getIncomingValueForBlock(PredBB);
  }

By the end of this loop, Deps should contain the set of operands we depend on.


Repository:
  rL LLVM

https://reviews.llvm.org/D42180





More information about the llvm-commits mailing list