aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfFile.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/DwarfFile.cpp
parent41011f6706e37cecab4797e4e95a9273ca999930 (diff)
downloadllvm-827200c822c83e4a4aae448683d2f90cc657a0a4.zip
llvm-827200c822c83e4a4aae448683d2f90cc657a0a4.tar.gz
llvm-827200c822c83e4a4aae448683d2f90cc657a0a4.tar.bz2
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/DwarfFile.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp
index 408d379..51b27b4 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp
@@ -111,7 +111,7 @@ unsigned DwarfFile::computeSizeAndOffset(DIE &Die, unsigned Offset) {
assert(Abbrev.hasChildren() && "Children flag not set");
for (auto &Child : Die.children())
- Offset = computeSizeAndOffset(*Child, Offset);
+ Offset = computeSizeAndOffset(Child, Offset);
// End of children marker.
Offset += sizeof(int8_t);