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
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 @@
     // 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 @@
   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);
   }