This is an archive of the discontinued LLVM Phabricator instance.

Turn DISubprogram into a variable-length node
ClosedPublic

Authored by aprantl on Apr 26 2017, 2:30 PM.

Details

Summary

DISubprogram currently has 10 pointer operands, several of which are
often a nullptr. This patch reduces the amount of memory allocated by
DISubprogram by rearranging the operands such that containing type,
template params, and thrown types come last, and are only allocated
when they are non-null (or followed by non-null operands).

This patch also eliminates the entirely unused DisplayName operand.

This saves up to 4 pointer operands per DISubprogram. (I tried
measuring the effect on peak memory usage on an LTO link of an X86
llc, but the results were very noisy).

Diff Detail

Event Timeline

aprantl created this revision.Apr 26 2017, 2:30 PM
dblaikie accepted this revision.Apr 26 2017, 2:45 PM
This revision is now accepted and ready to land.Apr 26 2017, 2:45 PM
aprantl closed this revision.Apr 26 2017, 4:58 PM

r301498