[llvm-commits] CVS: llvm/lib/Analysis/ScalarEvolution.cpp
Chris Lattner
sabre at nondot.org
Thu Sep 28 16:36:03 PDT 2006
Changes in directory llvm/lib/Analysis:
ScalarEvolution.cpp updated: 1.51 -> 1.52
---
Log message:
Eliminate ConstantBool::True and ConstantBool::False. Instead, provide
ConstantBool::getTrue() and ConstantBool::getFalse().
---
Diffs of the changes: (+4 -4)
ScalarEvolution.cpp | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
Index: llvm/lib/Analysis/ScalarEvolution.cpp
diff -u llvm/lib/Analysis/ScalarEvolution.cpp:1.51 llvm/lib/Analysis/ScalarEvolution.cpp:1.52
--- llvm/lib/Analysis/ScalarEvolution.cpp:1.51 Sun Aug 27 17:30:17 2006
+++ llvm/lib/Analysis/ScalarEvolution.cpp Thu Sep 28 18:35:49 2006
@@ -1689,7 +1689,7 @@
// 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 @@
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 @@
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 @@
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
More information about the llvm-commits
mailing list