[PATCH] D138475: [SCEVExpander] Support cost evaluation of several SCEVs with same budget

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 22 05:08:21 PST 2022


lebedev.ri added inline comments.


================
Comment at: llvm/include/llvm/Transforms/Utils/ScalarEvolutionExpander.h:226
+  bool isHighCostExpansion(ArrayRef<const SCEV *> Exprs, Loop *L,
+                           unsigned Budget, const TargetTransformInfo *TTI,
                            const Instruction *At) {
----------------
I was thinking `Budget` should be a non-const-ref,
and we should just subtract the computed cost from it
if we return false from this function.
Would that be worse?


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

https://reviews.llvm.org/D138475



More information about the llvm-commits mailing list