This is an archive of the discontinued LLVM Phabricator instance.

[Frontend] shrink in-memory PCH buffers to fit
ClosedPublic

Authored by sammccall on Apr 22 2022, 3:02 AM.

Details

Summary

After building a PCH, the vector capacity is on average ~1/3 unused.
If we're going to keep it in memory for a while, reallocate to the right size.
Take care to do this once clang is destroyed so that we can reuse its
memory rather than requesting more.

Diff Detail

Event Timeline

sammccall created this revision.Apr 22 2022, 3:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 22 2022, 3:02 AM
sammccall requested review of this revision.Apr 22 2022, 3:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 22 2022, 3:02 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
kadircet accepted this revision.Apr 22 2022, 9:09 AM
This revision is now accepted and ready to land.Apr 22 2022, 9:09 AM
This revision was landed with ongoing or failed builds.Apr 25 2022, 5:32 AM
This revision was automatically updated to reflect the committed changes.