[PATCH] D76956: [TTI][SLP] Add TTI interface to estimate cost of chain of vector inserts/extracts.
Valeriy Dmitriev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 9 10:26:59 PDT 2020
vdmitrie added inline comments.
================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfo.h:676
+ /// are set if the result needs to be inserted and/or extracted from vectors.
unsigned getScalarizationOverhead(Type *Ty, bool Insert, bool Extract) const;
----------------
RKSimon wrote:
> I think we can avoid the need for getVectorInstrChainCost at all by adding a APInt DemandedElts mask to this?
This interface is a second level API. i.e. it is a convenience interface that handles repeated pattern of getVectorInstrCost TTI interface use. I do not see how it can be extended without extending the latter to handle multiple indexes at a time.
We can probably make getVectorInstrChainCost private and extend getScalarizationOverhead with mask argument but can't totally avoid creating it. Is this is the way you want me to change it?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76956/new/
https://reviews.llvm.org/D76956
More information about the llvm-commits
mailing list