[AArch64] Prefer prologues with sp adjustments merged into stp/ldp for WinCFI, if...
authorMartin Storsjö <martin@martin.st>
Wed, 23 Sep 2020 12:00:53 +0000 (15:00 +0300)
committerMartin Storsjö <martin@martin.st>
Sat, 3 Oct 2020 18:37:22 +0000 (21:37 +0300)
commit7d07405761aec8434a0cdb1c5644823a394f7def
tree47bc87f652b27ec4c409ea25be5ec148c7b1174c
parent890af2f003c83349ff5917d80023b8b796f76489
[AArch64] Prefer prologues with sp adjustments merged into stp/ldp for WinCFI, if optimizing for size

This makes the prologue match the windows canonical layout, for
cases without a frame pointer.

This can potentially be a slower (a longer dependency chain of the
sp register, and potentially one arithmetic operation more on some
cores), but gives notable size improvements.

The previous two commits shrinks a 166 KB xdata section by 49 KB,
and if the change from this commit is enabled, it shrinks the xdata
section by another 25 KB.

In total, since the start of the recent arm64 unwind info cleanups
and optimizations (since before commit 37ef743cbf3), the xdata+pdata
sections of the same test DLL has shrunk from 407 KB in total
originally, to 163 KB now.

Differential Revision: https://reviews.llvm.org/D88701
llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
llvm/test/CodeGen/AArch64/wineh-frame-predecrement.mir [new file with mode: 0644]