[PATCH] D135808: [LoopInterchange] Correcting the profitability checking for vectorization
Bardia Mahjour via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 2 07:54:27 PDT 2022
bmahjour added a comment.
This looks better now, but the problem of "endless interchange" is still not addressed. Per discussion in the loop opt call, we should only use CacheCost when it was able to calculate a valid cost and the loops can be sorted based on "strictly less than" ordering relationship. Only when CacheCost result is indeterminate (eg. two loops have equal cost) or when it is unable to calculate the cost (eg. due to delinearization issues), we should fall back to the `isProfitableForVectorization()` function.
================
Comment at: llvm/lib/Transforms/Scalar/LoopInterchange.cpp:1122
+ return false;
+ // If the outer loop is not loop independent it is not not profitable to move this
+ // to inner position, since doing so would not enable inner loop parallelism.
----------------
not not -> not
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135808/new/
https://reviews.llvm.org/D135808
More information about the llvm-commits
mailing list