AsmPrinter: Avoid creating symbols in DwarfStringPool
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sun, 24 May 2015 16:58:59 +0000 (16:58 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sun, 24 May 2015 16:58:59 +0000 (16:58 +0000)
commit518dcb905eeb62303656e0779d29e7451bfd1188
treee2a0d3925690a5342150a151bc07daad638334b2
parentb976cabda327300280396543dc3e9f2c17806d16
AsmPrinter: Avoid creating symbols in DwarfStringPool

Stop creating symbols we don't need in `DwarfStringPool`.  The consumers
only call `DwarfStringPoolEntryRef::getSymbol()` when DWARF is
relocatable, so this just stops creating the unused symbols when it's
not.  This drops memory usage from 851 MB to 845 MB, around 0.7%.

(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@238122 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/DwarfStringPoolEntry.h
lib/CodeGen/AsmPrinter/DwarfStringPool.cpp
lib/CodeGen/AsmPrinter/DwarfStringPool.h