[PATCH] D103382: [LoopDeletion] Consider infinite loops alive, unless mustprogress.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 31 12:40:59 PDT 2021


fhahn updated this revision to Diff 348855.
fhahn added a comment.

Updated to visit all sub-loops, after adding additional tests in 5c9fe816e3b6 <https://reviews.llvm.org/rG5c9fe816e3b6b9cdbf75758f2744a45f97c489f0>. That commit should also addresses the other test-specific comments.

In D103382#2788736 <https://reviews.llvm.org/D103382#2788736>, @nikic wrote:

> This looks okay with one caveat: We could still have an irreducible inner cycle, which will not be represented in LoopInfo. Any thoughts on what to do about that?

Ah yes, I forgot to mentioned that in the description. Irreducible cycles have never been handled properly in loop-deletion, so I think it would make sense to fix that separately. I don't think there's much we can do other than bailing out on functions that contain irreducible control-flow for now. To do that in loop passes we might need a better way to cache the result of the analysis.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103382/new/

https://reviews.llvm.org/D103382

Files:
  llvm/lib/Transforms/Scalar/LoopDeletion.cpp
  llvm/test/Transforms/LoopDeletion/noop-loops-with-subloops.ll
  llvm/test/Transforms/LoopDeletion/unreachable-loops.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103382.348855.patch
Type: text/x-patch
Size: 6815 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210531/d69e2194/attachment.bin>


More information about the llvm-commits mailing list