diff options
| author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-06-25 23:52:10 +0000 |
|---|---|---|
| committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-06-25 23:52:10 +0000 |
| commit | 827200c822c83e4a4aae448683d2f90cc657a0a4 (patch) | |
| tree | eb6e618df696b9e9ec9d82d11fd75503d15d0240 /llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp | |
| parent | 41011f6706e37cecab4797e4e95a9273ca999930 (diff) | |
| download | bcm5719-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/DwarfFile.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp index 408d3798b66..51b27b462a7 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); |

