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 | ecb403a9d3a340009c266d05cfca2bd778c7b156 (patch) | |
tree | 013ecc3445cd680e723d4b3d5a0e7a27998c54df /lib/Analysis/ScalarEvolution.cpp | |
parent | cd76240f3d0f6c5f8c80e4762a8fe3a4de22e059 (diff) |
Factor out a common base class between SCEVCommutativeExpr and
SCEVAddRecExpr. This eliminates redundant code for visiting
all the operands of an expression.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71157 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ScalarEvolution.cpp')
-rw-r--r-- | lib/Analysis/ScalarEvolution.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 50cece0365..e00d1d9f80 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/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, |