[all-commits] [llvm/llvm-project] 26dc28: [AMDGPU] ISel for amdgpu_cs_chain[_preserve] funct...

Diana via All-commits all-commits at lists.llvm.org
Mon Aug 21 02:16:51 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 26dc2844984204bb91245f6af6b9a685da47a9a5
      https://github.com/llvm/llvm-project/commit/26dc2844984204bb91245f6af6b9a685da47a9a5
  Author: Diana Picus <Diana-Magda.Picus at amd.com>
  Date:   2023-08-21 (Mon, 21 Aug 2023)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUCallingConv.td
    M llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
    M llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
    M llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
    M llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
    A llvm/test/CodeGen/AMDGPU/amdgpu-cs-chain-cc.ll
    A llvm/test/CodeGen/AMDGPU/amdgpu-cs-chain-preserve-cc.ll
    A llvm/test/CodeGen/AMDGPU/isel-amdgpu-cs-chain-cc.ll
    A llvm/test/CodeGen/AMDGPU/isel-amdgpu-cs-chain-preserve-cc.ll

  Log Message:
  -----------
  [AMDGPU] ISel for amdgpu_cs_chain[_preserve] functions

Lower formal arguments and returns for functions with the
`amdgpu_cs_chain` and `amdgpu_cs_chain_preserve` calling conventions:

* Put `inreg` arguments into SGPRs, starting at s0, and other arguments
into VGPRs, starting at v8. No arguments should end up on the stack, if
we don't have enough registers we should error out.

* Lower the return (which is always void) as an S_ENDPGM.

* Set the ScratchRSrc register to s48:51, as described in the docs.

* Set the SP to s32, matching amdgpu_gfx. This might be revisited in a
future patch.

Differential Revision: https://reviews.llvm.org/D153517




More information about the All-commits mailing list