mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 23:17:16 +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:
@@ -473,8 +473,7 @@ bool ArgPromotion::isSafeToPromoteArgument(Argument *Arg,
|
||||
// Now check every path from the entry block to the load for transparency.
|
||||
// To do this, we perform a depth first search on the inverse CFG from the
|
||||
// loading block.
|
||||
for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI != E; ++PI) {
|
||||
BasicBlock *P = *PI;
|
||||
for (BasicBlock *P : predecessors(BB)) {
|
||||
for (idf_ext_iterator<BasicBlock*, SmallPtrSet<BasicBlock*, 16> >
|
||||
I = idf_ext_begin(P, TranspBlocks),
|
||||
E = idf_ext_end(P, TranspBlocks); I != E; ++I)
|
||||
|
||||
Reference in New Issue
Block a user