AsmPrinter: Make DIEString small
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sun, 24 May 2015 16:40:47 +0000 (16:40 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sun, 24 May 2015 16:40:47 +0000 (16:40 +0000)
commit24ad5c9e050b6a8798a98f1da2d3473d7650390e
tree2f9436213861802607de0a2c615dd7f1495ca6eb
parent17177280669918513b259c6830774dd99d5d7901
AsmPrinter: Make DIEString small

Expose the `DwarfStringPool` entry in a header, and store a pointer to
it directly in `DIEString`.  Instead of choosing at creation time how to
emit it, use the `dwarf::Form` to determine that at emission time.
Besides avoiding the other `DIEValue`, this shaves two pointers off of
`DIEString`; the data is now a single pointer.  This is a nice cleanup
on its own -- and drops memory usage from 861 MB down to 853 MB, around
0.9% -- but it's also preparation for passing `DIEValue`s by value.

(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@238117 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/DIE.h
lib/CodeGen/AsmPrinter/DIE.cpp
lib/CodeGen/AsmPrinter/DwarfUnit.cpp
unittests/CodeGen/DIEHashTest.cpp