Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Phabricator shutdown timeline

[BOLT] Speedup symbol table sort
ClosedPublic

Authored by maksfb on Sun, Sep 17, 1:08 PM.

Details

Summary

Memoize SymbolRef::getAddress() for sorting symbol table entries by
their address. Saves about 10 seconds of processing time on large
binaries with over 2 million symbols. NFCI.

Diff Detail

Event Timeline

maksfb created this revision.Sun, Sep 17, 1:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptSun, Sep 17, 1:08 PM
Herald added a subscriber: treapster. · View Herald Transcript
maksfb requested review of this revision.Sun, Sep 17, 1:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptSun, Sep 17, 1:08 PM
jobnoorman accepted this revision.Mon, Sep 18, 12:59 AM
jobnoorman added inline comments.
bolt/lib/Rewrite/RewriteInstance.cpp
820

emplace_back?

This revision is now accepted and ready to land.Mon, Sep 18, 12:59 AM
Amir accepted this revision.Mon, Sep 18, 10:30 AM
This revision was automatically updated to reflect the committed changes.
maksfb marked an inline comment as done.Mon, Sep 18, 11:30 AM
maksfb added inline comments.
bolt/lib/Rewrite/RewriteInstance.cpp
820

Doesn't work with structs.