[PATCH] D61437: [AArch64] Static (de)allocation of SVE stack objects.

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 2 05:38:36 PDT 2019


sdesmalen created this revision.
sdesmalen added reviewers: thegameg, rovka, t.p.northover, efriedma.
Herald added subscribers: kristof.beyls, tschuett, javed.absar.

Adds support to AArch64FrameLowering to allocate fixed-stack SVE objects.

The focus of this patch is purely to allow the stack frame to 
allocate/deallocate space for scalable SVE objects. Dynamic allocation
(i.e. determining placement of SVE objects on the stack), or resolving
frame-index references that include both scalable- and fixed-size offsets,
are left for future patches.

SVE objects are allocated in the stack frame as a separate region above the 
non-SVE stack objects, CSRs and the FrameRecord. The benefit of allocating 
SVE objects in this way is that the layout and (de)allocation of non-SVE
objects remains the same as without the presence of SVE objects. This is
also true for saving/restoring of callee-saved registers, and SP/FP(/BP)
addressing of stack objects. The only exception here are accesses to stack
arguments in the presence of SVE stack objects, which would need to point
'over' the SVE region. Addressing of stack objects will be handled in
separate patches.

In this patch SVE and non-SVE stack objects are distinguished using 
different StackIDs. The offsets for objects with StackID `ST_SVEVector`
should be interpreted as purely scalable offsets within their respective
SVE region.


https://reviews.llvm.org/D61437

Files:
  lib/Target/AArch64/AArch64FrameLowering.cpp
  lib/Target/AArch64/AArch64FrameLowering.h
  lib/Target/AArch64/AArch64InstrInfo.cpp
  lib/Target/AArch64/AArch64MachineFunctionInfo.h
  lib/Target/AArch64/AArch64StackOffset.h
  test/CodeGen/AArch64/framelayout-sve.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61437.197754.patch
Type: text/x-patch
Size: 17484 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190502/93580f40/attachment.bin>


More information about the llvm-commits mailing list