[llvm] [DependenceAnalysis] Extending SIV to handle separate loops (PR #128782)

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 2 03:58:49 PDT 2025


================
@@ -172,21 +196,31 @@ namespace llvm {
     virtual bool normalize(ScalarEvolution *SE) { return false; }
 
     /// isPeelFirst - Returns true if peeling the first iteration from
-    /// this loop will break this dependence.
-    virtual bool isPeelFirst(unsigned Level) const { return false; }
+    /// this regular or separate loop level will break this dependence.
+    virtual bool isPeelFirst(unsigned Level, bool Separate = false) const {
+      return false;
+    }
 
     /// isPeelLast - Returns true if peeling the last iteration from
-    /// this loop will break this dependence.
-    virtual bool isPeelLast(unsigned Level) const { return false; }
+    /// this regular or separate loop level will break this dependence.
+    virtual bool isPeelLast(unsigned Level, bool Separate = false) const {
+      return false;
+    }
 
-    /// isSplitable - Returns true if splitting this loop will break
+    /// isSplitable - Returns true if splitting the loop will break
     /// the dependence.
-    virtual bool isSplitable(unsigned Level) const { return false; }
+    virtual bool isSplitable(unsigned Level, bool Separate = false) const {
+      return false;
+    }
+
+    /// inSeparateLoops - Returns true if this level is a separate level, i.e.,
+    /// performed across two separate loop nests.
----------------
Meinersbur wrote:

```suggestion
    /// performed across two separate loop nests that a treated like a single fused loop.
```

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


More information about the llvm-commits mailing list