Add explicit keywords.
[oota-llvm.git] / include / llvm / Analysis / ScalarEvolutionExpander.h
index a5cc7138cacba9bd53dfc722a513e9d3ea0a1a0e..8582067e108f4ccb491f9f3297f14a7438a203c0 100644 (file)
@@ -61,8 +61,8 @@ namespace llvm {
     /// starts at zero and steps by one on each iteration.
     Value *getOrInsertCanonicalInductionVariable(const Loop *L, const Type *Ty){
       assert(Ty->isInteger() && "Can only insert integer induction variables!");
-      SCEVHandle H = SCEVAddRecExpr::get(SCEVUnknown::getIntegerSCEV(0, Ty),
-                                         SCEVUnknown::getIntegerSCEV(1, Ty), L);
+      SCEVHandle H = SE.getAddRecExpr(SE.getIntegerSCEV(0, Ty),
+                                      SE.getIntegerSCEV(1, Ty), L);
       return expand(H);
     }
 
@@ -93,17 +93,8 @@ namespace llvm {
     static Value *InsertBinop(Instruction::BinaryOps Opcode, Value *LHS,
                               Value *RHS, Instruction *&InsertPt);
   protected:
-    Value *expand(SCEV *S) {
-      // Check to see if we already expanded this.
-      std::map<SCEVHandle, Value*>::iterator I = InsertedExpressions.find(S);
-      if (I != InsertedExpressions.end())
-        return I->second;
-
-      Value *V = visit(S);
-      InsertedExpressions[S] = V;
-      return V;
-    }
-
+    Value *expand(SCEV *S);
+    
     Value *visitConstant(SCEVConstant *S) {
       return S->getValue();
     }