AsmPrinter: Use an intrusively linked list for DIE::Children
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 25 Jun 2015 23:52:10 +0000 (23:52 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 25 Jun 2015 23:52:10 +0000 (23:52 +0000)
commit2da1484e97dad97f24ef1686480853bdf70fe836
tree0f5fdf11d204780e79dd4300a0c117d817f17ec6
parent73e3fb6ba88bee77e46f15da4994299572cd15a0
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.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240736 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/DIE.h
lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
lib/CodeGen/AsmPrinter/DIE.cpp
lib/CodeGen/AsmPrinter/DIEHash.cpp
lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
lib/CodeGen/AsmPrinter/DwarfFile.cpp
lib/CodeGen/AsmPrinter/DwarfUnit.cpp
lib/CodeGen/AsmPrinter/DwarfUnit.h
tools/dsymutil/DwarfLinker.cpp
unittests/CodeGen/DIEHashTest.cpp