[PATCH] D57779: [SLP] Add support for throttling.
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 11 02:36:47 PDT 2020
RKSimon added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:6419
int Cost = R.getTreeCost();
+ unsigned UserCost = 0;
CandidateFound = true;
----------------
dtemirbulatov wrote:
> ABataev wrote:
> > Do you really need this new var here? I don't see where it is used except as an argument of `R.findSubTree(UserCost)` call
> I think we need to compensate the ExctractCost with that cost of the insert sequence as in case of full-vectorization.
This still looks wrong - isn't the UserCost only used locally in the CompensateUseCost path?
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:4147-4154
+ SmallString<256> Str;
+ raw_svector_ostream OS(Str);
+ OS << "SLP: Spill Cost = " << SpillCost << ".\n"
+ << "SLP: Extract Cost = " << ExtractCost << ".\n"
+ << "SLP: Total Cost = " << Cost << ".\n";
LLVM_DEBUG(dbgs() << Str);
if (ViewSLPTree)
----------------
ABataev wrote:
> All this code must be active only when the debug mode on?
Maybe pull this NDEBUG change out into its own patch?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57779/new/
https://reviews.llvm.org/D57779
More information about the llvm-commits
mailing list