[PATCH] D91532: [NFC][CostModel]Extend class IntrinsicCostAttributes to use ElementCount Type

Caroline via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 18 05:29:08 PST 2020


CarolineConcatto added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:1151
 
-    unsigned VF = ICA.getVectorFactor();
+    unsigned VF = ICA.getVectorFactor().getKnownMinValue();
     unsigned RetVF =
----------------
sdesmalen wrote:
> Can you also change `unsigned VF` and `unsigned RetVF` to be of type `ElementCount`?
> From what I can see, the changes required for that are quite mechanical, as long as you 'stop' at `getOperandsScalarizationOverhead`, because that seems like an interface change for another patch.
Thank you Sander.
I've replaced RetVF and VF by ElementCount.
I am using isScalar() where before we had comparing equal to 1 because I imagine that VF will not use a scalable vector  (line 1148)  and RetVF is not a vector when RetTy->isVectorTy() is false  (line 1152).
Like you said I leave getOperandsScalarizationOverhead still using unsigned. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91532/new/

https://reviews.llvm.org/D91532



More information about the llvm-commits mailing list