mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-23 14:25:07 +00:00
Add range iterators for post order and inverse post order. Use them
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235026 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -797,9 +797,8 @@ bool EarlyIfConverter::runOnMachineFunction(MachineFunction &MF) {
|
||||
// if-conversion in a single pass. The tryConvertIf() function may erase
|
||||
// blocks, but only blocks dominated by the head block. This makes it safe to
|
||||
// update the dominator tree while the post-order iterator is still active.
|
||||
for (po_iterator<MachineDominatorTree*>
|
||||
I = po_begin(DomTree), E = po_end(DomTree); I != E; ++I)
|
||||
if (tryConvertIf(I->getBlock()))
|
||||
for (auto DomNode : post_order(DomTree))
|
||||
if (tryConvertIf(DomNode->getBlock()))
|
||||
Changed = true;
|
||||
|
||||
return Changed;
|
||||
|
Reference in New Issue
Block a user