LLVM: lib/Target/AArch64/GISel/AArch64CallLowering.cpp File Reference (original) (raw)

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

Go to the source code of this file.

Macros
#define DEBUG_TYPE "aarch64-call-lowering"
Functions
static void applyStackPassedSmallTypeDAGHack (EVT OrigVT, MVT &ValVT, MVT &LocVT)
static LLT getStackValueStoreTypeHack (const CCValAssign &VA)
static bool doesCalleeRestoreStack (CallingConv::ID CallConv, bool TailCallOpt)
static void handleMustTailForwardedRegisters (MachineIRBuilder &MIRBuilder, CCAssignFn *AssignFn)
Helper function to compute forwarded registers for musttail calls.
static bool canGuaranteeTCO (CallingConv::ID CC, bool GuaranteeTailCalls)
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.
static std::pair< CCAssignFn *, CCAssignFn * > getAssignFnsForCC (CallingConv::ID CC, const AArch64TargetLowering &TLI)
Returns a pair containing the fixed CCAssignFn and the vararg CCAssignFn for CC.
static unsigned getCallOpcode (const MachineFunction &CallerF, bool IsIndirect, bool IsTailCall, std::optional< CallLowering::PtrAuthInfo > &PAI, MachineRegisterInfo &MRI)
static const uint32_t * getMaskForArgs (SmallVectorImpl< AArch64CallLowering::ArgInfo > &OutArgs, AArch64CallLowering::CallLoweringInfo &Info, const AArch64RegisterInfo &TRI, MachineFunction &MF)

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

Definition in file AArch64CallLowering.cpp.

DEBUG_TYPE

#define DEBUG_TYPE "aarch64-call-lowering"

applyStackPassedSmallTypeDAGHack()

void applyStackPassedSmallTypeDAGHack ( EVT OrigVT, MVT & ValVT, MVT & LocVT ) static

canGuaranteeTCO()

doesCalleeRestoreStack()

getAssignFnsForCC()

getCallOpcode()

Definition at line 1071 of file AArch64CallLowering.cpp.

References assert(), llvm::AArch64FunctionInfo::branchProtectionPAuthLR(), llvm::AArch64FunctionInfo::branchTargetEnforcement(), llvm::getBLRCallOpcode(), llvm::MachineFunction::getInfo(), llvm::AArch64PACKey::IA, llvm::AArch64PACKey::IB, and MRI.

Referenced by llvm::AArch64CallLowering::lowerCall(), llvm::AMDGPUCallLowering::lowerCall(), llvm::ARMCallLowering::lowerCall(), and llvm::AMDGPUCallLowering::lowerTailCall().

getMaskForArgs()

getStackValueStoreTypeHack()

handleMustTailForwardedRegisters()

void handleMustTailForwardedRegisters ( MachineIRBuilder & MIRBuilder, CCAssignFn * AssignFn ) static

Helper function to compute forwarded registers for musttail calls.

Computes the forwarded registers, sets MBB liveness, and emits COPY instructions that can be used to save + restore registers later.

Definition at line 538 of file AArch64CallLowering.cpp.

References llvm::MachineFunction::addLiveIn(), llvm::CCState::analyzeMustTailForwardedRegisters(), assert(), llvm::MachineIRBuilder::buildCopy(), F, llvm::AArch64FunctionInfo::getForwardedMustTailRegParms(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getInfo(), llvm::MachineIRBuilder::getMBB(), llvm::MachineIRBuilder::getMF(), llvm::MachineFrameInfo::hasMustTailInVarArgFunc(), llvm::CCState::isAllocated(), MBB, llvm::SmallVectorTemplateBase< T, bool >::push_back(), and Register.

Referenced by llvm::AArch64CallLowering::lowerFormalArguments().

mayTailCallThisCC()

EnableSVEGISel