[PATCH] D126948: [ARM] Make narrow push/pop in SEH prologues/epilogues where applicable

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 2 23:58:27 PDT 2022


mstorsjo created this revision.
mstorsjo added reviewers: efriedma, zzheng.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
mstorsjo requested review of this revision.
Herald added a project: LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D126948

Files:
  llvm/lib/Target/ARM/ARMFrameLowering.cpp
  llvm/test/CodeGen/ARM/Windows/wineh-opcodes.ll
  llvm/test/DebugInfo/COFF/ARMNT/arm-register-variables.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126948.433969.patch
Type: text/x-patch
Size: 6446 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220603/cbbafc22/attachment.bin>


More information about the llvm-commits mailing list