//===---- 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>> ]>; // Calling convention for SI compute kernels def CC_SI_Kernel : CallingConv<[ CCIfType<[i64], CCAssignToStack <8, 4>>, CCIfType<[i32, f32], CCAssignToStack <4, 4>>, CCIfType<[i16], CCAssignToStack <2, 4>>, CCIfType<[i8], CCAssignToStack <1, 4>> ]>; def CC_AMDGPU : CallingConv<[ CCIf<"State.getMachineFunction().getInfo()->"# "ShaderType == ShaderType::COMPUTE", CCDelegateTo>, CCIf<"State.getTarget().getSubtarget()"# ".getGeneration() == AMDGPUSubtarget::SOUTHERN_ISLANDS", CCDelegateTo> ]>;