//===---- AMDCallingConv.td - Calling Conventions for Radeon GPUs ---------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This describes the calling conventions for the AMD Radeon GPUs. // //===----------------------------------------------------------------------===// // Inversion of CCIfInReg class CCIfNotInReg : CCIf<"!ArgFlags.isInReg()", A> {} // Calling convention for SI def CC_SI : CallingConv<[ CCIfInReg>>, CCIfInReg>>, CCIfNotInReg>>, CCIfByVal>> ]>; // Calling convention for R600 def CC_R600 : CallingConv<[ CCIfInReg>> ]>; // Calling convention for compute kernels def CC_AMDGPU_Kernel : CallingConv<[ CCCustom<"allocateStack"> ]>; def CC_AMDGPU : CallingConv<[ CCIf<"State.getTarget().getSubtarget().getGeneration() >= " "AMDGPUSubtarget::SOUTHERN_ISLANDS && " "State.getMachineFunction().getInfo()->"# "ShaderType == ShaderType::COMPUTE", CCDelegateTo>, CCIf<"State.getTarget().getSubtarget().getGeneration() < " "AMDGPUSubtarget::SOUTHERN_ISLANDS && " "State.getMachineFunction().getInfo()->" "ShaderType == ShaderType::COMPUTE", CCDelegateTo>, CCIf<"State.getTarget().getSubtarget()"# ".getGeneration() >= AMDGPUSubtarget::SOUTHERN_ISLANDS", CCDelegateTo>, CCIf<"State.getTarget().getSubtarget()"# ".getGeneration() < AMDGPUSubtarget::SOUTHERN_ISLANDS", CCDelegateTo> ]>;