[all-commits] [llvm/llvm-project] 46416f: [CodeGen] [WinException] Remove a redundant explic...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Fri Sep 11 00:31:30 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 46416f08031f6fcaccd9f51430f7a71c5f510495
      https://github.com/llvm/llvm-project/commit/46416f08031f6fcaccd9f51430f7a71c5f510495
  Author: Martin Storsjö <martin at martin.st>
  Date:   2020-09-11 (Fri, 11 Sep 2020)

  Changed paths:
    M llvm/lib/CodeGen/AsmPrinter/WinException.cpp
    M llvm/test/CodeGen/AArch64/win64-jumptable.ll
    M llvm/test/CodeGen/AArch64/wineh-mingw.ll
    M llvm/test/CodeGen/AArch64/wineh1.mir

  Log Message:
  -----------
  [CodeGen] [WinException] Remove a redundant explicit section switch for aarch64

The following EmitWinEHHandlerData() implicitly switches to .xdata, just
like on x86_64.

This became orphaned from the original code requiring it in
0b61d220c9b1f0 / https://reviews.llvm.org/D61095.

Differential Revision: https://reviews.llvm.org/D87447


  Commit: 700fbe591ac0f29c76e9f2bd77d752d4bd56d274
      https://github.com/llvm/llvm-project/commit/700fbe591ac0f29c76e9f2bd77d752d4bd56d274
  Author: Martin Storsjö <martin at martin.st>
  Date:   2020-09-11 (Fri, 11 Sep 2020)

  Changed paths:
    M llvm/lib/MC/MCWin64EH.cpp
    M llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
    A llvm/test/MC/AArch64/seh-optimize.s
    M llvm/test/MC/AArch64/seh.s

  Log Message:
  -----------
  [MC] [Win64EH] Canonicalize ARM64 unwind opcodes

Convert 2-byte opcodes to equivalent 1-byte ones.

Adjust the existing exhaustive testcase to avoid being altered by
the simplification rules (to keep that test exercising all individual
opcodes).

Fix the assembler parser limits for register pairs; for .seh_save_regp
and .seh_save_regp_x, we can allow up to x29, for a x29+x30 pair
(which gets remapped to the UOP_SaveFPLR(X) opcodes), for .seh_save_fregp
and .seh_save_fregpx, allow up to d14+d15.

Not creating .seh_save_next for float register pairs, as the
actual unwinder implementation in current versions of Windows is buggy
for that case.

This gives a minimal but measurable size reduction. (For a 6.5 MB
DLL with 300 KB .xdata, the .xdata shrinks by 48 bytes. The opcode
sequences are padded to a 4 byte boundary, so very small improvements
might not end up mattering directly.)

Differential Revision: https://reviews.llvm.org/D87367


  Commit: 1308bb99e06752ab0b5175c92da31083f91af921
      https://github.com/llvm/llvm-project/commit/1308bb99e06752ab0b5175c92da31083f91af921
  Author: Martin Storsjö <martin at martin.st>
  Date:   2020-09-11 (Fri, 11 Sep 2020)

  Changed paths:
    M llvm/include/llvm/MC/MCWinEH.h
    M llvm/lib/MC/MCWin64EH.cpp
    M llvm/test/CodeGen/AArch64/wineh3.mir
    M llvm/test/CodeGen/AArch64/wineh6.mir
    M llvm/test/CodeGen/AArch64/wineh7.mir
    A llvm/test/MC/AArch64/seh-packed-epilog.s
    M llvm/test/MC/AArch64/seh.s

  Log Message:
  -----------
  [MC] [Win64EH] Write packed ARM64 epilogues if possible

This gives a pretty substantial size reduction; for a 6.5 MB
DLL with 300 KB .xdata, the .xdata shrinks by 66 KB.

Differential Revision: https://reviews.llvm.org/D87369


Compare: https://github.com/llvm/llvm-project/compare/e38be7091ee3...1308bb99e067


More information about the All-commits mailing list