AsmPrinter: Remove the vtable-entry from DIEValue
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 23 May 2015 01:45:07 +0000 (01:45 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 23 May 2015 01:45:07 +0000 (01:45 +0000)
commitb5f8c9b2ecf0812070a9b33c2e950f923b044451
tree7dd4135ce77c150760416df8a99418f371cce544
parent804c199b75a717164144cccd1ccbbdab370cf958
AsmPrinter: Remove the vtable-entry from DIEValue

Remove all virtual functions from `DIEValue`, dropping the vtable
pointer from its layout.  Instead, create "impl" functions on the
subclasses, and use the `DIEValue::Type` to implement the dynamic
dispatch.

This is necessary -- obviously not sufficient -- for passing `DIEValue`s
around by value.  However, this change stands on its own: we make tons
of these.  I measured a drop in memory usage from 888 MB down to 860 MB,
or around 3.2%.

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