[all-commits] [llvm/llvm-project] 1ab8b9: AMDGPU: Define sub-class of SGPR_64 for tail call ...

Changpeng Fang via All-commits all-commits at lists.llvm.org
Thu Apr 27 10:46:04 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1ab8b9ae159bf6048da9e7350d4c2f694912501f
      https://github.com/llvm/llvm-project/commit/1ab8b9ae159bf6048da9e7350d4c2f694912501f
  Author: Changpeng Fang <changpeng.fang at amd.com>
  Date:   2023-04-27 (Thu, 27 Apr 2023)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUISelLowering.h
    M llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.td
    M llvm/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp
    M llvm/lib/Target/AMDGPU/SIISelLowering.cpp
    M llvm/lib/Target/AMDGPU/SIInstructions.td
    M llvm/lib/Target/AMDGPU/SIRegisterInfo.td
    M llvm/test/CodeGen/AMDGPU/inline-asm.i128.ll
    M llvm/test/CodeGen/AMDGPU/partial-regcopy-and-spill-missed-at-regalloc.ll
    M llvm/test/CodeGen/AMDGPU/tail-call-amdgpu-gfx.ll

  Log Message:
  -----------
  AMDGPU: Define sub-class of SGPR_64 for tail call return

Summary:
  Registers for tail call return should not be clobbered by callee.
So we need a sub-class of SGPR_64 (excluding callee saved registers (CSR)) to hold
the tail call return address.

Because GFX and C calling conventions have different CSR, we need to define
the sub-class separately. This work is an extension of D147096 with the
consideration of GFX calling convention.

Based on the calling conventions, different instructions will be selected with
different sub-class of SGPR_64 as the input.

Reviewers: arsenm, cdevadas and sebastian-ne

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




More information about the All-commits mailing list