This is an archive of the discontinued LLVM Phabricator instance.

DwarfDebug: emit type units immediately.
ClosedPublic

Authored by pcc on Feb 10 2016, 6:24 PM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

pcc updated this revision to Diff 47573.Feb 10 2016, 6:24 PM
pcc retitled this revision from to DwarfDebug: emit type units immediately..
pcc updated this object.
pcc added a reviewer: dblaikie.
pcc added subscribers: llvm-commits, echristo, dexonsmith.
dblaikie accepted this revision.Feb 11 2016, 11:03 AM
dblaikie edited edge metadata.

Looks great, really neat/tidy/not painful at all - thanks a bunch!

This revision is now accepted and ready to land.Feb 11 2016, 11:03 AM

LGTM too. Thanks Peter!

echristo accepted this revision.Feb 11 2016, 11:56 AM
echristo added a reviewer: echristo.

Swanky, do it.

-eric

This revision was automatically updated to reflect the committed changes.