This follows on from discussion on the mailing-list:
https://lists.llvm.org/pipermail/llvm-dev/2021-June/151047.html
to interpret an Invalid cost as 'infinitely expensive', as this
simplifies some of the legalization issues with scalable vectors.
Paths
| Differential D105473
[LV] Ignore candidate VFs with invalid costs. ClosedPublic Authored by sdesmalen on Jul 6 2021, 5:01 AM.
Details Summary This follows on from discussion on the mailing-list: https://lists.llvm.org/pipermail/llvm-dev/2021-June/151047.html to interpret an Invalid cost as 'infinitely expensive', as this
Diff Detail
Unit TestsFailed Event Timeline
Comment Actions Removed stale comment.
sdesmalen marked 4 inline comments as done. Comment ActionsSplit out the code to emit remarks, so we can add this in a separate patch.
Comment Actions Thanks. This looks good to me minus one nit about having selectUserVectorizationFactor return the success/failure directly.
sdesmalen marked an inline comment as done. Comment ActionsChanged selectUserVectorizationFactor to return a bool to indicate if the UserVF is feasible. Comment Actions Thanks, this LGTM. I would remove hasInvalidCosts and use expectedCost directly, but that's up to you. This revision is now accepted and ready to land.Jul 9 2021, 9:39 AM This revision was landed with ongoing or failed builds.Jul 12 2021, 1:59 AM Closed by commit rGd2e4ccc79023: [LV] Ignore candidate VFs with invalid costs. (authored by sdesmalen). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 357212 llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/AArch64/scalable-call.ll
|
There's only one use of hasInvalidCosts, and it doesn't use Invalid. Is it worth just using expectedCost directly?