diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-03-01 07:54:15 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-03-01 07:54:15 +0000 |
commit | 6a4403346545170a64df94a9d1239375d633f2ed (patch) | |
tree | ad50944ea123982cca25e9d5d78f15c23b630ab0 /llvm/lib/Analysis/ScalarEvolution.cpp | |
parent | 677bb3b460f35bad90d1dd0c70c57da375855874 (diff) | |
download | bcm5719-llvm-6a4403346545170a64df94a9d1239375d633f2ed.tar.gz bcm5719-llvm-6a4403346545170a64df94a9d1239375d633f2ed.zip |
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.
llvm-svn: 34782
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolution.cpp')
-rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index 4e16331fae9..44b5f61749f 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/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. |