[PATCH] D68996: [AArch64][SVE] Spilling/filling of SVE callee-saves.

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 15 10:01:38 PDT 2019


sdesmalen created this revision.
sdesmalen added reviewers: cameron.mcinally, efriedma, greened, thegameg, ostannard.
Herald added subscribers: psnobl, dexonsmith, steven_wu, rkruppe, hiraditya, kristof.beyls, tschuett, mehdi_amini.
Herald added a reviewer: rengolin.

Implement the spills/fills of callee-saved SVE registers using STR and LDR 
instructions.

Also adds the `aarch64_sve_vector_pcs` attribute to specify the 
callee-saved registers to be used for functions that return SVE vectors or
take SVE vectors as arguments. The callee-saved registers are vector
registers z8-z23 and predicate registers p4-p15.

The overal frame-layout with SVE will be as follows:

  +-------------+
  | stack args  |
  +-------------+
  | Callee Saves|
  |   X29, X30  |
  |-------------| <- FP
  | SVE Callee  | < //////////////
  | saved regs  | < //////////////
  |    z23      | < //////////////
  |     :       | < // SCALABLE //
  |    z8       | < //////////////
  |    p15      | < /// STACK ////
  |     :       | < //////////////
  |    p4       | < //// AREA ////
  +-------------+ < //////////////
  |     :       | < //////////////
  |  SVE locals | < //////////////
  |     :       | < //////////////
  +-------------+
  |/////////////| alignment gap.
  |     :       |   
  | Stack objs  |
  |     :       |   
  +-------------+ <- SP after call and frame-setup


https://reviews.llvm.org/D68996

Files:
  lib/AsmParser/LLLexer.cpp
  lib/AsmParser/LLParser.cpp
  lib/AsmParser/LLToken.h
  lib/IR/AsmWriter.cpp
  lib/Target/AArch64/AArch64CallingConvention.td
  lib/Target/AArch64/AArch64FrameLowering.cpp
  lib/Target/AArch64/AArch64FrameLowering.h
  lib/Target/AArch64/AArch64ISelLowering.cpp
  lib/Target/AArch64/AArch64MachineFunctionInfo.h
  lib/Target/AArch64/AArch64RegisterInfo.cpp
  test/CodeGen/AArch64/framelayout-sve.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68996.225059.patch
Type: text/x-patch
Size: 30599 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191015/a199bebd/attachment-0001.bin>


More information about the llvm-commits mailing list