[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:
Manuel Jacob
2014-07-20 09:10:11 +00:00
parent 83a385a57b
commit a4697dad19
41 changed files with 166 additions and 226 deletions
+2 -2
View File
@@ -625,9 +625,9 @@ bool LazyValueInfoCache::solveBlockValueNonLocal(LVILatticeVal &BBLV,
// Loop over all of our predecessors, merging what we know from them into
// result.
bool EdgesMissing = false;
for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI != E; ++PI) {
for (BasicBlock *Pred : predecessors(BB)) {
LVILatticeVal EdgeResult;
EdgesMissing |= !getEdgeValue(Val, *PI, BB, EdgeResult);
EdgesMissing |= !getEdgeValue(Val, Pred, BB, EdgeResult);
if (EdgesMissing)
continue;