[PATCH] D31964: CodeGen: BlockPlacement: Clear ComputedEdges between functions.

Kyle Butt via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 11 17:26:06 PDT 2017


iteratee created this revision.

Not clearing was causing non-deterministic compiles for large files. Addresses
for MachineBasicBlocks would end up colliding and we would lay out a block that
we assumed had been pre-computed when it had not been.


Repository:
  rL LLVM

https://reviews.llvm.org/D31964

Files:
  lib/CodeGen/MachineBlockPlacement.cpp


Index: lib/CodeGen/MachineBlockPlacement.cpp
===================================================================
--- lib/CodeGen/MachineBlockPlacement.cpp
+++ lib/CodeGen/MachineBlockPlacement.cpp
@@ -2650,6 +2650,7 @@
   }
 
   assert(BlockToChain.empty());
+  assert(ComputedEdges.empty());
 
   buildCFGChains();
 
@@ -2683,6 +2684,7 @@
   alignBlocks();
 
   BlockToChain.clear();
+  ComputedEdges.clear();
   ChainAllocator.DestroyAll();
 
   if (AlignAllBlock)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31964.94910.patch
Type: text/x-patch
Size: 467 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170412/f9cb7227/attachment.bin>


More information about the llvm-commits mailing list