summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-06-25 23:52:10 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-06-25 23:52:10 +0000
commit827200c822c83e4a4aae448683d2f90cc657a0a4 (patch)
treeeb6e618df696b9e9ec9d82d11fd75503d15d0240 /llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
parent41011f6706e37cecab4797e4e95a9273ca999930 (diff)
downloadbcm5719-llvm-827200c822c83e4a4aae448683d2f90cc657a0a4.tar.gz
bcm5719-llvm-827200c822c83e4a4aae448683d2f90cc657a0a4.zip
AsmPrinter: Use an intrusively linked list for DIE::Children
Replace the `std::vector<>` for `DIE::Children` with an intrusively linked list. This is a strict memory improvement: it requires no auxiliary storage, and reduces `sizeof(DIE)` by one pointer. It also factors out the DIE-related malloc traffic. This drops llc memory usage from 735 MB down to 718 MB, or ~2.3%. (I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`; see r236629 for details.) llvm-svn: 240736
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
index de0ef33a9ed..ad180b6667c 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
@@ -277,7 +277,7 @@ void AsmPrinter::emitDwarfDIE(const DIE &Die) const {
// Emit the DIE children if any.
if (Die.hasChildren()) {
for (auto &Child : Die.children())
- emitDwarfDIE(*Child);
+ emitDwarfDIE(Child);
OutStreamer->AddComment("End Of Children Mark");
EmitInt8(0);
OpenPOWER on IntegriCloud