aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar/SCCP.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-29 18:55:55 +0000
committerOwen Anderson <resistor@mac.com>2009-07-29 18:55:55 +0000
commit02b48c3be2112c64d8fc9cf5419c9c8d4ec30b71 (patch)
treec06618ee06936e7f5a1dc3c30b313ee49d5eb09b /lib/Transforms/Scalar/SCCP.cpp
parentc9dc5497d5a4bba7ae3c26bdb25c7975739bc633 (diff)
downloadexternal_llvm-02b48c3be2112c64d8fc9cf5419c9c8d4ec30b71.zip
external_llvm-02b48c3be2112c64d8fc9cf5419c9c8d4ec30b71.tar.gz
external_llvm-02b48c3be2112c64d8fc9cf5419c9c8d4ec30b71.tar.bz2
Move ConstantExpr to 2.5 API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77494 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/SCCP.cpp')
-rw-r--r--lib/Transforms/Scalar/SCCP.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp
index 98abfcc..c3a1ae2 100644
--- a/lib/Transforms/Scalar/SCCP.cpp
+++ b/lib/Transforms/Scalar/SCCP.cpp
@@ -670,7 +670,7 @@ void SCCPSolver::visitCastInst(CastInst &I) {
if (VState.isOverdefined()) // Inherit overdefinedness of operand
markOverdefined(&I);
else if (VState.isConstant()) // Propagate constant value
- markConstant(&I, Context->getConstantExprCast(I.getOpcode(),
+ markConstant(&I, ConstantExpr::getCast(I.getOpcode(),
VState.getConstant(), I.getType()));
}
@@ -863,7 +863,7 @@ void SCCPSolver::visitBinaryOperator(Instruction &I) {
break; // Cannot fold this operation over the PHI nodes!
} else if (In1.isConstant() && In2.isConstant()) {
Constant *V =
- Context->getConstantExpr(I.getOpcode(), In1.getConstant(),
+ ConstantExpr::get(I.getOpcode(), In1.getConstant(),
In2.getConstant());
if (Result.isUndefined())
Result.markConstant(V);
@@ -912,7 +912,7 @@ void SCCPSolver::visitBinaryOperator(Instruction &I) {
markOverdefined(IV, &I);
} else if (V1State.isConstant() && V2State.isConstant()) {
markConstant(IV, &I,
- Context->getConstantExpr(I.getOpcode(), V1State.getConstant(),
+ ConstantExpr::get(I.getOpcode(), V1State.getConstant(),
V2State.getConstant()));
}
}
@@ -949,7 +949,7 @@ void SCCPSolver::visitCmpInst(CmpInst &I) {
Result.markOverdefined();
break; // Cannot fold this operation over the PHI nodes!
} else if (In1.isConstant() && In2.isConstant()) {
- Constant *V = Context->getConstantExprCompare(I.getPredicate(),
+ Constant *V = ConstantExpr::getCompare(I.getPredicate(),
In1.getConstant(),
In2.getConstant());
if (Result.isUndefined())
@@ -998,7 +998,7 @@ void SCCPSolver::visitCmpInst(CmpInst &I) {
markOverdefined(IV, &I);
} else if (V1State.isConstant() && V2State.isConstant()) {
- markConstant(IV, &I, Context->getConstantExprCompare(I.getPredicate(),
+ markConstant(IV, &I, ConstantExpr::getCompare(I.getPredicate(),
V1State.getConstant(),
V2State.getConstant()));
}
@@ -1100,7 +1100,7 @@ void SCCPSolver::visitGetElementPtrInst(GetElementPtrInst &I) {
Constant *Ptr = Operands[0];
Operands.erase(Operands.begin()); // Erase the pointer from idx list...
- markConstant(IV, &I, Context->getConstantExprGetElementPtr(Ptr, &Operands[0],
+ markConstant(IV, &I, ConstantExpr::getGetElementPtr(Ptr, &Operands[0],
Operands.size()));
}