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

Ryotaro Kasuga via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 9 05:41:27 PDT 2025


================
@@ -669,41 +687,12 @@ void Dependence::dump(raw_ostream &OS) const {
       OS << "anti";
     else if (isInput())
       OS << "input";
-    unsigned Levels = getLevels();
-    OS << " [";
-    for (unsigned II = 1; II <= Levels; ++II) {
-      if (isSplitable(II))
-        Splitable = true;
-      if (isPeelFirst(II))
-        OS << 'p';
-      const SCEV *Distance = getDistance(II);
-      if (Distance)
-        OS << *Distance;
-      else if (isScalar(II))
-        OS << "S";
-      else {
-        unsigned Direction = getDirection(II);
-        if (Direction == DVEntry::ALL)
-          OS << "*";
-        else {
-          if (Direction & DVEntry::LT)
-            OS << "<";
-          if (Direction & DVEntry::EQ)
-            OS << "=";
-          if (Direction & DVEntry::GT)
-            OS << ">";
-        }
-      }
-      if (isPeelLast(II))
-        OS << 'p';
-      if (II < Levels)
-        OS << " ";
+    dumpImp(OS);
+    unsigned SameSDLevels = getSameSDLevels();
+    if (SameSDLevels > 0) {
+      OS << "! / assuming " << SameSDLevels << " loop level(s) fused: ";
----------------
kasuga-fj wrote:

It's better to break the line before printing this, due to FileCheck's behavior. I noticed that the output change in PreliminaryNoValidityCheckFixedSize.ll is now being missed.

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


More information about the llvm-commits mailing list