This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Support folding of functions with identical LSDAs
ClosedPublic

Authored by int3 on Jul 14 2022, 9:25 PM.

Details

Summary

To do this, we need to slice away the LSDA pointer, just like we are
slicing away the functionAddress pointer.

No observable difference in perf on chromium_framework:

           base           diff           difference (95% CI)
sys_time   1.769 ± 0.068  1.761 ± 0.065  [  -2.7% ..   +1.8%]
user_time  9.517 ± 0.110  9.528 ± 0.116  [  -0.6% ..   +0.8%]
wall_time  8.291 ± 0.174  8.307 ± 0.183  [  -1.1% ..   +1.5%]
samples    21             25

Diff Detail

Event Timeline

int3 created this revision.Jul 14 2022, 9:25 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJul 14 2022, 9:25 PM
int3 requested review of this revision.Jul 14 2022, 9:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 14 2022, 9:25 PM
int3 planned changes to this revision.Jul 15 2022, 4:43 AM

trying alternative approach

int3 updated this revision to Diff 445097.Jul 15 2022, 12:22 PM
int3 edited the summary of this revision. (Show Details)

better approach

thakis accepted this revision.Jul 18 2022, 7:41 AM
thakis added a subscriber: thakis.

lg, i think

lld/MachO/InputFiles.cpp
1189 ↗(On Diff #445097)

nit: maybe spell out CUE once? afaict nothing in lld/MachO spells it out (I assume it's "compact unwind entry", but it's not totally obvious imho)

1195 ↗(On Diff #445097)

s/at all/are all/

lld/MachO/InputSection.cpp
349

clang-format

This revision is now accepted and ready to land.Jul 18 2022, 7:41 AM
This revision was landed with ongoing or failed builds.Jul 19 2022, 10:30 AM
This revision was automatically updated to reflect the committed changes.
int3 marked 3 inline comments as done.