AsmPrinter: Convert DIE::Values to a linked list
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 25 Jun 2015 23:46:41 +0000 (23:46 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 25 Jun 2015 23:46:41 +0000 (23:46 +0000)
commit73e3fb6ba88bee77e46f15da4994299572cd15a0
tree7fef7c3010d82f766d082a4c53052c7071e4f4a2
parentd1ceba03338e5be36cf41a27a35c578fb983c4fb
AsmPrinter: Convert DIE::Values to a linked list

Change `DIE::Values` to a singly linked list, where each node is
allocated on a `BumpPtrAllocator`.  In order to support `push_back()`,
the list is circular, and points at the tail element instead of the
head.  I abstracted the core list logic out to `IntrusiveBackList` so
that it can be reused for `DIE::Children`, which also cares about
`push_back()`.

This drops llc memory usage from 799 MB down to 735 MB, about 8%.

(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@240733 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/iterator.h
include/llvm/CodeGen/DIE.h
lib/CodeGen/AsmPrinter/DIE.cpp
lib/CodeGen/AsmPrinter/DIEHash.cpp
lib/CodeGen/AsmPrinter/DIEHash.h
lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
lib/CodeGen/AsmPrinter/DwarfUnit.cpp
lib/CodeGen/AsmPrinter/DwarfUnit.h
tools/dsymutil/DwarfLinker.cpp
unittests/CodeGen/DIEHashTest.cpp