diff options
author | Dan Gohman <gohman@apple.com> | 2009-05-07 14:00:19 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-05-07 14:00:19 +0000 |
commit | c6bb55ba538e3a6efe1f2ead2ff837a0f4bd9e0f (patch) | |
tree | af9a36057ded2c94a1fd1a912a39c5e59dce7507 /llvm/lib/Analysis/ScalarEvolution.cpp | |
parent | 58f38113007cb729622ba6b960e3f1aab6ed3a4c (diff) | |
download | bcm5719-llvm-c6bb55ba538e3a6efe1f2ead2ff837a0f4bd9e0f.tar.gz bcm5719-llvm-c6bb55ba538e3a6efe1f2ead2ff837a0f4bd9e0f.zip |
Factor out a common base class between SCEVCommutativeExpr and
SCEVAddRecExpr. This eliminates redundant code for visiting
all the operands of an expression.
llvm-svn: 71157
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolution.cpp')
-rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index 50cece03657..e00d1d9f806 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -316,7 +316,7 @@ replaceSymbolicValuesWithConcrete(const SCEVHandle &Sym, return this; } -bool SCEVCommutativeExpr::dominates(BasicBlock *BB, DominatorTree *DT) const { +bool SCEVNAryExpr::dominates(BasicBlock *BB, DominatorTree *DT) const { for (unsigned i = 0, e = getNumOperands(); i != e; ++i) { if (!getOperand(i)->dominates(BB, DT)) return false; @@ -359,15 +359,6 @@ SCEVAddRecExpr::~SCEVAddRecExpr() { SCEVAddRecExprs->erase(std::make_pair(L, SCEVOps)); } -bool SCEVAddRecExpr::dominates(BasicBlock *BB, DominatorTree *DT) const { - for (unsigned i = 0, e = getNumOperands(); i != e; ++i) { - if (!getOperand(i)->dominates(BB, DT)) - return false; - } - return true; -} - - SCEVHandle SCEVAddRecExpr:: replaceSymbolicValuesWithConcrete(const SCEVHandle &Sym, const SCEVHandle &Conc, |