[PATCH] D100121: [LV] Let selectVectorizationFactor reason directly on VectorizationFactor.

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 12 08:15:26 PDT 2021


sdesmalen added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h:203
+  // Returns true if this VectorizationFactor is more profitable than \p rhs.
+  bool isMoreProfitableThan(const VectorizationFactor &rhs) const {
+    InstructionCost::CostType ThisCost = *Cost.getValue();
----------------
dmgreen wrote:
> rhs -> RHS
> 
> If the backend knew that the SVE vector length was 256, as opposed 128, how would it best communicate that information to here?
Doing it here without context would be a bit difficult, as it needs information from CostModel/TargetTransformInfo in order to know which one to favour. Hence my reason to initially create this method in the LV CostModel (see the previous revision https://reviews.llvm.org/D100121?id=336138), so it would mean either passing that information separately, or moving it to the other class again.


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