This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Make narrow push/pop in SEH prologues/epilogues where applicable
ClosedPublic

Authored by mstorsjo on Jun 2 2022, 11:58 PM.

Details

Summary

We intentionally disable Thumb2SizeReduction for SEH
prologues/epilogues, to avoid needing to guess what will happen with
the instructions in a potential future pass in frame lowering.

But for this specific case, where we know we can express the
intent with a narrow instruction, change to that instruction form
directly in frame lowering.

I'm unsure if there's some other set of MachineInstr properties I should
copy over here - I didn't try to follow all the generic bits of
Thumb2SizeReduction - this at least seems to work for my testcases;
it only needs to work for these three specific instructions.

Diff Detail

Event Timeline

mstorsjo created this revision.Jun 2 2022, 11:58 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 2 2022, 11:58 PM
mstorsjo requested review of this revision.Jun 2 2022, 11:58 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 2 2022, 11:58 PM
This revision is now accepted and ready to land.Jun 3 2022, 11:09 AM