diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-03-01 19:32:33 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-03-01 19:32:33 +0000 |
commit | c7cd7a0bb1debf6e71c71e63c595059a306177dd (patch) | |
tree | 1e02c5451e794b620bae16890adb510549e92894 /lib/Analysis/ScalarEvolution.cpp | |
parent | af1aacd91a3194dc3894cc84ea0982f364ebb762 (diff) |
Construct ConstantInt with simpler constructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34795 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ScalarEvolution.cpp')
-rw-r--r-- | lib/Analysis/ScalarEvolution.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 8b571cf277..f0a44c774d 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -500,7 +500,7 @@ static SCEVHandle PartialFact(SCEVHandle V, unsigned NumSteps) { 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 @@ SCEVHandle SCEVAddRecExpr::getNumIterationsInRange(ConstantRange Range, 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 @@ SCEVHandle SCEVAddRecExpr::getNumIterationsInRange(ConstantRange Range, // 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 @@ SCEVHandle SCEVAddRecExpr::getNumIterationsInRange(ConstantRange Range, // 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 |