aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar/Reassociate.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-13 20:58:05 +0000
committerOwen Anderson <resistor@mac.com>2009-07-13 20:58:05 +0000
commit035d41d6c7abc88fc6be5f7f4eb8fe959fe97323 (patch)
treecabab2668e037a0276156e885bd54d5bd660eabd /lib/Transforms/Scalar/Reassociate.cpp
parentdb888429829c0151ddca4cbcc60db6b5c9f01fd1 (diff)
downloadexternal_llvm-035d41d6c7abc88fc6be5f7f4eb8fe959fe97323.zip
external_llvm-035d41d6c7abc88fc6be5f7f4eb8fe959fe97323.tar.gz
external_llvm-035d41d6c7abc88fc6be5f7f4eb8fe959fe97323.tar.bz2
Move more functionality over to LLVMContext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75497 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/Reassociate.cpp')
-rw-r--r--lib/Transforms/Scalar/Reassociate.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/Reassociate.cpp b/lib/Transforms/Scalar/Reassociate.cpp
index 054e09d..6465fc1 100644
--- a/lib/Transforms/Scalar/Reassociate.cpp
+++ b/lib/Transforms/Scalar/Reassociate.cpp
@@ -201,7 +201,7 @@ static BinaryOperator *isReassociableOp(Value *V, unsigned Opcode) {
static Instruction *LowerNegateToMultiply(Instruction *Neg,
std::map<AssertingVH<>, unsigned> &ValueRankMap,
LLVMContext *Context) {
- Constant *Cst = Context->getConstantIntAllOnesValue(Neg->getType());
+ Constant *Cst = Context->getAllOnesValue(Neg->getType());
Instruction *Res = BinaryOperator::CreateMul(Neg->getOperand(1), Cst, "",Neg);
ValueRankMap.erase(Neg);
@@ -626,7 +626,7 @@ Value *Reassociate::OptimizeExpression(BinaryOperator *I,
return Context->getNullValue(X->getType());
} else if (Opcode == Instruction::Or) { // ...|X|~X = -1
++NumAnnihil;
- return Context->getConstantIntAllOnesValue(X->getType());
+ return Context->getAllOnesValue(X->getType());
}
}
}