[PATCH] D137461: [LoopInterchange] Refactor and rewrite validDepInterchange()

Bardia Mahjour via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 16 11:35:01 PST 2022


bmahjour added a comment.

> Think of the * being in another function that calls a function containing the < < loops.

I agree we can think of it that way in the case of S dependencies (eg. where the outer loop IVs are not used in the subscripts of the memory access), but I'd worry about the possibility that confused direction in the outermost level might have been caused by use of outer loop IVs in combination with inner loop IVs. For example, in the following scenario we cannot think of the two inner loops being in another function unless we pass in the IV of the outer loop as parameter to that function. That will almost certainly change the way DA computes dependencies and will likely result in different direction entries for the two inner loops.

  for (i)
    for (j)
     for (k)
      ... A[i, j, k+i]


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137461/new/

https://reviews.llvm.org/D137461



More information about the llvm-commits mailing list