diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-02-28 22:03:51 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-02-28 22:03:51 +0000 |
commit | c6aedf70b3a7d0478b8882bf79b985a48d78d37e (patch) | |
tree | 8b86901bfa4276ec259dedcedf2d7c9ac7c71901 /lib/Analysis/ScalarEvolution.cpp | |
parent | bb626a6751db9a63d159d32522bdf88cedf46eeb (diff) |
For PR1205:
Adjust to changes in ConstantRange interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34762 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ScalarEvolution.cpp')
-rw-r--r-- | lib/Analysis/ScalarEvolution.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 364e1223ba..7ce975e224 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -124,7 +124,7 @@ ConstantRange SCEV::getValueRange() const { const Type *Ty = getType(); assert(Ty->isInteger() && "Can't get range for a non-integer SCEV!"); // Default to a full range if no better information is available. - return ConstantRange(getType()); + return ConstantRange(getBitWidth()); } uint32_t SCEV::getBitWidth() const { @@ -211,7 +211,7 @@ SCEVTruncateExpr::~SCEVTruncateExpr() { } ConstantRange SCEVTruncateExpr::getValueRange() const { - return getOperand()->getValueRange().truncate(getType()); + return getOperand()->getValueRange().truncate(getBitWidth()); } void SCEVTruncateExpr::print(std::ostream &OS) const { @@ -237,7 +237,7 @@ SCEVZeroExtendExpr::~SCEVZeroExtendExpr() { } ConstantRange SCEVZeroExtendExpr::getValueRange() const { - return getOperand()->getValueRange().zeroExtend(getType()); + return getOperand()->getValueRange().zeroExtend(getBitWidth()); } void SCEVZeroExtendExpr::print(std::ostream &OS) const { @@ -1572,7 +1572,8 @@ SCEVHandle ScalarEvolutionsImpl::ComputeIterationCount(const Loop *L) { ConstantExpr::getBitCast(CompVal, RealTy)); if (CompVal) { // Form the constant range. - ConstantRange CompRange(Cond, CompVal->getValue()); + ConstantRange CompRange( + ICmpInst::makeConstantRange(Cond, CompVal->getValue())); SCEVHandle Ret = AddRec->getNumIterationsInRange(CompRange, false /*Always treat as unsigned range*/); |