[PATCH] D89378: [LoopFlatten] Loop limit invariant checks

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 10 12:16:17 PST 2021


fhahn requested changes to this revision.
fhahn added a comment.
This revision now requires changes to proceed.

(marking as changes requested to clear up review queue as there are outstanding comments)



================
Comment at: llvm/lib/Transforms/Scalar/LoopFlatten.cpp:431
   // Both of the loop limit values must be invariant in the outer loop
   // (non-instructions are all inherently invariant).
+  bool Changed;
----------------
Update the comment saying we try to make it invariant?


================
Comment at: llvm/lib/Transforms/Scalar/LoopFlatten.cpp:432
   // (non-instructions are all inherently invariant).
-  if (!OuterLoop->isLoopInvariant(InnerLimit)) {
+  bool Changed;
+  if (!OuterLoop->makeLoopInvariant(InnerLimit, Changed)) {
----------------
does this need to be initialized? I think there might be some code paths in `makeLoopInvariant` that do not set `Changed`.


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

https://reviews.llvm.org/D89378



More information about the llvm-commits mailing list