aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineBlockPlacement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/MachineBlockPlacement.cpp')
-rw-r--r--lib/CodeGen/MachineBlockPlacement.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/MachineBlockPlacement.cpp b/lib/CodeGen/MachineBlockPlacement.cpp
index 45d5af2930..870e24884a 100644
--- a/lib/CodeGen/MachineBlockPlacement.cpp
+++ b/lib/CodeGen/MachineBlockPlacement.cpp
@@ -315,7 +315,7 @@ void MachineBlockPlacement::markChainSuccessors(
// This is a cross-chain edge that is within the loop, so decrement the
// loop predecessor count of the destination chain.
if (SuccChain.LoopPredecessors > 0 && --SuccChain.LoopPredecessors == 0)
- BlockWorkList.push_back(*SI);
+ BlockWorkList.push_back(*SuccChain.begin());
}
}
}
@@ -594,7 +594,7 @@ void MachineBlockPlacement::buildLoopChains(MachineFunction &F,
}
if (Chain.LoopPredecessors == 0)
- BlockWorkList.push_back(*BI);
+ BlockWorkList.push_back(*Chain.begin());
}
buildChain(*L.block_begin(), LoopChain, BlockWorkList, &LoopBlockSet);
@@ -692,7 +692,7 @@ void MachineBlockPlacement::buildCFGChains(MachineFunction &F) {
}
if (Chain.LoopPredecessors == 0)
- BlockWorkList.push_back(BB);
+ BlockWorkList.push_back(*Chain.begin());
}
BlockChain &FunctionChain = *BlockToChain[&F.front()];