[PATCH] D94378: [LoopDeletion] Handle inner loops w/untaken backedges
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 22 14:08:28 PST 2021
fhahn accepted this revision.
fhahn added a comment.
This revision is now accepted and ready to land.
Herald added a reviewer: bollu.
LGTM, thanks!
================
Comment at: llvm/lib/Transforms/Utils/LoopUtils.cpp:805
+ // loop which might have a had a block removed.
+ if (OutermostLoop != L)
+ formLCSSARecursively(*OutermostLoop, DT, &LI, &SE);
----------------
reames wrote:
> fhahn wrote:
> > From the arguments, it seems like `changeToUnreachable` at least tries to preserve LCSSA, but clearly misses the case at hand. I've not looked at the details on what exactly needs updating Do you think it would be possible to directly fix the values broken after removing the block?
> We're introducing a whole new set of exit blocks which used to be inside the loop. We either have to scan all defs in the loop (which this does), or all uses in the blocks removed from the loop. Is the later any better than the former? The former has the benefit that we can reuse existing code. (Remember we have to do this for all loop levels, so it's slightly tricky.)
> Is the later any better than the former?
I have no idea. Let's use the existing infrastructure and take another look if there are any issues reported.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94378/new/
https://reviews.llvm.org/D94378
More information about the llvm-commits
mailing list