This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Deduplicate the `__objc_classrefs` section contents
ClosedPublic

Authored by int3 on Mar 5 2022, 9:51 AM.

Details

Summary

ld64 breaks down __objc_classrefs on a per-word level and deduplicates
them. This greatly reduces the number of bind entries emitted (and
therefore the amount of work dyld has to do at runtime). For
chromium_framework, this change to LLD cuts the number of (non-lazy)
binds from 912 to 190, getting us to parity with ld64 in this aspect.

Diff Detail

Event Timeline

int3 created this revision.Mar 5 2022, 9:51 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMar 5 2022, 9:51 AM
int3 requested review of this revision.Mar 5 2022, 9:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 5 2022, 9:51 AM
thakis accepted this revision.Mar 6 2022, 12:59 PM
thakis added a subscriber: thakis.
thakis added inline comments.
lld/MachO/InputFiles.cpp
264

no else after return

This revision is now accepted and ready to land.Mar 6 2022, 12:59 PM
int3 updated this revision to Diff 413352.Mar 7 2022, 12:05 AM
int3 marked an inline comment as done.

address comment

This revision was landed with ongoing or failed builds.Mar 8 2022, 5:34 AM
This revision was automatically updated to reflect the committed changes.