[PATCH] D57779: [SLP] Add support for throttling.
Dinar Temirbulatov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 19 05:54:54 PDT 2020
dtemirbulatov marked an inline comment as done.
dtemirbulatov added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:4065
+ if (Tree->ScalarsToVec.count(Op))
+ InsertCost += getGatherCost(V);
+ }
----------------
wwei wrote:
> I think the input for `getGatherCost` should be `Entry->Scalars` instead of `V`. The code in `getGatherCost` likes:
> ```
> int BoUpSLP::getGatherCost(ArrayRef<Value *> VL) const {
> // Find the type of the operands in VL.
> Type *ScalarTy = VL[0]->getType();
> ... ...
> VectorType *VecTy = VectorType::get(ScalarTy, VL.size());
> ... ...
> return getGatherCost(VecTy, ShuffledElements);
> ```
> So, if input is `V`, `VectTy` will always be equal to `<1 x iN>`, I think it's the same with `iN` type, and `getGatherCost(VecTy, ShuffledElements)` will return incorrect InsertCost value.
>
Yes, correct. Thanks, I will fix that.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57779/new/
https://reviews.llvm.org/D57779
More information about the llvm-commits
mailing list