[PATCH] D76956: [TTI][SLP] Add TTI interface to estimate cost of chain of vector inserts/extracts.
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 30 23:58:05 PDT 2020
lebedev.ri added inline comments.
================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfo.h:958
+ /// \return The expected cost of continous block of iether vector Insert or
+ /// Extract instructions as specified by \p Opcode.
----------------
s/iether/either/
================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfoImpl.h:475
+ ArrayRef<unsigned> Indices) {
+ return Indices.size();
+ }
----------------
I wonder if this should be
```
return std::accumulate(Indices.begin(), Indices.end(), unsigned(0),
[&](unsigned CostSoFar, unsigned Index) {
return CostSoFar + getVectorInstrCost(Opcode, Val, Index);
}
);
```
or this is too advanced for this particular impl
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