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 | fad3f247e4fb1a1c553ffdaa898ef652d725027f (patch) | |
tree | fde8066dc7e05e6d1d28f53d3f5f2d1849553756 /llvm/lib/Analysis | |
parent | 666ea0d046cfa43068f2f873cceeed6820c5bdcd (diff) | |
download | bcm5719-llvm-fad3f247e4fb1a1c553ffdaa898ef652d725027f.tar.gz bcm5719-llvm-fad3f247e4fb1a1c553ffdaa898ef652d725027f.zip |
Construct ConstantInt with simpler constructor.
llvm-svn: 34795
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index 8b571cf2779..f0a44c774d0 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/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 |