LLVM 20.0.0git
|
This file implements the lowering of LLVM calls to machine code calls for GlobalISel. More...
#include "AMDGPUCallLowering.h"
#include "AMDGPU.h"
#include "AMDGPULegalizerInfo.h"
#include "SIMachineFunctionInfo.h"
#include "SIRegisterInfo.h"
#include "llvm/CodeGen/Analysis.h"
#include "llvm/CodeGen/FunctionLoweringInfo.h"
#include "llvm/CodeGen/GlobalISel/MachineIRBuilder.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/IR/IntrinsicsAMDGPU.h"
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "amdgpu-call-lowering" |
Functions | |
static ISD::NodeType | extOpcodeToISDExtOpcode (unsigned MIOpc) |
static void | allocateHSAUserSGPRs (CCState &CCInfo, MachineIRBuilder &B, MachineFunction &MF, const SIRegisterInfo &TRI, SIMachineFunctionInfo &Info) |
static std::pair< CCAssignFn *, CCAssignFn * > | getAssignFnsForCC (CallingConv::ID CC, const SITargetLowering &TLI) |
Returns a pair containing the fixed CCAssignFn and the vararg CCAssignFn for CC. | |
static unsigned | getCallOpcode (const MachineFunction &CallerF, bool IsIndirect, bool IsTailCall, bool isWave32, CallingConv::ID CC) |
static bool | addCallTargetOperands (MachineInstrBuilder &CallInst, MachineIRBuilder &MIRBuilder, AMDGPUCallLowering::CallLoweringInfo &Info) |
static bool | canGuaranteeTCO (CallingConv::ID CC) |
Return true if the calling convention is one that we can guarantee TCO for. | |
static bool | mayTailCallThisCC (CallingConv::ID CC) |
Return true if we might ever do TCO for calls with this calling convention. | |
This file implements the lowering of LLVM calls to machine code calls for GlobalISel.
Definition in file AMDGPUCallLowering.cpp.
#define DEBUG_TYPE "amdgpu-call-lowering" |
Definition at line 26 of file AMDGPUCallLowering.cpp.
|
static |
Definition at line 972 of file AMDGPUCallLowering.cpp.
References llvm::MachineIRBuilder::buildGlobalValue(), llvm::GlobalValue::getAddressSpace(), Info, llvm::LLT::pointer(), and Ptr.
Referenced by llvm::AMDGPUCallLowering::lowerCall(), and llvm::AMDGPUCallLowering::lowerTailCall().
|
static |
Definition at line 448 of file AMDGPUCallLowering.cpp.
References llvm::MachineFunction::addLiveIn(), llvm::CCState::AllocateReg(), B, llvm::AMDGPUAS::CONSTANT_ADDRESS, llvm::MachineFunction::getRegInfo(), llvm::GCNUserSGPRUsageInfo::hasDispatchID(), llvm::GCNUserSGPRUsageInfo::hasDispatchPtr(), llvm::GCNUserSGPRUsageInfo::hasFlatScratchInit(), llvm::GCNUserSGPRUsageInfo::hasKernargSegmentPtr(), llvm::GCNUserSGPRUsageInfo::hasPrivateSegmentBuffer(), llvm::GCNUserSGPRUsageInfo::hasQueuePtr(), Info, MRI, llvm::LLT::pointer(), and TRI.
Referenced by llvm::AMDGPUCallLowering::lowerFormalArgumentsKernel().
|
static |
Return true if the calling convention is one that we can guarantee TCO for.
Definition at line 1076 of file AMDGPUCallLowering.cpp.
References CC, and llvm::CallingConv::Fast.
|
static |
Definition at line 262 of file AMDGPUCallLowering.cpp.
References llvm::ISD::ANY_EXTEND, llvm_unreachable, llvm::ISD::SIGN_EXTEND, and llvm::ISD::ZERO_EXTEND.
|
static |
Returns a pair containing the fixed CCAssignFn and the vararg CCAssignFn for CC.
Definition at line 950 of file AMDGPUCallLowering.cpp.
References CC, and llvm::AMDGPUTargetLowering::CCAssignFnForCall().
|
static |
Definition at line 954 of file AMDGPUCallLowering.cpp.
References llvm::CallingConv::AMDGPU_Gfx, assert(), CC, and llvm::AMDGPU::isChainCC().
|
static |
Return true if we might ever do TCO for calls with this calling convention.
Definition at line 1081 of file AMDGPUCallLowering.cpp.
References llvm::CallingConv::AMDGPU_Gfx, llvm::CallingConv::C, canGuaranteeTCO(), and CC.