[PATCH] D31964: CodeGen: BlockPlacement: Clear ComputedEdges between functions.
Kyle Butt via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 2 16:41:40 PDT 2017
iteratee updated this revision to Diff 97524.
iteratee added a comment.
Already committed in https://reviews.llvm.org/rL300022
https://reviews.llvm.org/D31964
Files:
llvm/trunk/lib/CodeGen/MachineBlockPlacement.cpp
Index: llvm/trunk/lib/CodeGen/MachineBlockPlacement.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/MachineBlockPlacement.cpp
+++ llvm/trunk/lib/CodeGen/MachineBlockPlacement.cpp
@@ -2640,6 +2640,9 @@
// there are no MachineLoops.
PreferredLoopExit = nullptr;
+ assert(BlockToChain.empty());
+ assert(ComputedEdges.empty());
+
if (TailDupPlacement) {
MPDT = &getAnalysis<MachinePostDominatorTree>();
unsigned TailDupSize = TailDupPlacementThreshold;
@@ -2649,8 +2652,6 @@
precomputeTriangleChains();
}
- assert(BlockToChain.empty());
-
buildCFGChains();
// Changing the layout can create new tail merging opportunities.
@@ -2671,6 +2672,7 @@
/*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);
@@ -2683,6 +2685,7 @@
alignBlocks();
BlockToChain.clear();
+ ComputedEdges.clear();
ChainAllocator.DestroyAll();
if (AlignAllBlock)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31964.97524.patch
Type: text/x-patch
Size: 1203 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170502/7d8dab26/attachment.bin>
More information about the llvm-commits
mailing list