[PATCH] D86072: [SCEV] Cost Add and Mul Expr differently
Sam Parker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 17 06:28:13 PDT 2020
samparker created this revision.
samparker added reviewers: lebedev.ri, reames, mkazantsev.
Herald added subscribers: zzheng, hiraditya.
Herald added a project: LLVM.
samparker requested review of this revision.
In ScalarEvolutionExpander::isHighCostExpansion, the cost of an AddRecExpr is dependent upon the number of terms, which reflects the number of operations required. So this should also be done for normal Add and Mul Exprs too.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D86072
Files:
llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
llvm/test/Transforms/IndVarSimplify/2011-11-01-lftrptr.ll
llvm/test/Transforms/IndVarSimplify/X86/loop-invariant-conditions.ll
llvm/test/Transforms/IndVarSimplify/elim-extend.ll
llvm/test/Transforms/IndVarSimplify/lftr.ll
llvm/test/Transforms/IndVarSimplify/ult-sub-to-eq.ll
llvm/test/Transforms/IndVarSimplify/widen-loop-comp.ll
llvm/test/Transforms/LoopUnroll/runtime-small-upperbound.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86072.286002.patch
Type: text/x-patch
Size: 32195 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200817/02c4af6b/attachment.bin>
More information about the llvm-commits
mailing list