[PATCH] D93716: [LoopDeletion] Also consider loops with subloops for deletion.
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 22 12:37:52 PST 2020
reames added a comment.
LGTM
Reading through the code, I had a couple of separate thoughts. If you're interested, feel free to follow up on these. If not, feel free to disregard.
1. It's not clear to my why the unreachable loop case requires an exit block. That seems like an overly strict check for the transformation.
2. I was surprised we didn't break the backedge of loops with exit count == 0. This isn't strictly loop deletion, but it sure seems analogous. We seem to rely on simplifycfg for this today which seems likely to cause pass ordering problems.
3. Extending the invariant case to handle multiple exits where all but one are trivially dead might be useful. (IndVarSimplify likes to produce exactly that form. Again, we rely on simplifycfg for cleanup before loop deletion and thus pass ordering is an issue.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93716/new/
https://reviews.llvm.org/D93716
More information about the llvm-commits
mailing list