This is an archive of the discontinued LLVM Phabricator instance.

Don't create a temporary DenseMap for each input .eh_frame
ClosedPublic

Authored by espindola on Apr 27 2018, 1:07 PM.

Details

Reviewers
ruiu
grimar
Summary

These maps are small, but we are creating an destroying one for each input .eh_frame.

This patch reduces the total memory allocation from 765.54MB to 749.19MB. The peak is still the same: 563.7MB.

Diff Detail

Event Timeline

espindola created this revision.Apr 27 2018, 1:07 PM
espindola retitled this revision from Don't create a temporary CieMap for each input .eh_frame to Don't create a temporary DenseMap for each input .eh_frame.Apr 27 2018, 1:07 PM
ruiu accepted this revision.Apr 27 2018, 1:12 PM

LGTM

ELF/SyntheticSections.h
89

Please add a comment to explain that this doesn't have to be a member from the point of view of correctness, but we do this to reuse allocated buffer.

This revision is now accepted and ready to land.Apr 27 2018, 1:12 PM