mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +00:00
[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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213474 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user