[PATCH] D17118: DwarfDebug: emit type units immediately.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 10 18:24:51 PST 2016


pcc created this revision.
pcc added a reviewer: dblaikie.
pcc added subscribers: llvm-commits, echristo, dexonsmith.

Rather than storing type units in a vector and emitting them at the end
of code generation, emit them immediately and destroy them, reclaiming the
memory we were using for their DIEs.

In one benchmark carried out against Chromium's 50 largest (by bitcode
file size) translation units, total peak memory consumption with type units
decreased by median 17%, or by 7% when compared against disabling type units.

Tested using check-{llvm,clang}, the GDB 7.5 test suite (with
'-fdebug-types-section') and by eyeballing llvm-dwarfdump output on those
Chromium translation units with split DWARF both disabled and enabled, and
verifying that the only changes were to addresses and abbreviation ordering.

http://reviews.llvm.org/D17118

Files:
  include/llvm/CodeGen/DIE.h
  include/llvm/CodeGen/DIEValue.def
  lib/CodeGen/AsmPrinter/DIE.cpp
  lib/CodeGen/AsmPrinter/DIEHash.cpp
  lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
  lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
  lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  lib/CodeGen/AsmPrinter/DwarfDebug.h
  lib/CodeGen/AsmPrinter/DwarfFile.cpp
  lib/CodeGen/AsmPrinter/DwarfFile.h
  lib/CodeGen/AsmPrinter/DwarfUnit.cpp
  lib/CodeGen/AsmPrinter/DwarfUnit.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17118.47573.patch
Type: text/x-patch
Size: 20421 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160211/95339b58/attachment.bin>


More information about the llvm-commits mailing list