[PATCH] D142711: AArch64: count call stack when working out if scavenging is needed

Tim Northover via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 27 05:48:17 PST 2023


t.p.northover created this revision.
Herald added subscribers: hiraditya, kristof.beyls, mcrosier.
Herald added a project: All.
t.p.northover requested review of this revision.
Herald added a project: LLVM.

We try to guess whether we'll need extra registers or slots to handle large stack offsets (bigger than a single `[sp, #N]` can handle). This calculation needs to take into account stack that's in the caller's frame, either our own args or involved in calls we make.

Bit of a messy test, but it needs to both have lots of args to actually use significant stack, and be opaque enough that it also uses many registers. So the usual `[8 x i64]` tricks to quickly use args don't work.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142711

Files:
  llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
  llvm/test/CodeGen/AArch64/arm64-stackmap.ll
  llvm/test/CodeGen/AArch64/arm64-subvector-extend.ll
  llvm/test/CodeGen/AArch64/neon-dotreduce.ll
  llvm/test/CodeGen/AArch64/scavenge-large-call.ll
  llvm/test/CodeGen/AArch64/stackmap.ll
  llvm/test/CodeGen/AArch64/sve-fixed-length-frame-offests-crash.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142711.492718.patch
Type: text/x-patch
Size: 75749 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230127/46c4761a/attachment-0001.bin>


More information about the llvm-commits mailing list