[llvm] [LoopInterchange] Exit early in certain cases in legality check (NFC) (PR #139254)

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Mon May 12 05:28:54 PDT 2025


================
@@ -231,18 +231,22 @@ static void interChangeDependencies(CharMatrix &DepMatrix, unsigned FromIndx,
     std::swap(DepMatrix[I][ToIndx], DepMatrix[I][FromIndx]);
 }
 
-// After interchanging, check if the direction vector is valid.
+// Check if a direction vector is lexicographically positive. Return true if it
+// is positive, nullopt if it is "zero", othrewise false.
----------------
Meinersbur wrote:

```suggestion
// is positive, nullopt if it is "zero", otherwise false.
```

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


More information about the llvm-commits mailing list