[llvm] [LoopInterchange] Constrain LI within supported loop nest depth (PR #118656)

Madhur Amilkanthwar via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 21 00:13:34 PST 2025


================
@@ -239,10 +242,12 @@ static void populateWorklist(Loop &L, LoopVector &LoopList) {
   LoopList.push_back(CurrentLoop);
 }
 
-static bool hasMinimumLoopDepth(SmallVectorImpl<Loop *> &LoopList) {
+static bool hasSupportedLoopDepth(SmallVectorImpl<Loop *> &LoopList) {
   unsigned LoopNestDepth = LoopList.size();
-  if (LoopNestDepth < 2) {
-    LLVM_DEBUG(dbgs() << "Loop doesn't contain minimum nesting level.\n");
+  if (LoopNestDepth < MinLoopNestDepth || LoopNestDepth > MaxLoopNestDepth) {
----------------
madhur13490 wrote:

Done

https://github.com/llvm/llvm-project/pull/118656


More information about the llvm-commits mailing list