[PATCH] D57779: [SLP] Add support for throttling.

Dinar Temirbulatov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 11 03:12:04 PDT 2020


dtemirbulatov added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:6419
       int Cost = R.getTreeCost();
+      unsigned UserCost = 0;
       CandidateFound = true;
----------------
dtemirbulatov wrote:
> RKSimon wrote:
> > 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?
> No, there is another instance of UserCost at 6476, We have to compare the cost to SLPCostThreshold inside findSubTree() and subtract UserCost.
I mean the instance of usage.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57779/new/

https://reviews.llvm.org/D57779



More information about the llvm-commits mailing list