[llvm-commits] CVS: llvm/lib/Analysis/ScalarEvolution.cpp
Reid Spencer
reid at x10sys.com
Wed Feb 28 23:54:37 PST 2007
Changes in directory llvm/lib/Analysis:
ScalarEvolution.cpp updated: 1.98 -> 1.99
---
Log message:
Remove the "isSigned" parameters from ConstantRange. It turns out they
are not needed as the results are the same with or without it.
Patch by Nicholas Lewycky.
---
Diffs of the changes: (+7 -8)
ScalarEvolution.cpp | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
Index: llvm/lib/Analysis/ScalarEvolution.cpp
diff -u llvm/lib/Analysis/ScalarEvolution.cpp:1.98 llvm/lib/Analysis/ScalarEvolution.cpp:1.99
--- llvm/lib/Analysis/ScalarEvolution.cpp:1.98 Thu Mar 1 01:25:48 2007
+++ llvm/lib/Analysis/ScalarEvolution.cpp Thu Mar 1 01:54:15 2007
@@ -2345,7 +2345,7 @@
// First check to see if the range contains zero. If not, the first
// iteration exits.
- if (!Range.contains(APInt(getBitWidth(),0), isSigned))
+ if (!Range.contains(APInt(getBitWidth(),0)))
return SCEVConstant::get(ConstantInt::get(getType(),0));
if (isAffine()) {
@@ -2369,13 +2369,13 @@
// range, then we computed our trip count, otherwise wrap around or other
// things must have happened.
ConstantInt *Val = EvaluateConstantChrecAtConstant(this, ExitValue);
- if (Range.contains(Val->getValue(), isSigned))
+ if (Range.contains(Val->getValue()))
return new SCEVCouldNotCompute(); // Something strange happened
// Ensure that the previous value is in the range. This is a sanity check.
assert(Range.contains(
EvaluateConstantChrecAtConstant(this,
- ConstantInt::get(getType(), ExitVal - One))->getValue(), isSigned) &&
+ ConstantInt::get(getType(), ExitVal - One))->getValue()) &&
"Linear scev computation is off in a bad way!");
return SCEVConstant::get(cast<ConstantInt>(ExitValue));
} else if (isQuadratic()) {
@@ -2406,14 +2406,14 @@
// for "X*X < 5", for example, we should not return a root of 2.
ConstantInt *R1Val = EvaluateConstantChrecAtConstant(this,
R1->getValue());
- if (Range.contains(R1Val->getValue(), isSigned)) {
+ if (Range.contains(R1Val->getValue())) {
// The next iteration must be out of the range...
Constant *NextVal =
ConstantExpr::getAdd(R1->getValue(),
ConstantInt::get(R1->getType(), 1));
R1Val = EvaluateConstantChrecAtConstant(this, NextVal);
- if (!Range.contains(R1Val->getValue(), isSigned))
+ if (!Range.contains(R1Val->getValue()))
return SCEVUnknown::get(NextVal);
return new SCEVCouldNotCompute(); // Something strange happened
}
@@ -2424,7 +2424,7 @@
ConstantExpr::getSub(R1->getValue(),
ConstantInt::get(R1->getType(), 1));
R1Val = EvaluateConstantChrecAtConstant(this, NextVal);
- if (Range.contains(R1Val->getValue(), isSigned))
+ if (Range.contains(R1Val->getValue()))
return R1;
return new SCEVCouldNotCompute(); // Something strange happened
}
@@ -2446,8 +2446,7 @@
return new SCEVCouldNotCompute();
// Check to see if we found the value!
- if (!Range.contains(cast<SCEVConstant>(Val)->getValue()->getValue(),
- isSigned))
+ if (!Range.contains(cast<SCEVConstant>(Val)->getValue()->getValue()))
return SCEVConstant::get(TestVal);
// Increment to test the next index.
More information about the llvm-commits
mailing list