[PATCH] D100121: [LV] Let selectVectorizationFactor reason directly on VectorizationFactor.
Sander de Smalen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 8 13:04:37 PDT 2021
sdesmalen added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:1607
+ /// that of B.
+ bool isMoreProfitable(const VectorizationFactor &A,
+ const VectorizationFactor &B) const;
----------------
bmahjour wrote:
> I think this should become a member of the `VectorizationFactor` struct....then code like `A.isMoreProfitableThan(B)` reads better.
I'm happy to implement your suggestion, although I think in the future a `LoopVectorizationCostModel::isMoreProfitable` method will be needed anyway, so that the method can query the LoopHints to understand how to interpret the costs of a scalable VF, and possibly favour it over fixed-width VFs of similar cost. But perhaps that's just something to worry about in a future patch?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100121/new/
https://reviews.llvm.org/D100121
More information about the llvm-commits
mailing list