aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2008-07-09 03:21:51 +0000
committerNick Lewycky <nicholas@mxc.ca>2008-07-09 03:21:51 +0000
commitb0b046848faad8e87d02c82d03b5b7b1ba74e041 (patch)
treee011aafa4cb64f4f330ae4176f5372ae26337adc
parent0af822508823b7f1602a2f32a5f75de170d649aa (diff)
Remove getValueRange from SCEV. It wasn't doing anything there anyways, and a
more complete version is now available from the LoopVR pass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53269 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Analysis/ScalarEvolution.h4
-rw-r--r--include/llvm/Analysis/ScalarEvolutionExpressions.h16
-rw-r--r--lib/Analysis/ScalarEvolution.cpp31
3 files changed, 0 insertions, 51 deletions
diff --git a/include/llvm/Analysis/ScalarEvolution.h b/include/llvm/Analysis/ScalarEvolution.h
index 1385cd493b..e5b10c9d59 100644
--- a/include/llvm/Analysis/ScalarEvolution.h
+++ b/include/llvm/Analysis/ScalarEvolution.h
@@ -59,10 +59,6 @@ namespace llvm {
unsigned getSCEVType() const { return SCEVType; }
- /// getValueRange - Return the tightest constant bounds that this value is
- /// known to have. This method is only valid on integer SCEV objects.
- virtual ConstantRange getValueRange() const;
-
/// isLoopInvariant - Return true if the value of this SCEV is unchanging in
/// the specified loop.
virtual bool isLoopInvariant(const Loop *L) const = 0;
diff --git a/include/llvm/Analysis/ScalarEvolutionExpressions.h b/include/llvm/Analysis/ScalarEvolutionExpressions.h
index 76f4b2c28c..652a99d0fc 100644
--- a/include/llvm/Analysis/ScalarEvolutionExpressions.h
+++ b/include/llvm/Analysis/ScalarEvolutionExpressions.h
@@ -42,10 +42,6 @@ namespace llvm {
public:
ConstantInt *getValue() const { return V; }
- /// getValueRange - Return the tightest constant bounds that this value is
- /// known to have. This method is only valid on integer SCEV objects.
- virtual ConstantRange getValueRange() const;
-
virtual bool isLoopInvariant(const Loop *L) const {
return true;
}
@@ -104,10 +100,6 @@ namespace llvm {
return SE.getTruncateExpr(H, Ty);
}
- /// getValueRange - Return the tightest constant bounds that this value is
- /// known to have. This method is only valid on integer SCEV objects.
- virtual ConstantRange getValueRange() const;
-
virtual void print(std::ostream &OS) const;
void print(std::ostream *OS) const { if (OS) print(*OS); }
@@ -141,10 +133,6 @@ namespace llvm {
return Op->hasComputableLoopEvolution(L);
}
- /// getValueRange - Return the tightest constant bounds that this value is
- /// known to have. This method is only valid on integer SCEV objects.
- virtual ConstantRange getValueRange() const;
-
SCEVHandle replaceSymbolicValuesWithConcrete(const SCEVHandle &Sym,
const SCEVHandle &Conc,
ScalarEvolution &SE) const {
@@ -187,10 +175,6 @@ namespace llvm {
return Op->hasComputableLoopEvolution(L);
}
- /// getValueRange - Return the tightest constant bounds that this value is
- /// known to have. This method is only valid on integer SCEV objects.
- virtual ConstantRange getValueRange() const;
-
SCEVHandle replaceSymbolicValuesWithConcrete(const SCEVHandle &Sym,
const SCEVHandle &Conc,
ScalarEvolution &SE) const {
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp
index 4462986f15..ab0de275b0 100644
--- a/lib/Analysis/ScalarEvolution.cpp
+++ b/lib/Analysis/ScalarEvolution.cpp
@@ -117,15 +117,6 @@ void SCEV::dump() const {
print(cerr);
}
-/// getValueRange - Return the tightest constant bounds that this value is
-/// known to have. This method is only valid on integer SCEV objects.
-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(getBitWidth());
-}
-
uint32_t SCEV::getBitWidth() const {
if (const IntegerType* ITy = dyn_cast<IntegerType>(getType()))
return ITy->getBitWidth();
@@ -192,10 +183,6 @@ SCEVHandle ScalarEvolution::getConstant(const APInt& Val) {
return getConstant(ConstantInt::get(Val));
}
-ConstantRange SCEVConstant::getValueRange() const {
- return ConstantRange(V->getValue());
-}
-
const Type *SCEVConstant::getType() const { return V->getType(); }
void SCEVConstant::print(std::ostream &OS) const {
@@ -220,10 +207,6 @@ SCEVTruncateExpr::~SCEVTruncateExpr() {
SCEVTruncates->erase(std::make_pair(Op, Ty));
}
-ConstantRange SCEVTruncateExpr::getValueRange() const {
- return getOperand()->getValueRange().truncate(getBitWidth());
-}
-
void SCEVTruncateExpr::print(std::ostream &OS) const {
OS << "(truncate " << *Op << " to " << *Ty << ")";
}
@@ -246,10 +229,6 @@ SCEVZeroExtendExpr::~SCEVZeroExtendExpr() {
SCEVZeroExtends->erase(std::make_pair(Op, Ty));
}
-ConstantRange SCEVZeroExtendExpr::getValueRange() const {
- return getOperand()->getValueRange().zeroExtend(getBitWidth());
-}
-
void SCEVZeroExtendExpr::print(std::ostream &OS) const {
OS << "(zeroextend " << *Op << " to " << *Ty << ")";
}
@@ -272,10 +251,6 @@ SCEVSignExtendExpr::~SCEVSignExtendExpr() {
SCEVSignExtends->erase(std::make_pair(Op, Ty));
}
-ConstantRange SCEVSignExtendExpr::getValueRange() const {
- return getOperand()->getValueRange().signExtend(getBitWidth());
-}
-
void SCEVSignExtendExpr::print(std::ostream &OS) const {
OS << "(signextend " << *Op << " to " << *Ty << ")";
}
@@ -2906,12 +2881,6 @@ void ScalarEvolution::print(std::ostream &OS, const Module* ) const {
SV->print(OS);
OS << "\t\t";
- if ((*I).getType()->isInteger()) {
- ConstantRange Bounds = SV->getValueRange();
- if (!Bounds.isFullSet())
- OS << "Bounds: " << Bounds << " ";
- }
-
if (const Loop *L = LI.getLoopFor((*I).getParent())) {
OS << "Exits: ";
SCEVHandle ExitValue = getSCEVAtScope(&*I, L->getParentLoop());