[llvm] [LoopInterchange] Bail out for Scalar Dependencies (PR #119345)

Ryotaro Kasuga via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 10 23:10:50 PST 2024


================
@@ -187,11 +187,19 @@ static void interChangeDependencies(CharMatrix &DepMatrix, unsigned FromIndx,
 // if the direction matrix, after the same permutation is applied to its
 // columns, has no ">" direction as the leftmost non-"=" direction in any row.
 static bool isLexicographicallyPositive(std::vector<char> &DV) {
+  bool HasScalar = false;
+  bool FirstPosScalar = true;
----------------
kasuga-fj wrote:

I don't fully understand what `FirstPosScalar` means. This legality check seems to allow the permutation of `[S <]` to `[< S]`. Is this transformation legal? Or can such a case not happen? I tried some loops that have a row of `[S <]`, and as far as these cases, the legality check rejects the interchange because of another row like `[S =]`.

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


More information about the llvm-commits mailing list