This is an archive of the discontinued LLVM Phabricator instance.

[ARM SEH 4] [MC] [Win64EH] Optimize the ARM unwind info
ClosedPublic

Authored by mstorsjo on May 15 2022, 2:35 PM.

Details

Summary

Use the packed unwind info format if possible; otherwise try to
create a packed epilog.

TODO: Once D125536 and D125619 are settled, I'll update this one to
include the logic from them too.

Diff Detail

Event Timeline

mstorsjo created this revision.May 15 2022, 2:35 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 15 2022, 2:35 PM
mstorsjo requested review of this revision.May 15 2022, 2:35 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 15 2022, 2:35 PM
mstorsjo updated this revision to Diff 430340.May 18 2022, 5:12 AM

Rebased and updated after all other changes; implemented the recently landed ARM64 optimizations from D125536 and D125619, with a number of tests for those cases. Added support for fragments in packed unwind info too.

mstorsjo updated this revision to Diff 431269.May 22 2022, 2:38 PM

Updated without .seh_endepilogue_nop.

efriedma added inline comments.May 25 2022, 12:42 PM
llvm/lib/MC/MCWin64EH.cpp
1661

ARM packed unwind also works with zero epilogs. If you think that's not worth implementing, please leave a FIXME.

mstorsjo updated this revision to Diff 432098.May 25 2022, 1:01 PM

Added a FIXME comment about packed unwind info without epilogs.

mstorsjo updated this revision to Diff 432233.May 26 2022, 3:35 AM

Allow packing for functions without epilogues too.

This revision is now accepted and ready to land.May 31 2022, 5:32 PM
This revision was landed with ongoing or failed builds.Jun 1 2022, 1:26 AM
This revision was automatically updated to reflect the committed changes.