[PATCH] D100486: [COST]Improve cost model for shuffles in SLP.
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 16 06:30:48 PDT 2021
ABataev added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:3620-3621
+ TargetTransformInfo::SK_PermuteSingleSrc;
+ if (ShuffleVectorInst::isReverseMask(NewMask))
+ SK = TargetTransformInfo::SK_Reverse;
+ CommonCost = TTI->getShuffleCost(SK, VecTy, NewMask);
----------------
RKSimon wrote:
> sdesmalen wrote:
> > Can the finding of a more specific ShuffleKind be done by getShuffleCost when a Mask is given?
> > It seems a bit inconvenient to have to do that manually before calling this function.
> I made a similar comment on D100495 - we could do with a generic 'ShuffleKind' decoder helper function (e.g. in Analysis\VectorUtils.h) that everybody can use.
In this case, we need to update `getShuffleCost` function for all the targets to translate the mask. Is it ok if I'll do it in this patch?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100486/new/
https://reviews.llvm.org/D100486
More information about the llvm-commits
mailing list