diff options
author | Dan Gohman <gohman@apple.com> | 2010-08-16 16:16:11 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-08-16 16:16:11 +0000 |
commit | bb85409b510e18250c2345b57c050798a3b90213 (patch) | |
tree | ed3bfd9fdb8f827a6d6f7d7eae821ac432764ba0 | |
parent | c4f77983d82675cc45b5819d1b0693787e6baad7 (diff) |
Use iterators instead of indices in simple cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111138 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Analysis/ScalarEvolution.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 1e6c8561b0..f56151e62f 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -258,18 +258,16 @@ void SCEVCommutativeExpr::print(raw_ostream &OS) const { } bool SCEVNAryExpr::dominates(BasicBlock *BB, DominatorTree *DT) const { - for (unsigned i = 0, e = getNumOperands(); i != e; ++i) { - if (!getOperand(i)->dominates(BB, DT)) + for (op_iterator I = op_begin(), E = op_end(); I != E; ++I) + if (!(*I)->dominates(BB, DT)) return false; - } return true; } bool SCEVNAryExpr::properlyDominates(BasicBlock *BB, DominatorTree *DT) const { - for (unsigned i = 0, e = getNumOperands(); i != e; ++i) { - if (!getOperand(i)->properlyDominates(BB, DT)) + for (op_iterator I = op_begin(), E = op_end(); I != E; ++I) + if (!(*I)->properlyDominates(BB, DT)) return false; - } return true; } |