// there are no MachineLoops.
PreferredLoopExit = nullptr;
+ assert(BlockToChain.empty());
+ assert(ComputedEdges.empty());
+
if (TailDupPlacement) {
MPDT = &getAnalysis<MachinePostDominatorTree>();
unsigned TailDupSize = TailDupPlacementThreshold;
precomputeTriangleChains();
}
- assert(BlockToChain.empty());
-
buildCFGChains();
// Changing the layout can create new tail merging opportunities.
/*AfterBlockPlacement=*/true)) {
// Redo the layout if tail merging creates/removes/moves blocks.
BlockToChain.clear();
+ ComputedEdges.clear();
// Must redo the post-dominator tree if blocks were changed.
if (MPDT)
MPDT->runOnMachineFunction(MF);
alignBlocks();
BlockToChain.clear();
+ ComputedEdges.clear();
ChainAllocator.DestroyAll();
if (AlignAllBlock)