[PATCH] D135808: [LoopInterchange] Correcting the profitability checking for vectorization
Congzhe Cao via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 17 11:33:55 PDT 2022
congzhe added a comment.
In D135808#3861367 <https://reviews.llvm.org/D135808#3861367>, @ram-NK wrote:
> If outer loop dependency direction "=" and Inner loop dependency direction is "S" and "I" then, loop interchange is considered as profitable. Only two cases of dependency is profitable. But for vectorization, ">" and "<" dependency in outer loop is more profitable when interchanged. After patch [=,<] and [=,>] will be interchanged for vectorization.
I thought what you meant is that after this patch, `[<, =]` and `[>, =]` (not [=,<] and [=,>]) will be interchanged? Because after interchange the dependency vector would become `[=, <]` and `[=, >]` respectively, which could improve potential parallelization and enable finer-grained parallelism, i.e., outer loop parallelism instead of inner loop parallelism. I think this is what `isProfitableForVectorization()` is supposed to be.
I wonder if it makes sense to you @bmahjour ?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135808/new/
https://reviews.llvm.org/D135808
More information about the llvm-commits
mailing list