aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/ScalarEvolution.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-03-01 07:54:15 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-03-01 07:54:15 +0000
commita6e8a955d6ab82911a1909fac7a9f4256a4d090e (patch)
tree679bee028efe0c335cf9b2dded0c8832caadf709 /lib/Analysis/ScalarEvolution.cpp
parentcda067bad95654d970e14d3555f4aa685e5ebcae (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34782 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ScalarEvolution.cpp')
-rw-r--r--lib/Analysis/ScalarEvolution.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp
index 4e16331fae..44b5f61749 100644
--- a/lib/Analysis/ScalarEvolution.cpp
+++ b/lib/Analysis/ScalarEvolution.cpp
@@ -2345,7 +2345,7 @@ SCEVHandle SCEVAddRecExpr::getNumIterationsInRange(ConstantRange Range,
// 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 @@ SCEVHandle SCEVAddRecExpr::getNumIterationsInRange(ConstantRange Range,
// 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 @@ SCEVHandle SCEVAddRecExpr::getNumIterationsInRange(ConstantRange Range,
// 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 @@ SCEVHandle SCEVAddRecExpr::getNumIterationsInRange(ConstantRange Range,
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 @@ SCEVHandle SCEVAddRecExpr::getNumIterationsInRange(ConstantRange Range,
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.