[PATCH] D115757: [SLP]Generalize cost model.

Valeriy Dmitriev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 13 13:10:36 PDT 2022


vdmitrie added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:6331
+  const unsigned Sz = VL.size();
+  auto &&GetCostDiff =
+      [this, E, Sz, CommonCost,
----------------
ABataev wrote:
> vdmitrie wrote:
> > Do you have a specific reason to keep this as lambda(lambda(...),lambda(...)) design?
> > I mean this would look much better if you make one more step and outline this into a separate class  (for example CostDifferentiator) with dedicated methods instead of stuffing code with tons of lambdas.
> It will still have lambdas for each particular opcode
Why? It is not prohibited to have dedicated method in the class for each particular opcode. 




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115757



More information about the llvm-commits mailing list