rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.
[oota-llvm.git] / lib / Analysis / ScalarEvolutionExpander.cpp
index 9432cc278b97b255e933bd36891c785ebdc57c3e..e9e7e794ce7d6863b9ed4ac87b2e4a998127a048 100644 (file)
@@ -19,10 +19,11 @@ using namespace llvm;
 
 /// InsertCastOfTo - Insert a cast of V to the specified type, doing what
 /// we can to share the casts.
-Value *SCEVExpander::InsertCastOfTo(Value *V, const Type *Ty) {
+Value *SCEVExpander::InsertCastOfTo(Instruction::CastOps opcode, Value *V, 
+                                    const Type *Ty) {
   // FIXME: keep track of the cast instruction.
   if (Constant *C = dyn_cast<Constant>(V))
-    return ConstantExpr::getCast(C, Ty);
+    return ConstantExpr::getCast(opcode, C, Ty);
   
   if (Argument *A = dyn_cast<Argument>(V)) {
     // Check to see if there is already a cast!
@@ -38,8 +39,8 @@ Value *SCEVExpander::InsertCastOfTo(Value *V, const Type *Ty) {
           return CI;
         }
     }
-    return CastInst::createInferredCast(
-        V, Ty, V->getName(), A->getParent()->getEntryBlock().begin());
+    return CastInst::create(opcode, V, Ty, V->getName(), 
+                            A->getParent()->getEntryBlock().begin());
   }
     
   Instruction *I = cast<Instruction>(V);
@@ -64,7 +65,7 @@ Value *SCEVExpander::InsertCastOfTo(Value *V, const Type *Ty) {
   if (InvokeInst *II = dyn_cast<InvokeInst>(I))
     IP = II->getNormalDest()->begin();
   while (isa<PHINode>(IP)) ++IP;
-  return CastInst::createInferredCast(V, Ty, V->getName(), IP);
+  return CastInst::create(opcode, V, Ty, V->getName(), IP);
 }
 
 Value *SCEVExpander::visitMulExpr(SCEVMulExpr *S) {
@@ -91,7 +92,7 @@ Value *SCEVExpander::visitAddRecExpr(SCEVAddRecExpr *S) {
   const Type *Ty = S->getType();
   const Loop *L = S->getLoop();
   // We cannot yet do fp recurrences, e.g. the xform of {X,+,F} --> X+{0,+,F}
-  assert(Ty->isIntegral() && "Cannot expand fp recurrences yet!");
+  assert(Ty->isInteger() && "Cannot expand fp recurrences yet!");
 
   // {X,+,F} --> X + {0,+,F}
   if (!isa<SCEVConstant>(S->getStart()) ||
@@ -142,7 +143,7 @@ Value *SCEVExpander::visitAddRecExpr(SCEVAddRecExpr *S) {
     Value *F = expandInTy(S->getOperand(1), Ty);
     
     // IF the step is by one, just return the inserted IV.
-    if (ConstantIntegral *CI = dyn_cast<ConstantIntegral>(F))
+    if (ConstantInt *CI = dyn_cast<ConstantInt>(F))
       if (CI->getZExtValue() == 1)
         return I;