summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-11-17 21:23:15 +0000
committerDan Gohman <gohman@apple.com>2010-11-17 21:23:15 +0000
commitafd6db99322ca8a6556b1e93699b4b4c9ebf5080 (patch)
tree0fa53a12b2a9c96bd60e4ff42ae36e22cf80b36d /llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h
parent5ba1459c4c65c56358a8fdd26c731398c4326e64 (diff)
downloadbcm5719-llvm-afd6db99322ca8a6556b1e93699b4b4c9ebf5080.tar.gz
bcm5719-llvm-afd6db99322ca8a6556b1e93699b4b4c9ebf5080.zip
Move SCEV::isLoopInvariant and hasComputableLoopEvolution to be member
functions of ScalarEvolution, in preparation for memoization and other optimizations. llvm-svn: 119562
Diffstat (limited to 'llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h')
-rw-r--r--llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h43
1 files changed, 0 insertions, 43 deletions
diff --git a/llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h b/llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h
index 06a8b42caff..8cb533a1f29 100644
--- a/llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h
+++ b/llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h
@@ -42,14 +42,6 @@ namespace llvm {
public:
ConstantInt *getValue() const { return V; }
- virtual bool isLoopInvariant(const Loop *L) const {
- return true;
- }
-
- virtual bool hasComputableLoopEvolution(const Loop *L) const {
- return false; // Not loop variant
- }
-
virtual const Type *getType() const;
virtual bool hasOperand(const SCEV *) const {
@@ -88,14 +80,6 @@ namespace llvm {
const SCEV *getOperand() const { return Op; }
virtual const Type *getType() const { return Ty; }
- virtual bool isLoopInvariant(const Loop *L) const {
- return Op->isLoopInvariant(L);
- }
-
- virtual bool hasComputableLoopEvolution(const Loop *L) const {
- return Op->hasComputableLoopEvolution(L);
- }
-
virtual bool hasOperand(const SCEV *O) const {
return Op == O || Op->hasOperand(O);
}
@@ -202,13 +186,6 @@ namespace llvm {
op_iterator op_begin() const { return Operands; }
op_iterator op_end() const { return Operands + NumOperands; }
- virtual bool isLoopInvariant(const Loop *L) const;
-
- // hasComputableLoopEvolution - N-ary expressions have computable loop
- // evolutions iff they have at least one operand that varies with the loop,
- // but that all varying operands are computable.
- virtual bool hasComputableLoopEvolution(const Loop *L) const;
-
virtual bool hasOperand(const SCEV *O) const;
bool dominates(BasicBlock *BB, DominatorTree *DT) const;
@@ -328,15 +305,6 @@ namespace llvm {
const SCEV *getLHS() const { return LHS; }
const SCEV *getRHS() const { return RHS; }
- virtual bool isLoopInvariant(const Loop *L) const {
- return LHS->isLoopInvariant(L) && RHS->isLoopInvariant(L);
- }
-
- virtual bool hasComputableLoopEvolution(const Loop *L) const {
- return LHS->hasComputableLoopEvolution(L) &&
- RHS->hasComputableLoopEvolution(L);
- }
-
virtual bool hasOperand(const SCEV *O) const {
return O == LHS || O == RHS || LHS->hasOperand(O) || RHS->hasOperand(O);
}
@@ -389,12 +357,6 @@ namespace llvm {
getLoop());
}
- virtual bool hasComputableLoopEvolution(const Loop *QL) const {
- return L == QL;
- }
-
- virtual bool isLoopInvariant(const Loop *QueryLoop) const;
-
bool dominates(BasicBlock *BB, DominatorTree *DT) const;
bool properlyDominates(BasicBlock *BB, DominatorTree *DT) const;
@@ -530,11 +492,6 @@ namespace llvm {
bool isAlignOf(const Type *&AllocTy) const;
bool isOffsetOf(const Type *&STy, Constant *&FieldNo) const;
- virtual bool isLoopInvariant(const Loop *L) const;
- virtual bool hasComputableLoopEvolution(const Loop *QL) const {
- return false; // not computable
- }
-
virtual bool hasOperand(const SCEV *) const {
return false;
}
OpenPOWER on IntegriCloud