aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/PredicateSimplifier.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-21 18:03:38 +0000
committerOwen Anderson <resistor@mac.com>2009-07-21 18:03:38 +0000
commitb3056faa5554ded7ac1ac5865d10ef5839fb77d3 (patch)
tree464f3bc451710be725e281b6b660c07adcb007fc /lib/Transforms/Scalar/PredicateSimplifier.cpp
parentd06c59821a1ca0191ea8a326a18509808a02ed03 (diff)
Rename getConstantInt{True|False} to get{True|False} at Chris' behest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76598 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/PredicateSimplifier.cpp')
-rw-r--r--lib/Transforms/Scalar/PredicateSimplifier.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/Transforms/Scalar/PredicateSimplifier.cpp b/lib/Transforms/Scalar/PredicateSimplifier.cpp
index df397cea0a..9928c688c4 100644
--- a/lib/Transforms/Scalar/PredicateSimplifier.cpp
+++ b/lib/Transforms/Scalar/PredicateSimplifier.cpp
@@ -1691,7 +1691,7 @@ namespace {
if (Constant *C1 = dyn_cast<Constant>(V1))
if (Constant *C2 = dyn_cast<Constant>(V2))
return Context->getConstantExprCompare(Pred, C1, C2) ==
- Context->getConstantIntTrue();
+ Context->getTrue();
unsigned n1 = VN.valueNumber(V1, Top);
unsigned n2 = VN.valueNumber(V2, Top);
@@ -1803,10 +1803,10 @@ namespace {
// "icmp ult i32 %a, %y" EQ true then %a u< y
// etc.
- if (Canonical == Context->getConstantIntTrue()) {
+ if (Canonical == Context->getTrue()) {
add(IC->getOperand(0), IC->getOperand(1), IC->getPredicate(),
NewContext);
- } else if (Canonical == Context->getConstantIntFalse()) {
+ } else if (Canonical == Context->getFalse()) {
add(IC->getOperand(0), IC->getOperand(1),
ICmpInst::getInversePredicate(IC->getPredicate()), NewContext);
}
@@ -1822,11 +1822,11 @@ namespace {
if (isRelatedBy(True, False, ICmpInst::ICMP_NE)) {
if (Canonical == VN.canonicalize(True, Top) ||
isRelatedBy(Canonical, False, ICmpInst::ICMP_NE))
- add(SI->getCondition(), Context->getConstantIntTrue(),
+ add(SI->getCondition(), Context->getTrue(),
ICmpInst::ICMP_EQ, NewContext);
else if (Canonical == VN.canonicalize(False, Top) ||
isRelatedBy(Canonical, True, ICmpInst::ICMP_NE))
- add(SI->getCondition(), Context->getConstantIntFalse(),
+ add(SI->getCondition(), Context->getFalse(),
ICmpInst::ICMP_EQ, NewContext);
}
} else if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(I)) {
@@ -2050,9 +2050,9 @@ namespace {
ICmpInst::Predicate Pred = IC->getPredicate();
if (isRelatedBy(Op0, Op1, Pred))
- add(IC, Context->getConstantIntTrue(), ICmpInst::ICMP_EQ, NewContext);
+ add(IC, Context->getTrue(), ICmpInst::ICMP_EQ, NewContext);
else if (isRelatedBy(Op0, Op1, ICmpInst::getInversePredicate(Pred)))
- add(IC, Context->getConstantIntFalse(),
+ add(IC, Context->getFalse(),
ICmpInst::ICMP_EQ, NewContext);
} else if (SelectInst *SI = dyn_cast<SelectInst>(I)) {
@@ -2064,9 +2064,9 @@ namespace {
// %b EQ %c then %a EQ %b
Value *Canonical = VN.canonicalize(SI->getCondition(), Top);
- if (Canonical == Context->getConstantIntTrue()) {
+ if (Canonical == Context->getTrue()) {
add(SI, SI->getTrueValue(), ICmpInst::ICMP_EQ, NewContext);
- } else if (Canonical == Context->getConstantIntFalse()) {
+ } else if (Canonical == Context->getFalse()) {
add(SI, SI->getFalseValue(), ICmpInst::ICMP_EQ, NewContext);
} else if (VN.canonicalize(SI->getTrueValue(), Top) ==
VN.canonicalize(SI->getFalseValue(), Top)) {
@@ -2156,7 +2156,7 @@ namespace {
if (Constant *CI_L = dyn_cast<Constant>(O.LHS)) {
if (Constant *CI_R = dyn_cast<Constant>(O.RHS)) {
if (Context->getConstantExprCompare(O.Op, CI_L, CI_R) ==
- Context->getConstantIntFalse())
+ Context->getFalse())
UB.mark(TopBB);
WorkList.pop_front();
@@ -2458,7 +2458,7 @@ namespace {
if (Dest == TrueDest) {
DOUT << "(" << DTNode->getBlock()->getName() << ") true set:\n";
VRPSolver VRP(VN, IG, UB, VR, PS->DTDFS, PS->modified, Dest);
- VRP.add(Context->getConstantIntTrue(), Condition, ICmpInst::ICMP_EQ);
+ VRP.add(Context->getTrue(), Condition, ICmpInst::ICMP_EQ);
VRP.solve();
DEBUG(VN.dump());
DEBUG(IG.dump());
@@ -2466,7 +2466,7 @@ namespace {
} else if (Dest == FalseDest) {
DOUT << "(" << DTNode->getBlock()->getName() << ") false set:\n";
VRPSolver VRP(VN, IG, UB, VR, PS->DTDFS, PS->modified, Dest);
- VRP.add(Context->getConstantIntFalse(), Condition, ICmpInst::ICMP_EQ);
+ VRP.add(Context->getFalse(), Condition, ICmpInst::ICMP_EQ);
VRP.solve();
DEBUG(VN.dump());
DEBUG(IG.dump());