diff options
author | Chris Lattner <sabre@nondot.org> | 2006-09-28 23:36:21 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-09-28 23:36:21 +0000 |
commit | 003cbf35f4d9feebf0f1508c85b69b87645727cd (patch) | |
tree | ba2192fe9b70850c25961a8311916cf7b45a9b7a /lib/Analysis/ScalarEvolution.cpp | |
parent | 47811b76ca92ddfebdd73c633d04ba8a4f5b7b59 (diff) |
Eliminate ConstantBool::True and ConstantBool::False. Instead, provide
ConstantBool::getTrue() and ConstantBool::getFalse().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30666 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ScalarEvolution.cpp')
-rw-r--r-- | lib/Analysis/ScalarEvolution.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 289297cf3a..2f8edd9fe2 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -1689,7 +1689,7 @@ ComputeLoadConstantCompareIterationCount(LoadInst *LI, Constant *RHS, // Evaluate the condition for this iteration. Result = ConstantExpr::get(SetCCOpcode, Result, RHS); if (!isa<ConstantBool>(Result)) break; // Couldn't decide for sure - if (Result == ConstantBool::False) { + if (cast<ConstantBool>(Result)->getValue() == false) { #if 0 std::cerr << "\n***\n*** Computed loop count " << *ItCst << "\n*** From global " << *GV << "*** BB: " << *L->getHeader() @@ -2168,7 +2168,7 @@ SCEVHandle ScalarEvolutionsImpl::HowFarToZero(SCEV *V, const Loop *L) { if (ConstantBool *CB = dyn_cast<ConstantBool>(ConstantExpr::getSetLT(R1->getValue(), R2->getValue()))) { - if (CB != ConstantBool::True) + if (CB->getValue() == false) std::swap(R1, R2); // R1 is the minimum root now. // We can only use this value if the chrec ends up with an exact zero @@ -2198,7 +2198,7 @@ SCEVHandle ScalarEvolutionsImpl::HowFarToNonZero(SCEV *V, const Loop *L) { if (SCEVConstant *C = dyn_cast<SCEVConstant>(V)) { Constant *Zero = Constant::getNullValue(C->getValue()->getType()); Constant *NonZero = ConstantExpr::getSetNE(C->getValue(), Zero); - if (NonZero == ConstantBool::True) + if (NonZero == ConstantBool::getTrue()) return getSCEV(Zero); return UnknownValue; // Otherwise it will loop infinitely. } @@ -2386,7 +2386,7 @@ SCEVHandle SCEVAddRecExpr::getNumIterationsInRange(ConstantRange Range) const { if (ConstantBool *CB = dyn_cast<ConstantBool>(ConstantExpr::getSetLT(R1->getValue(), R2->getValue()))) { - if (CB != ConstantBool::True) + if (CB->getValue() == false) std::swap(R1, R2); // R1 is the minimum root now. // Make sure the root is not off by one. The returned iteration should |