[llvm] [LoopInterchange] Increment isDirectionNegative check to next level for scalar direction (PR #78951)

Bardia Mahjour via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 23 06:49:50 PST 2024


https://github.com/bmahjour requested changes to this pull request.

Skipping the scalar direction is incorrect. Scalar dependencies get carried from every iteration to every iteration, so they **must** be treated more conservatively than a `=` dependence. 

I think this problem should be solved in the loop interchange pass itself where if the candidate pair of loops is nested inside other loops, and those outer loop IVs don't contribute to the index calculations in the pair of loops, then the dependence entries corresponding to the outer loops should be ignored.

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


More information about the llvm-commits mailing list