diff options
author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2015-10-09 02:44:45 +0000 |
---|---|---|
committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2015-10-09 02:44:45 +0000 |
commit | 648956118b3992bcdb14fda61d194fa6fba0d2c9 (patch) | |
tree | 20dc0d1f84ff65ab38e17e5576e0de085508efd8 /llvm/lib/Analysis | |
parent | 55c214484c5d4750a9aa4ec5011ae187ae81344f (diff) | |
download | bcm5719-llvm-648956118b3992bcdb14fda61d194fa6fba0d2c9.tar.gz bcm5719-llvm-648956118b3992bcdb14fda61d194fa6fba0d2c9.zip |
[SCEV] Call `StrengthenNoWrapFlags` after `GroupByComplexity`; NFCI
The current implementation of `StrengthenNoWrapFlags` is agnostic to the
order of `Ops`, so this commit should not change anything semantic. An
upcoming change will make `StrengthenNoWrapFlags` sensitive to the order
of `Ops`.
llvm-svn: 249802
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index 4181ee6446a..5843ed76fa2 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -1960,11 +1960,11 @@ const SCEV *ScalarEvolution::getAddExpr(SmallVectorImpl<const SCEV *> &Ops, "SCEVAddExpr operand types don't match!"); #endif - Flags = StrengthenNoWrapFlags(this, scAddExpr, Ops, Flags); - // Sort by complexity, this groups all similar expression types together. GroupByComplexity(Ops, &LI); + Flags = StrengthenNoWrapFlags(this, scAddExpr, Ops, Flags); + // If there are any constants, fold them together. unsigned Idx = 0; if (const SCEVConstant *LHSC = dyn_cast<SCEVConstant>(Ops[0])) { @@ -2368,11 +2368,11 @@ const SCEV *ScalarEvolution::getMulExpr(SmallVectorImpl<const SCEV *> &Ops, "SCEVMulExpr operand types don't match!"); #endif - Flags = StrengthenNoWrapFlags(this, scMulExpr, Ops, Flags); - // Sort by complexity, this groups all similar expression types together. GroupByComplexity(Ops, &LI); + Flags = StrengthenNoWrapFlags(this, scMulExpr, Ops, Flags); + // If there are any constants, fold them together. unsigned Idx = 0; if (const SCEVConstant *LHSC = dyn_cast<SCEVConstant>(Ops[0])) { |