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.

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()

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

canGuaranteeTCO()

doesCalleeRestoreStack()

getAssignFnsForCC()

getCallOpcode()

getMaskForArgs()

getStackValueStoreTypeHack()

handleMustTailForwardedRegisters()

static 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 489 of file AArch64CallLowering.cpp.

References llvm::MachineBasicBlock::addLiveIn(), 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, and llvm::SmallVectorTemplateBase< T, bool >::push_back().

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

mayTailCallThisCC()

EnableSVEGISel