[llvm] [LoopInterchange] Relax the legality check to accept more patterns (PR #118267)
Ryotaro Kasuga via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 9 22:11:54 PST 2024
kasuga-fj wrote:
I think the easiest way is to check the depth of each of the two loops in the original code. If the depth of `OuterLoopId` is greater than `InnerLoopId`, it means that these loops have already been interchanged. However, it seems that the profitability checks have a "hierarchy". That is, if respecting the current implementation, the decision made by `isProfitablePerLoopCacheAnalysis` should take precedence over that of `isProfitablePerIntsrOrderCost`. So it might not be that simple.
What do you think?
https://github.com/llvm/llvm-project/pull/118267
More information about the llvm-commits
mailing list