[PATCH] D94717: [LoopNest] Consider loop nest with inner loop guard using outer loop induction variable to be perfect
Bardia Mahjour via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 28 13:19:21 PDT 2021
bmahjour requested changes to this revision.
bmahjour added inline comments.
This revision now requires changes to proceed.
================
Comment at: llvm/lib/Analysis/LoopInfo.cpp:408
+ return GuardBI;
+ } while ((USBB = USBB->getUniqueSuccessor()));
+
----------------
apart from checking that the control flow can be simplified, we also need to check to make sure that the chain of BBs don't contain unsafe instructions (or at least check that they are empty).
================
Comment at: llvm/test/Analysis/LoopNestAnalysis/imperfectnest.ll:428
-
-; Test an imperfect loop nest of the form:
-; for (int i = 0; i < nx; ++i)
----------------
Whitney wrote:
> This test case should be considered as imperfect, as the user branch is not the inner loop guard.
the user branch is behaving as a guard so we can allow it per the current definition of a loop guard.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94717/new/
https://reviews.llvm.org/D94717
More information about the llvm-commits
mailing list