[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:44:14 PDT 2021


fhahn marked 2 inline comments as done.
fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/LoopDeletion.cpp:118
+  };
+  return LoopFinite(L) && all_of(*L, LoopFinite);
 }
----------------
nikic wrote:
> Just to double check, subloops also includes recursive subloops, right?
I initially thought that all cases should be covered by the tests, but we need to visit all sub-loops recursively. I updated the code. Relevant additional tests in 5c9fe816e3b6


================
Comment at: llvm/test/Transforms/LoopDeletion/unreachable-loops.ll:339
 ; REMARKS-LABEL: Function: test9
 ; REMARKS: Loop deleted because it never executes
 entry:
----------------
nikic wrote:
> This remark shouldn't be there anymore ... possibly matches a future remark?
I think there's still a loop removed (`L2`), as the comment indicates.


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