LLVM  13.0.0git
Macros | Functions
AMDGPUCallLowering.cpp File Reference
#include "AMDGPUCallLowering.h"
#include "AMDGPU.h"
#include "AMDGPULegalizerInfo.h"
#include "AMDGPUTargetMachine.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/IR/IntrinsicsAMDGPU.h"
Include dependency graph for AMDGPUCallLowering.cpp:

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. More...
 
static unsigned getCallOpcode (const MachineFunction &CallerF, bool IsIndirect, bool IsTailCall)
 
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. More...
 
static bool mayTailCallThisCC (CallingConv::ID CC)
 Return true if we might ever do TCO for calls with this calling convention. More...
 

Detailed Description

This file implements the lowering of LLVM calls to machine code calls for GlobalISel.

Definition in file AMDGPUCallLowering.cpp.

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "amdgpu-call-lowering"

Definition at line 26 of file AMDGPUCallLowering.cpp.

Function Documentation

◆ addCallTargetOperands()

static bool addCallTargetOperands ( MachineInstrBuilder CallInst,
MachineIRBuilder MIRBuilder,
AMDGPUCallLowering::CallLoweringInfo &  Info 
)
static

◆ allocateHSAUserSGPRs()

static void allocateHSAUserSGPRs ( CCState CCInfo,
MachineIRBuilder B,
MachineFunction MF,
const SIRegisterInfo TRI,
SIMachineFunctionInfo Info 
)
static

◆ canGuaranteeTCO()

static bool canGuaranteeTCO ( CallingConv::ID  CC)
static

Return true if the calling convention is one that we can guarantee TCO for.

Definition at line 1013 of file AMDGPUCallLowering.cpp.

References llvm::CallingConv::Fast.

Referenced by llvm::AMDGPUCallLowering::isEligibleForTailCallOptimization(), and mayTailCallThisCC().

◆ extOpcodeToISDExtOpcode()

static ISD::NodeType extOpcodeToISDExtOpcode ( unsigned  MIOpc)
static

◆ getAssignFnsForCC()

static std::pair<CCAssignFn *, CCAssignFn *> getAssignFnsForCC ( CallingConv::ID  CC,
const SITargetLowering TLI 
)
static

◆ getCallOpcode()

static unsigned getCallOpcode ( const MachineFunction CallerF,
bool  IsIndirect,
bool  IsTailCall 
)
static

◆ mayTailCallThisCC()

static bool mayTailCallThisCC ( CallingConv::ID  CC)
static

Return true if we might ever do TCO for calls with this calling convention.

Definition at line 1018 of file AMDGPUCallLowering.cpp.

References llvm::CallingConv::AMDGPU_Gfx, llvm::CallingConv::C, and canGuaranteeTCO().

Referenced by llvm::AMDGPUCallLowering::isEligibleForTailCallOptimization().