[PATCH] D125536: [MC] [MCWin64EH] Try writing an ARM64 "packed epilog" even if the epilog doesn't share opcodes with the prolog

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 13 03:59:41 PDT 2022


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

The "packed epilog" form only implies that the epilog is located
exactly at the end of the function (so the location of the epilog
is implicit from the epilog opcodes), but it doesn't have to share
opcodes with the prolog - as long as the total number of opcode
bytes and the offset to the epilog fit within the bitfields.

This avoids writing a 4 byte epilog scope in many cases. (I haven't
measured how much this shrinks actual xdata sections in practice
though.)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D125536

Files:
  llvm/lib/MC/MCWin64EH.cpp
  llvm/test/CodeGen/AArch64/wineh1.mir
  llvm/test/CodeGen/AArch64/wineh2.mir
  llvm/test/CodeGen/AArch64/wineh5.mir
  llvm/test/MC/AArch64/seh-optimize.s
  llvm/test/MC/AArch64/seh-packed-epilog.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125536.429193.patch
Type: text/x-patch
Size: 14795 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220513/8e38a3bf/attachment.bin>


More information about the llvm-commits mailing list