[PATCH] D103382: [LoopDeletion] Consider infinite loops alive, unless mustprogress.
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun May 30 09:19:44 PDT 2021
nikic added a comment.
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?
================
Comment at: llvm/lib/Transforms/Scalar/LoopDeletion.cpp:118
+ };
+ return LoopFinite(L) && all_of(*L, LoopFinite);
}
----------------
Just to double check, subloops also includes recursive subloops, right?
================
Comment at: llvm/test/Transforms/LoopDeletion/noop-loops-with-subloops.ll:217
; as mustprogress. The loops can be removed.
define void @inner_loop_may_be_infinite_but_top_loop_mustprogress(i1 %c1, i1 %c2) mustprogress {
; CHECK-LABEL: @inner_loop_may_be_infinite_but_top_loop_mustprogress(
----------------
This is probably not checking what you want, because you also have the `mustprogress` function attribute, next to the loop metadata.
================
Comment at: llvm/test/Transforms/LoopDeletion/noop-loops-with-subloops.ll:298
loop3:
br i1 %c2, label %loop1.latch, label %loop3
----------------
You probably meant to use `%c3` here.
================
Comment at: llvm/test/Transforms/LoopDeletion/unreachable-loops.ll:339
; REMARKS-LABEL: Function: test9
; REMARKS: Loop deleted because it never executes
entry:
----------------
This remark shouldn't be there anymore ... possibly matches a future remark?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103382/new/
https://reviews.llvm.org/D103382
More information about the llvm-commits
mailing list