summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
diff options
context:
space:
mode:
authorManuel Jacob <me@manueljacob.de>2014-07-20 09:10:11 +0000
committerManuel Jacob <me@manueljacob.de>2014-07-20 09:10:11 +0000
commitd11beffef4f1117aceb9f2f5532b4a317c30c05a (patch)
treec0a3aa5e2d4225971366e16eac335aacf32f9eed /llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
parent4100ebd67b61abfb7fc7728e9af5dcc6e51327be (diff)
downloadbcm5719-llvm-d11beffef4f1117aceb9f2f5532b4a317c30c05a.tar.gz
bcm5719-llvm-d11beffef4f1117aceb9f2f5532b4a317c30c05a.zip
[C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator ranges.
Summary: This patch introduces two new iterator ranges and updates existing code to use it. No functional change intended. Test Plan: All tests (make check-all) still pass. Reviewers: dblaikie Reviewed By: dblaikie Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D4481 llvm-svn: 213474
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
index a96c46ad63e..ce420ee4bf0 100644
--- a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
+++ b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
@@ -66,9 +66,8 @@ static void ConnectProlog(Loop *L, Value *TripCount, unsigned Count,
// The new PHI node is inserted in the prolog end basic block.
// The new PHI name is added as an operand of a PHI node in either
// the loop header or the loop exit block.
- for (succ_iterator SBI = succ_begin(Latch), SBE = succ_end(Latch);
- SBI != SBE; ++SBI) {
- for (BasicBlock::iterator BBI = (*SBI)->begin();
+ for (BasicBlock *Succ : successors(Latch)) {
+ for (BasicBlock::iterator BBI = Succ->begin();
PHINode *PN = dyn_cast<PHINode>(BBI); ++BBI) {
// Add a new PHI node to the prolog end block and add the
OpenPOWER on IntegriCloud