LLVM 20.0.0git
|
CCState - This class holds information needed while lowering arguments and return values. More...
#include "llvm/CodeGen/CallingConvLower.h"
Public Member Functions | |
CCState (CallingConv::ID CC, bool IsVarArg, MachineFunction &MF, SmallVectorImpl< CCValAssign > &Locs, LLVMContext &Context, bool NegativeOffsets=false) | |
void | addLoc (const CCValAssign &V) |
LLVMContext & | getContext () const |
MachineFunction & | getMachineFunction () const |
CallingConv::ID | getCallingConv () const |
bool | isVarArg () const |
uint64_t | getStackSize () const |
Returns the size of the currently allocated portion of the stack. | |
uint64_t | getAlignedCallFrameSize () const |
getAlignedCallFrameSize - Return the size of the call frame needed to be able to store all arguments and such that the alignment requirement of each of the arguments is satisfied. | |
bool | isAllocated (MCRegister Reg) const |
isAllocated - Return true if the specified register (or an alias) is allocated. | |
void | AnalyzeFormalArguments (const SmallVectorImpl< ISD::InputArg > &Ins, CCAssignFn Fn) |
AnalyzeFormalArguments - Analyze an array of argument values, incorporating info about the formals into this state. | |
void | AnalyzeArguments (const SmallVectorImpl< ISD::InputArg > &Ins, CCAssignFn Fn) |
The function will invoke AnalyzeFormalArguments. | |
void | AnalyzeReturn (const SmallVectorImpl< ISD::OutputArg > &Outs, CCAssignFn Fn) |
AnalyzeReturn - Analyze the returned values of a return, incorporating info about the result values into this state. | |
bool | CheckReturn (const SmallVectorImpl< ISD::OutputArg > &Outs, CCAssignFn Fn) |
CheckReturn - Analyze the return values of a function, returning true if the return can be performed without sret-demotion, and false otherwise. | |
void | AnalyzeCallOperands (const SmallVectorImpl< ISD::OutputArg > &Outs, CCAssignFn Fn) |
AnalyzeCallOperands - Analyze the outgoing arguments to a call, incorporating info about the passed values into this state. | |
void | AnalyzeCallOperands (SmallVectorImpl< MVT > &ArgVTs, SmallVectorImpl< ISD::ArgFlagsTy > &Flags, CCAssignFn Fn) |
AnalyzeCallOperands - Same as above except it takes vectors of types and argument flags. | |
void | AnalyzeArguments (const SmallVectorImpl< ISD::OutputArg > &Outs, CCAssignFn Fn) |
The function will invoke AnalyzeCallOperands. | |
void | AnalyzeCallResult (const SmallVectorImpl< ISD::InputArg > &Ins, CCAssignFn Fn) |
AnalyzeCallResult - Analyze the return values of a call, incorporating info about the passed values into this state. | |
bool | IsShadowAllocatedReg (MCRegister Reg) const |
A shadow allocated register is a register that was allocated but wasn't added to the location list (Locs). | |
void | AnalyzeCallResult (MVT VT, CCAssignFn Fn) |
AnalyzeCallResult - Same as above except it's specialized for calls which produce a single value. | |
unsigned | getFirstUnallocated (ArrayRef< MCPhysReg > Regs) const |
getFirstUnallocated - Return the index of the first unallocated register in the set, or Regs.size() if they are all allocated. | |
void | DeallocateReg (MCPhysReg Reg) |
MCRegister | AllocateReg (MCPhysReg Reg) |
AllocateReg - Attempt to allocate one register. | |
MCRegister | AllocateReg (MCPhysReg Reg, MCPhysReg ShadowReg) |
Version of AllocateReg with extra register to be shadowed. | |
MCPhysReg | AllocateReg (ArrayRef< MCPhysReg > Regs) |
AllocateReg - Attempt to allocate one of the specified registers. | |
MCPhysReg | AllocateRegBlock (ArrayRef< MCPhysReg > Regs, unsigned RegsRequired) |
AllocateRegBlock - Attempt to allocate a block of RegsRequired consecutive registers. | |
MCRegister | AllocateReg (ArrayRef< MCPhysReg > Regs, const MCPhysReg *ShadowRegs) |
Version of AllocateReg with list of registers to be shadowed. | |
int64_t | AllocateStack (unsigned Size, Align Alignment) |
AllocateStack - Allocate a chunk of stack space with the specified size and alignment. | |
void | ensureMaxAlignment (Align Alignment) |
int64_t | AllocateStack (unsigned Size, Align Alignment, ArrayRef< MCPhysReg > ShadowRegs) |
Version of AllocateStack with list of extra registers to be shadowed. | |
void | HandleByVal (unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, int MinSize, Align MinAlign, ISD::ArgFlagsTy ArgFlags) |
Allocate space on the stack large enough to pass an argument by value. | |
unsigned | getInRegsParamsCount () const |
unsigned | getInRegsParamsProcessed () const |
void | getInRegsParamInfo (unsigned InRegsParamRecordIndex, unsigned &BeginReg, unsigned &EndReg) const |
void | addInRegsParamInfo (unsigned RegBegin, unsigned RegEnd) |
bool | nextInRegsParam () |
void | clearByValRegsInfo () |
void | rewindByValRegsInfo () |
SmallVectorImpl< CCValAssign > & | getPendingLocs () |
SmallVectorImpl< ISD::ArgFlagsTy > & | getPendingArgFlags () |
void | getRemainingRegParmsForType (SmallVectorImpl< MCPhysReg > &Regs, MVT VT, CCAssignFn Fn) |
Compute the remaining unused register parameters that would be used for the given value type. | |
void | analyzeMustTailForwardedRegisters (SmallVectorImpl< ForwardedRegister > &Forwards, ArrayRef< MVT > RegParmTypes, CCAssignFn Fn) |
Compute the set of registers that need to be preserved and forwarded to any musttail calls. | |
template<class T > | |
void | AnalyzeArgumentsSecondPass (const SmallVectorImpl< T > &Args, CCAssignFn Fn) |
The function runs an additional analysis pass over function arguments. | |
Static Public Member Functions | |
static bool | resultsCompatible (CallingConv::ID CalleeCC, CallingConv::ID CallerCC, MachineFunction &MF, LLVMContext &C, const SmallVectorImpl< ISD::InputArg > &Ins, CCAssignFn CalleeFn, CCAssignFn CallerFn) |
Returns true if the results of the two calling conventions are compatible. | |
CCState - This class holds information needed while lowering arguments and return values.
It captures which registers are already assigned and which stack slots are used. It provides accessors to allocate these values.
Definition at line 170 of file CallingConvLower.h.
CCState::CCState | ( | CallingConv::ID | CC, |
bool | IsVarArg, | ||
MachineFunction & | MF, | ||
SmallVectorImpl< CCValAssign > & | Locs, | ||
LLVMContext & | Context, | ||
bool | NegativeOffsets = false |
||
) |
Definition at line 28 of file CallingConvLower.cpp.
References clearByValRegsInfo(), llvm::MCRegisterInfo::getNumRegs(), and llvm::SmallVectorImpl< T >::resize().
Definition at line 456 of file CallingConvLower.h.
References llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by llvm::MipsTargetLowering::HandleByVal().
|
inline |
Definition at line 235 of file CallingConvLower.h.
References llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by Analyze_CC_Sparc64_Full(), Analyze_CC_Sparc64_Half(), AnalyzeArguments(), llvm::analyzeArguments(), llvm::AMDGPUTargetLowering::analyzeFormalArgumentsCompute(), llvm::analyzeReturnValues(), CC_AArch64_Custom_Block(), CC_AIX(), CC_ARM_AAPCS_Custom_Aggregate(), llvm::CC_CSKY_ABIV2_SOFT_64(), CC_Lanai32_VarArg(), CC_LoongArch(), CC_LoongArch_GHC(), CC_LoongArchAssign2GRLen(), llvm::CC_M68k_Any_AssignToReg(), CC_MipsO32(), CC_PPC32_SPE_CustomSplitFP64(), CC_PPC32_SPE_RetF64(), llvm::RISCV::CC_RISCV(), llvm::RISCV::CC_RISCV_FastCC(), llvm::RISCV::CC_RISCV_GHC(), CC_RISCVAssign2XLen(), CC_Sparc_Assign_Ret_Split_64(), CC_Sparc_Assign_Split_64(), CC_Sparc_Assign_SRet(), llvm::CC_SystemZ_I128Indirect(), CC_X86_32_MCUInReg(), CC_X86_32_RegCall_Assign2Regs(), CC_X86_32_VectorCall(), CC_X86_64_VectorCall(), CC_X86_Intr(), CC_X86_VectorCallAssignRegister(), llvm::CC_XPLINK64_Allocate128BitVararg(), CC_Xtensa_Custom(), CustomAssignInRegList(), f64AssignAAPCS(), f64AssignAPCS(), f64RetAssign(), finishStackBlock(), HandleByVal(), and llvm::Ret_CSKY_ABIV2_SOFT_64().
AllocateReg - Attempt to allocate one of the specified registers.
If none are available, return zero. Otherwise, return the first one available, marking it and any aliases as allocated.
Definition at line 349 of file CallingConvLower.h.
References getFirstUnallocated(), Reg, and llvm::ArrayRef< T >::size().
|
inline |
Version of AllocateReg with list of registers to be shadowed.
Definition at line 390 of file CallingConvLower.h.
References getFirstUnallocated(), Reg, and llvm::ArrayRef< T >::size().
|
inline |
AllocateReg - Attempt to allocate one register.
If it is not available, return zero. Otherwise, return the register, marking it and any aliases as allocated.
Definition at line 330 of file CallingConvLower.h.
References isAllocated(), and Reg.
Referenced by allocateFixedSGPRInputImpl(), llvm::SITargetLowering::allocateHSAUserSGPRs(), allocateHSAUserSGPRs(), llvm::SITargetLowering::allocateLDSKernelId(), llvm::SITargetLowering::allocatePreloadKernArgSGPRs(), allocateSGPR32InputImpl(), llvm::SITargetLowering::allocateSpecialEntryInputVGPRs(), llvm::SITargetLowering::allocateSpecialInputVGPRsFixed(), llvm::SITargetLowering::allocateSystemSGPRs(), allocateVGPR32Input(), AnalyzeArguments(), llvm::analyzeArguments(), llvm::analyzeReturnValues(), CC_AArch64_Custom_Block(), CC_AIX(), CC_ARM_AAPCS_Custom_Aggregate(), llvm::CC_CSKY_ABIV2_SOFT_64(), CC_LoongArch(), CC_LoongArch_GHC(), CC_LoongArchAssign2GRLen(), llvm::CC_M68k_Any_AssignToReg(), CC_MipsO32(), CC_PPC32_SPE_CustomSplitFP64(), CC_PPC32_SPE_RetF64(), CC_PPC32_SVR4_Custom_AlignArgRegs(), CC_PPC32_SVR4_Custom_AlignFPArgRegs(), CC_PPC32_SVR4_Custom_SkipLastArgRegsPPCF128(), CC_PPC64_ELF_Shadow_GPR_Regs(), llvm::RISCV::CC_RISCV(), llvm::RISCV::CC_RISCV_FastCC(), llvm::RISCV::CC_RISCV_GHC(), CC_RISCVAssign2XLen(), CC_SkipOdd(), CC_Sparc_Assign_Ret_Split_64(), CC_Sparc_Assign_Split_64(), llvm::CC_SystemZ_I128Indirect(), CC_X86_32_MCUInReg(), CC_X86_32_RegCall_Assign2Regs(), CC_X86_32_VectorCall(), CC_X86_64_VectorCall(), CC_X86_VectorCallAssignRegister(), llvm::CC_XPLINK64_Allocate128BitVararg(), llvm::CC_XPLINK64_Shadow_Reg(), CC_Xtensa_Custom(), CustomAssignInRegList(), f64AssignAAPCS(), f64AssignAPCS(), f64RetAssign(), finishStackBlock(), llvm::MipsTargetLowering::HandleByVal(), llvm::AMDGPUCallLowering::lowerFormalArguments(), llvm::SITargetLowering::LowerFormalArguments(), llvm::SITargetLowering::passSpecialInputs(), llvm::AMDGPUCallLowering::passSpecialInputs(), and llvm::Ret_CSKY_ABIV2_SOFT_64().
|
inline |
Version of AllocateReg with extra register to be shadowed.
Definition at line 338 of file CallingConvLower.h.
References isAllocated(), and Reg.
|
inline |
AllocateRegBlock - Attempt to allocate a block of RegsRequired consecutive registers.
If this is not possible, return zero. Otherwise, return the first register of the block that were allocated, marking the entire block as allocated.
Definition at line 363 of file CallingConvLower.h.
References isAllocated(), and llvm::ArrayRef< T >::size().
Referenced by CC_AArch64_Custom_Block(), and CC_ARM_AAPCS_Custom_Aggregate().
AllocateStack - Allocate a chunk of stack space with the specified size and alignment.
Definition at line 404 of file CallingConvLower.h.
References llvm::alignTo(), ensureMaxAlignment(), llvm::Offset, and Size.
Referenced by AllocateStack(), allocateVGPR32Input(), Analyze_CC_Sparc64_Full(), Analyze_CC_Sparc64_Half(), llvm::analyzeArguments(), analyzeCallOperands(), CC_AIX(), CC_ARM_AAPCS_Custom_Aggregate(), llvm::CC_CSKY_ABIV2_SOFT_64(), CC_Lanai32_VarArg(), CC_LoongArch(), CC_LoongArchAssign2GRLen(), CC_MipsO32(), llvm::RISCV::CC_RISCV(), llvm::RISCV::CC_RISCV_FastCC(), CC_RISCVAssign2XLen(), CC_Sparc_Assign_Split_64(), llvm::CC_SystemZ_I128Indirect(), CC_X86_32_MCUInReg(), CC_X86_64_VectorCall(), CC_X86_Intr(), llvm::CC_XPLINK64_Allocate128BitVararg(), CC_Xtensa_Custom(), f64AssignAAPCS(), f64AssignAPCS(), finishStackBlock(), HandleByVal(), llvm::MipsCallLowering::lowerCall(), llvm::VETargetLowering::LowerCall(), llvm::MipsCallLowering::lowerFormalArguments(), llvm::VETargetLowering::LowerFormalArguments(), and llvm::SITargetLowering::passSpecialInputs().
|
inline |
Version of AllocateStack with list of extra registers to be shadowed.
Note that, unlike AllocateReg, this shadows ALL of the shadow registers.
Definition at line 422 of file CallingConvLower.h.
References AllocateStack(), Reg, and Size.
|
inline |
The function will invoke AnalyzeFormalArguments.
Definition at line 266 of file CallingConvLower.h.
References AnalyzeFormalArguments().
Referenced by AnalyzeArgumentsSecondPass().
|
inline |
The function will invoke AnalyzeCallOperands.
Definition at line 294 of file CallingConvLower.h.
References AnalyzeCallOperands().
|
inline |
The function runs an additional analysis pass over function arguments.
It will mark each argument with the attribute flag SecArgPass. After running, it will sort the locs list.
Creates similar argument list to Args
in which each argument is marked using SecArgPass flag.
Definition at line 516 of file CallingConvLower.h.
References A, AnalyzeArguments(), B, llvm::SmallVectorTemplateCommon< T, typename >::begin(), E, llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::SmallVectorBase< Size_T >::size(), and llvm::SmallVectorImpl< T >::swap().
void CCState::AnalyzeCallOperands | ( | const SmallVectorImpl< ISD::OutputArg > & | Outs, |
CCAssignFn | Fn | ||
) |
AnalyzeCallOperands - Analyze the outgoing arguments to a call, incorporating info about the passed values into this state.
Analyze the outgoing arguments to a call, incorporating info about the passed values into this state.
Definition at line 126 of file CallingConvLower.cpp.
References llvm::dbgs(), llvm::CCValAssign::Full, llvm_unreachable, and llvm::SmallVectorBase< Size_T >::size().
Referenced by AnalyzeArguments(), llvm::AIXCCState::AnalyzeCallOperands(), llvm::SystemZCCState::AnalyzeCallOperands(), llvm::MipsCCState::AnalyzeCallOperands(), AnalyzeVarArgs(), llvm::SITargetLowering::isEligibleForTailCallOptimization(), llvm::SITargetLowering::LowerCall(), llvm::XtensaTargetLowering::LowerCall(), llvm::LoongArchTargetLowering::LowerCall(), llvm::RISCVTargetLowering::LowerCall(), llvm::VETargetLowering::LowerCall(), llvm::SparcTargetLowering::LowerCall_32(), and llvm::SparcTargetLowering::LowerCall_64().
void CCState::AnalyzeCallOperands | ( | SmallVectorImpl< MVT > & | ArgVTs, |
SmallVectorImpl< ISD::ArgFlagsTy > & | Flags, | ||
CCAssignFn | Fn | ||
) |
AnalyzeCallOperands - Same as above except it takes vectors of types and argument flags.
Same as above except it takes vectors of types and argument flags.
Definition at line 143 of file CallingConvLower.cpp.
References llvm::dbgs(), llvm::CCValAssign::Full, llvm_unreachable, and llvm::SmallVectorBase< Size_T >::size().
void CCState::AnalyzeCallResult | ( | const SmallVectorImpl< ISD::InputArg > & | Ins, |
CCAssignFn | Fn | ||
) |
AnalyzeCallResult - Analyze the return values of a call, incorporating info about the passed values into this state.
Analyze the return values of a call, incorporating info about the passed values into this state.
Definition at line 162 of file CallingConvLower.cpp.
References llvm::dbgs(), llvm::CCValAssign::Full, and llvm_unreachable.
Referenced by llvm::MipsCCState::AnalyzeCallResult(), AnalyzeRetResult(), llvm::SystemZTargetLowering::LowerCall(), llvm::XtensaTargetLowering::LowerCall(), llvm::VETargetLowering::LowerCall(), llvm::SparcTargetLowering::LowerCall_32(), llvm::SparcTargetLowering::LowerCall_64(), llvm::SITargetLowering::LowerCallResult(), llvm::HexagonTargetLowering::LowerCallResult(), and resultsCompatible().
void CCState::AnalyzeCallResult | ( | MVT | VT, |
CCAssignFn | Fn | ||
) |
AnalyzeCallResult - Same as above except it's specialized for calls which produce a single value.
Same as above except it's specialized for calls that produce a single value.
Definition at line 178 of file CallingConvLower.cpp.
References llvm::dbgs(), llvm::CCValAssign::Full, and llvm_unreachable.
void CCState::AnalyzeFormalArguments | ( | const SmallVectorImpl< ISD::InputArg > & | Ins, |
CCAssignFn | Fn | ||
) |
AnalyzeFormalArguments - Analyze an array of argument values, incorporating info about the formals into this state.
Analyze an array of argument values, incorporating info about the formals into this state.
Definition at line 85 of file CallingConvLower.cpp.
References llvm::CCValAssign::Full, and llvm::report_fatal_error().
Referenced by AnalyzeArguments(), llvm::MipsCCState::AnalyzeFormalArguments(), llvm::AIXCCState::AnalyzeFormalArguments(), llvm::SystemZCCState::AnalyzeFormalArguments(), AnalyzeVarArgs(), llvm::R600TargetLowering::LowerFormalArguments(), llvm::SITargetLowering::LowerFormalArguments(), llvm::LoongArchTargetLowering::LowerFormalArguments(), llvm::RISCVTargetLowering::LowerFormalArguments(), llvm::VETargetLowering::LowerFormalArguments(), llvm::XtensaTargetLowering::LowerFormalArguments(), llvm::SparcTargetLowering::LowerFormalArguments_32(), and llvm::SparcTargetLowering::LowerFormalArguments_64().
void CCState::analyzeMustTailForwardedRegisters | ( | SmallVectorImpl< ForwardedRegister > & | Forwards, |
ArrayRef< MVT > | RegParmTypes, | ||
CCAssignFn | Fn | ||
) |
Compute the set of registers that need to be preserved and forwarded to any musttail calls.
Definition at line 240 of file CallingConvLower.cpp.
References llvm::MachineFunction::addLiveIn(), llvm::TargetLoweringBase::getRegClassFor(), getRemainingRegParmsForType(), llvm::MachineFunction::getSubtarget(), llvm::TargetSubtargetInfo::getTargetLowering(), and llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by handleMustTailForwardedRegisters().
void CCState::AnalyzeReturn | ( | const SmallVectorImpl< ISD::OutputArg > & | Outs, |
CCAssignFn | Fn | ||
) |
AnalyzeReturn - Analyze the returned values of a return, incorporating info about the result values into this state.
Analyze the returned values of a return, incorporating info about the result values into this state.
Definition at line 113 of file CallingConvLower.cpp.
References llvm::CCValAssign::Full, llvm::report_fatal_error(), and llvm::SmallVectorBase< Size_T >::size().
Referenced by AnalyzeRetResult(), llvm::MipsCCState::AnalyzeReturn(), llvm::SITargetLowering::LowerReturn(), llvm::HexagonTargetLowering::LowerReturn(), llvm::SystemZTargetLowering::LowerReturn(), llvm::VETargetLowering::LowerReturn(), llvm::XtensaTargetLowering::LowerReturn(), llvm::SparcTargetLowering::LowerReturn_32(), and llvm::SparcTargetLowering::LowerReturn_64().
bool CCState::CheckReturn | ( | const SmallVectorImpl< ISD::OutputArg > & | Outs, |
CCAssignFn | Fn | ||
) |
CheckReturn - Analyze the return values of a function, returning true if the return can be performed without sret-demotion, and false otherwise.
Analyze the return values of a function, returning true if the return can be performed without sret-demotion and false otherwise.
Definition at line 99 of file CallingConvLower.cpp.
References llvm::CCValAssign::Full, and llvm::SmallVectorBase< Size_T >::size().
Referenced by llvm::VETargetLowering::CanLowerReturn(), llvm::SITargetLowering::CanLowerReturn(), llvm::HexagonTargetLowering::CanLowerReturn(), llvm::LanaiTargetLowering::CanLowerReturn(), llvm::SparcTargetLowering::CanLowerReturn(), llvm::SystemZTargetLowering::CanLowerReturn(), llvm::XtensaTargetLowering::CanLowerReturn(), and llvm::MipsCCState::CheckReturn().
|
inline |
Definition at line 471 of file CallingConvLower.h.
References llvm::SmallVectorImpl< T >::clear().
Referenced by CCState().
|
inline |
Definition at line 322 of file CallingConvLower.h.
References assert(), isAllocated(), and Reg.
Referenced by finishStackBlock().
void CCState::ensureMaxAlignment | ( | Align | Alignment | ) |
Definition at line 188 of file CallingConvLower.cpp.
References llvm::MachineFrameInfo::ensureMaxAlignment(), and llvm::MachineFunction::getFrameInfo().
Referenced by AllocateStack(), and HandleByVal().
|
inline |
getAlignedCallFrameSize - Return the size of the call frame needed to be able to store all arguments and such that the alignment requirement of each of the arguments is satisfied.
Definition at line 250 of file CallingConvLower.h.
References llvm::alignTo().
|
inline |
Definition at line 241 of file CallingConvLower.h.
Referenced by AnalyzeArguments(), llvm::CallLowering::determineAssignments(), finishStackBlock(), llvm::MipsTargetLowering::HandleByVal(), and llvm::MipsCallLowering::lowerFormalArguments().
|
inline |
Definition at line 239 of file CallingConvLower.h.
Referenced by llvm::analyzeArguments(), llvm::AMDGPUTargetLowering::analyzeFormalArgumentsCompute(), and llvm::CallLowering::determineAssignments().
getFirstUnallocated - Return the index of the first unallocated register in the set, or Regs.size() if they are all allocated.
Definition at line 315 of file CallingConvLower.h.
References isAllocated(), and llvm::ArrayRef< T >::size().
Referenced by AllocateReg(), allocateSGPR32InputImpl(), allocateVGPR32Input(), CC_AIX(), CC_ARM_AAPCS_Custom_Aggregate(), CC_LoongArch(), CC_MipsO32(), CC_PPC32_SVR4_Custom_AlignArgRegs(), CC_PPC32_SVR4_Custom_AlignFPArgRegs(), CC_PPC32_SVR4_Custom_SkipLastArgRegsPPCF128(), CC_PPC64_ELF_Shadow_GPR_Regs(), llvm::RISCV::CC_RISCV(), CC_SkipOdd(), CC_X86_32_MCUInReg(), llvm::MipsTargetLowering::HandleByVal(), llvm::MipsCallLowering::lowerFormalArguments(), llvm::LoongArchTargetLowering::LowerFormalArguments(), llvm::RISCVTargetLowering::LowerFormalArguments(), and llvm::SparcTargetLowering::LowerFormalArguments_32().
|
inline |
Definition at line 445 of file CallingConvLower.h.
References assert(), info, and llvm::SmallVectorBase< Size_T >::size().
|
inline |
Definition at line 438 of file CallingConvLower.h.
References llvm::SmallVectorBase< Size_T >::size().
|
inline |
Definition at line 441 of file CallingConvLower.h.
|
inline |
Definition at line 240 of file CallingConvLower.h.
Referenced by allocateFixedSGPRInputImpl(), allocateSGPR32InputImpl(), allocateVGPR32Input(), llvm::AMDGPUTargetLowering::analyzeFormalArgumentsCompute(), CC_AArch64_Custom_Block(), CC_AIX(), CC_ARM_AAPCS_Custom_Aggregate(), CC_MipsO32(), llvm::RISCV::CC_RISCV_GHC(), CC_RISCVAssign2XLen(), llvm::CC_SystemZ_I128Indirect(), CC_X86_64_VectorCall(), CC_X86_Intr(), CC_X86_VectorCallAssignRegister(), and finishStackBlock().
|
inline |
Definition at line 487 of file CallingConvLower.h.
Referenced by CC_LoongArch(), and llvm::RISCV::CC_RISCV().
|
inline |
Definition at line 482 of file CallingConvLower.h.
Referenced by CC_AArch64_Custom_Block(), CC_AArch64_Custom_Stack_Block(), CC_ARM_AAPCS_Custom_Aggregate(), CC_LoongArch(), llvm::RISCV::CC_RISCV(), llvm::CC_SystemZ_I128Indirect(), and CC_X86_32_MCUInReg().
void CCState::getRemainingRegParmsForType | ( | SmallVectorImpl< MCPhysReg > & | Regs, |
MVT | VT, | ||
CCAssignFn | Fn | ||
) |
Compute the remaining unused register parameters that would be used for the given value type.
This is useful when varargs are passed in the registers that normal prototyped parameters would be passed in, or for implementing perfect forwarding.
Definition at line 201 of file CallingConvLower.cpp.
References assert(), llvm::dbgs(), llvm::CCValAssign::Full, I, isValueTypeInRegForCC(), llvm_unreachable, and llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by analyzeMustTailForwardedRegisters().
|
inline |
Returns the size of the currently allocated portion of the stack.
Definition at line 245 of file CallingConvLower.h.
Referenced by llvm::AMDGPUCallLowering::areCalleeOutgoingArgsTailCallable(), llvm::CallLowering::ValueAssigner::assignArg(), CC_AIX(), CC_ARM_AAPCS_Custom_Aggregate(), llvm::SparcTargetLowering::IsEligibleForTailCallOptimization(), llvm::SITargetLowering::isEligibleForTailCallOptimization(), llvm::SITargetLowering::LowerCall(), llvm::SystemZTargetLowering::LowerCall(), llvm::XtensaTargetLowering::LowerCall(), llvm::AMDGPUCallLowering::lowerCall(), llvm::MipsCallLowering::lowerCall(), llvm::LoongArchTargetLowering::LowerCall(), llvm::RISCVTargetLowering::LowerCall(), llvm::VETargetLowering::LowerCall(), llvm::SparcTargetLowering::LowerCall_32(), llvm::SparcTargetLowering::LowerCall_64(), llvm::MipsCallLowering::lowerFormalArguments(), llvm::SITargetLowering::LowerFormalArguments(), llvm::LoongArchTargetLowering::LowerFormalArguments(), llvm::RISCVTargetLowering::LowerFormalArguments(), llvm::SystemZTargetLowering::LowerFormalArguments(), llvm::SparcTargetLowering::LowerFormalArguments_32(), llvm::SparcTargetLowering::LowerFormalArguments_64(), and llvm::AMDGPUCallLowering::lowerTailCall().
void CCState::HandleByVal | ( | unsigned | ValNo, |
MVT | ValVT, | ||
MVT | LocVT, | ||
CCValAssign::LocInfo | LocInfo, | ||
int | MinSize, | ||
Align | MinAlign, | ||
ISD::ArgFlagsTy | ArgFlags | ||
) |
Allocate space on the stack large enough to pass an argument by value.
The size and alignment information of the argument is encoded in its parameter attribute.
Definition at line 45 of file CallingConvLower.cpp.
References addLoc(), llvm::alignTo(), AllocateStack(), ensureMaxAlignment(), llvm::ISD::ArgFlagsTy::getByValSize(), llvm::CCValAssign::getMem(), llvm::ISD::ArgFlagsTy::getNonZeroByValAlign(), llvm::MachineFunction::getSubtarget(), llvm::TargetSubtargetInfo::getTargetLowering(), llvm::TargetLowering::HandleByVal(), llvm::MinAlign(), llvm::Offset, and Size.
Referenced by AnalyzeArguments().
|
inline |
isAllocated - Return true if the specified register (or an alias) is allocated.
Definition at line 256 of file CallingConvLower.h.
References Reg.
Referenced by AllocateReg(), AllocateRegBlock(), llvm::SITargetLowering::CanLowerReturn(), CC_X86_32_RegCall_Assign2Regs(), CC_X86_64_VectorCall(), CC_X86_VectorCallAssignRegister(), llvm::CC_XPLINK64_Shadow_Reg(), DeallocateReg(), findFirstFreeSGPR(), finishStackBlock(), getFirstUnallocated(), handleMustTailForwardedRegisters(), and IsShadowAllocatedReg().
bool CCState::IsShadowAllocatedReg | ( | MCRegister | Reg | ) | const |
A shadow allocated register is a register that was allocated but wasn't added to the location list (Locs).
Definition at line 72 of file CallingConvLower.cpp.
References isAllocated(), and llvm::TargetRegisterInfo::regsOverlap().
Referenced by CC_X86_VectorCallAssignRegister().
|
inline |
Definition at line 242 of file CallingConvLower.h.
Referenced by AnalyzeArguments(), llvm::CallLowering::ValueAssigner::assignArg(), CC_AIX(), and CC_MipsO32().
|
inline |
Definition at line 463 of file CallingConvLower.h.
References llvm::SmallVectorBase< Size_T >::size().
|
static |
Returns true if the results of the two calling conventions are compatible.
This is usually part of the check for tailcall eligibility.
Definition at line 261 of file CallingConvLower.cpp.
References AnalyzeCallResult(), assert(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::CallingConv::C, llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::CCValAssign::getLocInfo(), llvm::CCValAssign::getLocMemOffset(), llvm::CCValAssign::getLocReg(), llvm::CCValAssign::isMemLoc(), llvm::CCValAssign::isPendingLoc(), llvm::CCValAssign::isRegLoc(), and llvm_unreachable.
Referenced by llvm::SITargetLowering::isEligibleForTailCallOptimization().
|
inline |
Definition at line 477 of file CallingConvLower.h.