summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-05-06 21:34:34 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-05-06 21:34:34 +0000
commitc177fec93f6676aa38686e24843f62ec0f8a7643 (patch)
treebb42570042f65fbddfcfaca64fb042179555c25f /llvm/lib/CodeGen
parentea558e0b33f249b34fdcd99ed4bc1c718632273f (diff)
downloadbcm5719-llvm-c177fec93f6676aa38686e24843f62ec0f8a7643.tar.gz
bcm5719-llvm-c177fec93f6676aa38686e24843f62ec0f8a7643.zip
MC: Skip names of temporary symbols in object streamer
Don't create names for temporary symbols when using an object streamer. The names never make it to the output anyway. From the starting point of r236629, my heap profile says this drops peak memory usage from 1100 MB to 1058 MB for CodeGen of `verify-uselistorder`, a savings of almost 4% on peak memory, and removes `StringMap<bool, BumpPtrAllocator...>` from the profile entirely. (I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`; see r236629 for details.) llvm-svn: 236642
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/LLVMTargetMachine.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
index 61d68f60711..610c9f47bac 100644
--- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
@@ -198,6 +198,9 @@ bool LLVMTargetMachine::addPassesToEmitFile(
if (!MCE || !MAB)
return true;
+ // Don't waste memory on names of temp labels.
+ Context->setUseNamesOnTempLabels(false);
+
Triple T(getTargetTriple());
AsmStreamer.reset(getTarget().createMCObjectStreamer(
T, *Context, *MAB, Out, MCE, STI, Options.MCOptions.MCRelaxAll,
OpenPOWER on IntegriCloud