aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/MachineBlockPlacement.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-11-14 10:57:23 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-11-14 10:57:23 +0000
commitf5e47ac596c698f1659c86bdad3a60056e68439c (patch)
tree5ba1f683eebaa2316efb74fb527cf663284e368e /lib/CodeGen/MachineBlockPlacement.cpp
parentbc83fcd9bd95f8eff83cd5ad77b0aa5312d8a6a5 (diff)
downloadexternal_llvm-f5e47ac596c698f1659c86bdad3a60056e68439c.zip
external_llvm-f5e47ac596c698f1659c86bdad3a60056e68439c.tar.gz
external_llvm-f5e47ac596c698f1659c86bdad3a60056e68439c.tar.bz2
It helps to deallocate memory as well as allocate it. =] This actually
cleans up all the chains allocated during the processing of each function so that for very large inputs we don't just grow memory usage without bound. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144533 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineBlockPlacement.cpp')
-rw-r--r--lib/CodeGen/MachineBlockPlacement.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineBlockPlacement.cpp b/lib/CodeGen/MachineBlockPlacement.cpp
index 412d0b1..304f167 100644
--- a/lib/CodeGen/MachineBlockPlacement.cpp
+++ b/lib/CodeGen/MachineBlockPlacement.cpp
@@ -766,6 +766,7 @@ bool MachineBlockPlacement::runOnMachineFunction(MachineFunction &F) {
AlignLoops(F);
BlockToChain.clear();
+ ChainAllocator.DestroyAll();
// We always return true as we have no way to track whether the final order
// differs from the original order.