aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar/IndVarSimplify.cpp
diff options
context:
space:
mode:
authorDan Gohman <djg@cray.com>2007-10-22 18:31:58 +0000
committerDan Gohman <djg@cray.com>2007-10-22 18:31:58 +0000
commit89f850508b279d58e3895de9a748883ce1d76f83 (patch)
tree44ca6627cdb239fbc1e2bdbe853716f4ccb29696 /lib/Transforms/Scalar/IndVarSimplify.cpp
parent78ca93bb4960929e72ad3a86219f2a83a4413288 (diff)
downloadexternal_llvm-89f850508b279d58e3895de9a748883ce1d76f83.zip
external_llvm-89f850508b279d58e3895de9a748883ce1d76f83.tar.gz
external_llvm-89f850508b279d58e3895de9a748883ce1d76f83.tar.bz2
Move the SCEV object factors from being static members of the individual
SCEV subclasses to being non-static member functions of the ScalarEvolution class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43224 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/IndVarSimplify.cpp')
-rw-r--r--lib/Transforms/Scalar/IndVarSimplify.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp
index e1092b1..c745631 100644
--- a/lib/Transforms/Scalar/IndVarSimplify.cpp
+++ b/lib/Transforms/Scalar/IndVarSimplify.cpp
@@ -268,7 +268,7 @@ Instruction *IndVarSimplify::LinearFunctionTestReplace(Loop *L,
// backedge actually branches to the loop header. This is one less than the
// number of times the loop executes, so add one to it.
ConstantInt *OneC = ConstantInt::get(IterationCount->getType(), 1);
- TripCount = SCEVAddExpr::get(IterationCount, SCEVConstant::get(OneC));
+ TripCount = SE->getAddExpr(IterationCount, SE->getConstant(OneC));
IndVar = L->getCanonicalInductionVariableIncrement();
} else {
// We have to use the preincremented value...
@@ -524,9 +524,9 @@ bool IndVarSimplify::runOnLoop(Loop *L, LPPassManager &LPM) {
if (!isa<SCEVCouldNotCompute>(IterationCount)) {
if (IterationCount->getType()->getPrimitiveSizeInBits() <
LargestType->getPrimitiveSizeInBits())
- IterationCount = SCEVZeroExtendExpr::get(IterationCount, LargestType);
+ IterationCount = SE->getZeroExtendExpr(IterationCount, LargestType);
else if (IterationCount->getType() != LargestType)
- IterationCount = SCEVTruncateExpr::get(IterationCount, LargestType);
+ IterationCount = SE->getTruncateExpr(IterationCount, LargestType);
if (Instruction *DI = LinearFunctionTestReplace(L, IterationCount,Rewriter))
DeadInsts.insert(DI);
}