[PATCH] D41812: [CVP] Replace incoming values from unreachable blocks with undef
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 23 13:02:44 PST 2018
efriedma added inline comments.
================
Comment at: llvm/trunk/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp:336
// by a branch then do so now.
ConstantFoldTerminator(BB);
----------------
davide wrote:
> efriedma wrote:
> > This call invalidates the set of reachable blocks.
> hmmm, this is annoying.
> I can't think of an easy way of handling this case easily. Do you have something in your mind?
> If not, I'll revert the patch for now until I come up with a better idea.
> cc: @anna
Maybe you could use an incrementally updated domtree to keep ReachableBlocks up-to-date? Not sure how expensive that would be, though.
Alternatively, you could record dead edges, and postpone actually modifying the CFG until the end of the pass. You lose a little optimization power that way, I guess, but it avoids any complicated incremental updates.
Repository:
rL LLVM
https://reviews.llvm.org/D41812
More information about the llvm-commits
mailing list