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

Valeriy Dmitriev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 13 13:05:35 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,
----------------
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.


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