[llvm-commits] CVS: llvm/lib/Analysis/ScalarEvolution.cpp
Reid Spencer
reid at x10sys.com
Thu Mar 1 11:32:50 PST 2007
Changes in directory llvm/lib/Analysis:
ScalarEvolution.cpp updated: 1.100 -> 1.101
---
Log message:
Construct ConstantInt with simpler constructor.
---
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.100 llvm/lib/Analysis/ScalarEvolution.cpp:1.101
--- llvm/lib/Analysis/ScalarEvolution.cpp:1.100 Thu Mar 1 11:17:21 2007
+++ llvm/lib/Analysis/ScalarEvolution.cpp Thu Mar 1 13:32:33 2007
@@ -500,7 +500,7 @@
APInt Result(Val.getBitWidth(), 1);
for (; NumSteps; --NumSteps)
Result *= Val-(NumSteps-1);
- return SCEVUnknown::get(ConstantInt::get(V->getType(), Result));
+ return SCEVUnknown::get(ConstantInt::get(Result));
}
const Type *Ty = V->getType();
@@ -2364,7 +2364,7 @@
APInt ExitVal(Upper);
if (A != One)
ExitVal = (Upper + A - One).sdiv(A);
- ConstantInt *ExitValue = ConstantInt::get(getType(), ExitVal);
+ ConstantInt *ExitValue = ConstantInt::get(ExitVal);
// Evaluate at the exit value. If we really did fall out of the valid
// range, then we computed our trip count, otherwise wrap around or other
@@ -2376,7 +2376,7 @@
// 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()) &&
+ ConstantInt::get(ExitVal - One))->getValue()) &&
"Linear scev computation is off in a bad way!");
return SCEVConstant::get(cast<ConstantInt>(ExitValue));
} else if (isQuadratic()) {
@@ -2386,7 +2386,7 @@
// Range.getUpper() is crossed.
std::vector<SCEVHandle> NewOps(op_begin(), op_end());
NewOps[0] = SCEV::getNegativeSCEV(SCEVUnknown::get(
- ConstantInt::get(getType(), Range.getUpper())));
+ ConstantInt::get(Range.getUpper())));
SCEVHandle NewAddRec = SCEVAddRecExpr::get(NewOps, getLoop());
// Next, solve the constructed addrec
More information about the llvm-commits
mailing list