diff options
Diffstat (limited to 'llvm/lib/CodeGen/MachineSink.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineSink.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/MachineSink.cpp b/llvm/lib/CodeGen/MachineSink.cpp index 748218e..4ea8bb4 100644 --- a/llvm/lib/CodeGen/MachineSink.cpp +++ b/llvm/lib/CodeGen/MachineSink.cpp @@ -682,13 +682,9 @@ bool MachineSinking::PostponeSplitCriticalEdge(MachineInstr &MI, // There is no need to do this check if all the uses are PHI nodes. PHI // sources are only defined on the specific predecessor edges. if (!BreakPHIEdge) { - for (MachineBasicBlock::pred_iterator PI = ToBB->pred_begin(), - E = ToBB->pred_end(); PI != E; ++PI) { - if (*PI == FromBB) - continue; - if (!DT->dominates(ToBB, *PI)) + for (MachineBasicBlock *Pred : ToBB->predecessors()) + if (Pred != FromBB && !DT->dominates(ToBB, Pred)) return false; - } } ToSplit.insert(std::make_pair(FromBB, ToBB)); |