pnodet opened PR #13055 from pnodet:aarch64-opt2-lr-only to bytecodealliance:main.
pnodet edited PR #13055:
This updates AArch64 prologue/epilogue generation to use an LR-only linkage frame for a narrow set of simple regular-call functions. Instead of always doing + and restoring both registers, we now use with the same 16-byte stack adjustment when it’s safe to do so.
The optimization is intentionally conservative. It does not apply when frame pointers are required, when unwind info is enabled, when return-address signing is enabled, or when the frame layout needs full FP-based setup. In those cases we keep the existing FP/LR path unchanged.
The goal is to trim unnecessary frame setup/teardown work in the common eligible cases while preserving ABI alignment and keeping behavior identical outside that narrow window.
pnodet edited PR #13055:
This updates AArch64 prologue/epilogue generation to use an LR-only linkage frame for a narrow set of simple regular-call functions. Instead of always doing
stp fp, lr+mov fp, spand restoring both registers, we now usestr/ldr lrwith the same 16-byte stack adjustment when it’s safe to do so.The optimization is intentionally conservative. It does not apply when frame pointers are required, when unwind info is enabled, when return-address signing is enabled, or when the frame layout needs full FP-based setup. In those cases we keep the existing FP/LR path unchanged.
The goal is to trim unnecessary frame setup/teardown work in the common eligible cases while preserving ABI alignment and keeping behavior identical outside that narrow window.
github-actions[bot] added the label cranelift on PR #13055.
github-actions[bot] added the label cranelift:area:aarch64 on PR #13055.
Last updated: Apr 12 2026 at 23:10 UTC