LLVM
8.0.1
|
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 &C) | |
void | addLoc (const CCValAssign &V) |
LLVMContext & | getContext () const |
MachineFunction & | getMachineFunction () const |
CallingConv::ID | getCallingConv () const |
bool | isVarArg () const |
unsigned | getNextStackOffset () const |
getNextStackOffset - Return the next stack offset such that all stack slots satisfy their alignment requirements. More... | |
unsigned | 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. More... | |
bool | isAllocated (unsigned Reg) const |
isAllocated - Return true if the specified register (or an alias) is allocated. More... | |
void | AnalyzeFormalArguments (const SmallVectorImpl< ISD::InputArg > &Ins, CCAssignFn Fn) |
AnalyzeFormalArguments - Analyze an array of argument values, incorporating info about the formals into this state. More... | |
void | AnalyzeArguments (const SmallVectorImpl< ISD::InputArg > &Ins, CCAssignFn Fn) |
The function will invoke AnalyzeFormalArguments. More... | |
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. More... | |
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. More... | |
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. More... | |
void | AnalyzeCallOperands (SmallVectorImpl< MVT > &ArgVTs, SmallVectorImpl< ISD::ArgFlagsTy > &Flags, CCAssignFn Fn) |
AnalyzeCallOperands - Same as above except it takes vectors of types and argument flags. More... | |
void | AnalyzeArguments (const SmallVectorImpl< ISD::OutputArg > &Outs, CCAssignFn Fn) |
The function will invoke AnalyzeCallOperands. More... | |
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. More... | |
bool | IsShadowAllocatedReg (unsigned Reg) const |
A shadow allocated register is a register that was allocated but wasn't added to the location list (Locs). More... | |
void | AnalyzeCallResult (MVT VT, CCAssignFn Fn) |
AnalyzeCallResult - Same as above except it's specialized for calls which produce a single value. More... | |
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. More... | |
unsigned | AllocateReg (unsigned Reg) |
AllocateReg - Attempt to allocate one register. More... | |
unsigned | AllocateReg (unsigned Reg, unsigned ShadowReg) |
Version of AllocateReg with extra register to be shadowed. More... | |
unsigned | AllocateReg (ArrayRef< MCPhysReg > Regs) |
AllocateReg - Attempt to allocate one of the specified registers. More... | |
unsigned | AllocateRegBlock (ArrayRef< MCPhysReg > Regs, unsigned RegsRequired) |
AllocateRegBlock - Attempt to allocate a block of RegsRequired consecutive registers. More... | |
unsigned | AllocateReg (ArrayRef< MCPhysReg > Regs, const MCPhysReg *ShadowRegs) |
Version of AllocateReg with list of registers to be shadowed. More... | |
unsigned | AllocateStack (unsigned Size, unsigned Align) |
AllocateStack - Allocate a chunk of stack space with the specified size and alignment. More... | |
void | ensureMaxAlignment (unsigned Align) |
unsigned | AllocateStack (unsigned Size, unsigned Align, unsigned ShadowReg) |
Version of AllocateStack with extra register to be shadowed. More... | |
unsigned | AllocateStack (unsigned Size, unsigned Align, ArrayRef< MCPhysReg > ShadowRegs) |
Version of AllocateStack with list of extra registers to be shadowed. More... | |
void | HandleByVal (unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, int MinSize, int MinAlign, ISD::ArgFlagsTy ArgFlags) |
Allocate space on the stack large enough to pass an argument by value. More... | |
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. More... | |
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. More... | |
template<class T > | |
void | AnalyzeArgumentsSecondPass (const SmallVectorImpl< T > &Args, CCAssignFn Fn) |
The function runs an additional analysis pass over function arguments. More... | |
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. More... | |
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 190 of file CallingConvLower.h.
CCState::CCState | ( | CallingConv::ID | CC, |
bool | isVarArg, | ||
MachineFunction & | MF, | ||
SmallVectorImpl< CCValAssign > & | locs, | ||
LLVMContext & | C | ||
) |
Definition at line 30 of file CallingConvLower.cpp.
References clearByValRegsInfo(), llvm::MCRegisterInfo::getNumRegs(), and llvm::SmallVectorImpl< T >::resize().
Definition at line 482 of file CallingConvLower.h.
References llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by llvm::ARMTargetLowering::CCAssignFnForReturn(), and llvm::MipsTargetLowering::HandleByVal().
|
inline |
Definition at line 260 of file CallingConvLower.h.
References llvm::SmallVectorTemplateBase< T >::push_back().
Referenced by allocateCCRegs(), AnalyzeArguments(), llvm::AMDGPUTargetLowering::analyzeFormalArgumentsCompute(), llvm::analyzeStandardArguments(), llvm::CC_ARM_AAPCS_Custom_Aggregate(), CC_Lanai32_VarArg(), CC_MipsO32(), CC_RISCV(), CC_RISCVAssign2XLen(), CC_Sparc64_Full(), CC_Sparc64_Half(), CC_Sparc_Assign_Ret_Split_64(), CC_Sparc_Assign_Split_64(), CC_Sparc_Assign_SRet(), llvm::CC_SystemZ_I128Indirect(), llvm::CC_X86_32_MCUInReg(), llvm::CC_X86_32_RegCall_Assign2Regs(), llvm::CC_X86_32_VectorCall(), llvm::CC_X86_64_VectorCall(), llvm::CC_X86_VectorCallAssignRegister(), llvm::f64AssignAAPCS(), llvm::f64AssignAPCS(), llvm::f64RetAssign(), and HandleByVal().
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 353 of file CallingConvLower.h.
References Reg.
Referenced by allocateCCRegs(), allocateHSAUserSGPRs(), allocateSGPR32InputImpl(), allocateSpecialEntryInputVGPRs(), allocateSystemSGPRs(), allocateVGPR32Input(), AnalyzeArguments(), llvm::analyzeStandardArguments(), llvm::CC_ARM_AAPCS_Custom_Aggregate(), CC_MipsO32(), llvm::CC_PPC32_SVR4_Custom_AlignArgRegs(), llvm::CC_PPC32_SVR4_Custom_AlignFPArgRegs(), llvm::CC_PPC32_SVR4_Custom_SkipLastArgRegsPPCF128(), CC_RISCV(), CC_RISCVAssign2XLen(), CC_SkipOdd(), CC_Sparc_Assign_Ret_Split_64(), CC_Sparc_Assign_Split_64(), llvm::CC_SystemZ_I128Indirect(), llvm::CC_X86_32_MCUInReg(), llvm::CC_X86_32_RegCall_Assign2Regs(), llvm::CC_X86_32_VectorCall(), llvm::CC_X86_64_VectorCall(), llvm::CC_X86_VectorCallAssignRegister(), llvm::ARMTargetLowering::CCAssignFnForReturn(), llvm::f64AssignAAPCS(), llvm::f64AssignAPCS(), llvm::f64RetAssign(), and llvm::MipsTargetLowering::HandleByVal().
Version of AllocateReg with extra register to be shadowed.
Definition at line 360 of file CallingConvLower.h.
References Reg.
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 370 of file CallingConvLower.h.
References Reg, and llvm::ArrayRef< T >::size().
|
inline |
Version of AllocateReg with list of registers to be shadowed.
Definition at line 411 of file CallingConvLower.h.
References Reg, and llvm::ArrayRef< T >::size().
|
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 384 of file CallingConvLower.h.
References llvm::ArrayRef< T >::size().
Referenced by llvm::CC_ARM_AAPCS_Custom_Aggregate().
AllocateStack - Allocate a chunk of stack space with the specified size and alignment.
Definition at line 425 of file CallingConvLower.h.
References llvm::alignTo(), assert(), llvm::max(), and Size.
Referenced by allocateVGPR32Input(), llvm::analyzeStandardArguments(), llvm::CC_ARM_AAPCS_Custom_Aggregate(), CC_Lanai32_VarArg(), CC_MipsO32(), CC_RISCV(), CC_RISCVAssign2XLen(), CC_Sparc64_Full(), CC_Sparc64_Half(), CC_Sparc_Assign_Split_64(), llvm::CC_SystemZ_I128Indirect(), llvm::CC_X86_32_MCUInReg(), llvm::CC_X86_64_VectorCall(), computeBytesPoppedByCalleeForSRet(), EnsureStackAlignment(), llvm::f64AssignAAPCS(), llvm::f64AssignAPCS(), getComparePred(), getMOVL(), llvm::ARCTargetLowering::getTargetNodeName(), HandleByVal(), isSortedByValueNo(), llvm::MipsCallLowering::lowerCall(), lowerCallResult(), LowerCallResult(), MatchingStackOffset(), llvm::SITargetLowering::passSpecialInputs(), PrepareCall(), and UnpackFromArgumentSlot().
Version of AllocateStack with extra register to be shadowed.
Definition at line 441 of file CallingConvLower.h.
|
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 448 of file CallingConvLower.h.
References llvm::MinAlign(), and llvm::ArrayRef< T >::size().
|
inline |
The function will invoke AnalyzeFormalArguments.
Definition at line 294 of file CallingConvLower.h.
|
inline |
The function will invoke AnalyzeCallOperands.
Definition at line 322 of file CallingConvLower.h.
References Reg.
|
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 542 of file CallingConvLower.h.
References AnalyzeArguments(), Arg, B, llvm::SmallVectorTemplateCommon< T >::begin(), E, llvm::SmallVectorTemplateCommon< T >::end(), llvm::CCValAssign::getValNo(), llvm::SmallVectorTemplateBase< T >::push_back(), llvm::SmallVectorBase::size(), and std::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 138 of file CallingConvLower.cpp.
References llvm::dbgs(), llvm::CCValAssign::Full, llvm::EVT::getEVTString(), llvm_unreachable, and llvm::SmallVectorBase::size().
Referenced by llvm::analyzeBuiltinArguments(), llvm::SystemZCCState::AnalyzeCallOperands(), llvm::MipsCCState::AnalyzeCallOperands(), llvm::analyzeStandardArguments(), AnalyzeVarArgs(), CC_MipsO32_FP64(), llvm::ARMTargetLowering::CCAssignFnForReturn(), getCompareCC(), getComparePred(), llvm::ARCTargetLowering::getTargetNodeName(), llvm::SITargetLowering::isEligibleForTailCallOptimization(), llvm::SparcTargetLowering::LowerCall_32(), llvm::SparcTargetLowering::LowerCall_64(), llvm::BPFTargetLowering::LowerOperation(), MatchingStackOffset(), and mayTailCallThisCC().
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 155 of file CallingConvLower.cpp.
References llvm::dbgs(), llvm::CCValAssign::Full, llvm::EVT::getEVTString(), llvm_unreachable, and llvm::SmallVectorBase::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 174 of file CallingConvLower.cpp.
References llvm::dbgs(), llvm::CCValAssign::Full, llvm::EVT::getEVTString(), llvm_unreachable, and llvm::SmallVectorBase::size().
Referenced by llvm::MipsCCState::AnalyzeCallResult(), AnalyzeRetResult(), CC_Lanai32_VarArg(), llvm::AArch64TargetLowering::CCAssignFnForReturn(), llvm::ARMTargetLowering::CCAssignFnForReturn(), computeBytesPoppedByCalleeForSRet(), getCompareCC(), getComparePred(), llvm::SystemZTargetLowering::LowerCall(), llvm::SparcTargetLowering::LowerCall_32(), llvm::HexagonTargetLowering::LowerCallResult(), llvm::SITargetLowering::LowerCallResult(), lowerRegToMasks(), MatchingStackOffset(), PrepareCall(), 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 190 of file CallingConvLower.cpp.
References llvm::dbgs(), llvm::CCValAssign::Full, llvm::EVT::getEVTString(), 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 87 of file CallingConvLower.cpp.
References llvm::dbgs(), llvm::CCValAssign::Full, llvm::EVT::getEVTString(), llvm_unreachable, and llvm::SmallVectorBase::size().
Referenced by llvm::SystemZCCState::AnalyzeFormalArguments(), llvm::MipsCCState::AnalyzeFormalArguments(), llvm::analyzeStandardArguments(), AnalyzeVarArgs(), CC_Lanai32_VarArg(), lowerCallResult(), LowerCallResult(), llvm::SparcTargetLowering::LowerFormalArguments_32(), llvm::SparcTargetLowering::LowerFormalArguments_64(), llvm::BPFTargetLowering::LowerOperation(), and LowerVASTART().
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 249 of file CallingConvLower.cpp.
References llvm::MachineFunction::addLiveIn(), llvm::TargetLoweringBase::getRegClassFor(), getRemainingRegParmsForType(), llvm::MachineFunction::getSubtarget(), llvm::TargetSubtargetInfo::getTargetLowering(), and llvm::SmallVectorTemplateBase< T >::push_back().
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 120 of file CallingConvLower.cpp.
References llvm::dbgs(), llvm::CCValAssign::Full, llvm::EVT::getEVTString(), llvm_unreachable, and llvm::SmallVectorBase::size().
Referenced by AnalyzeRetResult(), llvm::MipsCCState::AnalyzeReturn(), CC_Lanai32_VarArg(), getComparePred(), LowerInterruptReturn(), llvm::HexagonTargetLowering::LowerReturn(), llvm::SITargetLowering::LowerReturn(), llvm::SystemZTargetLowering::LowerReturn(), llvm::SparcTargetLowering::LowerReturn_32(), llvm::SparcTargetLowering::LowerReturn_64(), mayTailCallThisCC(), Passv64i1ArgInRegs(), and PrepareCall().
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 106 of file CallingConvLower.cpp.
References llvm::CCValAssign::Full, and llvm::SmallVectorBase::size().
Referenced by llvm::analyzeArguments(), AnalyzeReturnValues(), llvm::HexagonTargetLowering::CanLowerReturn(), llvm::SITargetLowering::CanLowerReturn(), llvm::SystemZTargetLowering::CanLowerReturn(), llvm::MipsCCState::CheckReturn(), llvm::X86TargetLowering::isNoopAddrSpaceCast(), lowerCallResult(), LowerCallResult(), MatchingStackOffset(), mayTailCallThisCC(), and PrepareCall().
|
inline |
Definition at line 497 of file CallingConvLower.h.
References llvm::SmallVectorImpl< T >::clear().
Referenced by CCState().
|
inline |
Definition at line 435 of file CallingConvLower.h.
References llvm::MachineFrameInfo::ensureMaxAlignment(), and llvm::MachineFunction::getFrameInfo().
Referenced by 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 278 of file CallingConvLower.h.
References llvm::alignTo().
|
inline |
Definition at line 266 of file CallingConvLower.h.
Referenced by AnalyzeArguments(), llvm::MipsTargetLowering::getTypeForExtReturn(), and llvm::MipsTargetLowering::HandleByVal().
|
inline |
Definition at line 264 of file CallingConvLower.h.
References Context.
Referenced by llvm::AMDGPUTargetLowering::analyzeFormalArgumentsCompute(), and llvm::analyzeStandardArguments().
getFirstUnallocated - Return the index of the first unallocated register in the set, or Regs.size() if they are all allocated.
Definition at line 343 of file CallingConvLower.h.
References llvm::ArrayRef< T >::size().
Referenced by allocateSGPR32InputImpl(), allocateVGPR32Input(), llvm::CC_ARM_AAPCS_Custom_Aggregate(), CC_MipsO32(), llvm::CC_PPC32_SVR4_Custom_AlignArgRegs(), llvm::CC_PPC32_SVR4_Custom_AlignFPArgRegs(), llvm::CC_PPC32_SVR4_Custom_SkipLastArgRegsPPCF128(), CC_RISCV(), CC_SkipOdd(), llvm::CC_X86_32_MCUInReg(), llvm::AArch64TargetLowering::CCAssignFnForReturn(), llvm::MipsTargetLowering::getTypeForExtReturn(), llvm::MipsTargetLowering::HandleByVal(), LowerVASTART(), unpackF64OnRV32DSoftABI(), and llvm::X86CallLowering::X86CallLowering().
|
inline |
Definition at line 471 of file CallingConvLower.h.
References assert(), info, and llvm::SmallVectorBase::size().
Referenced by LowerVASTART().
|
inline |
Definition at line 464 of file CallingConvLower.h.
References llvm::SmallVectorBase::size().
Referenced by llvm::MipsSETargetLowering::EmitInstrWithCustomInserter(), and LowerVASTART().
|
inline |
Definition at line 467 of file CallingConvLower.h.
Referenced by LowerVASTART().
|
inline |
Definition at line 265 of file CallingConvLower.h.
Referenced by allocateSGPR32InputImpl(), allocateVGPR32Input(), llvm::AMDGPUTargetLowering::analyzeFormalArgumentsCompute(), llvm::CC_ARM_AAPCS_Custom_Aggregate(), CC_MipsO32(), llvm::CC_X86_VectorCallAssignRegister(), and llvm::MipsCCState::getSpecialCallingConvForCallee().
|
inline |
getNextStackOffset - Return the next stack offset such that all stack slots satisfy their alignment requirements.
Definition at line 271 of file CallingConvLower.h.
Referenced by llvm::AArch64CallLowering::AArch64CallLowering(), llvm::CC_ARM_AAPCS_Custom_Aggregate(), CC_MipsO32_FP64(), llvm::ARMTargetLowering::CCAssignFnForReturn(), getCompareCC(), getComparePred(), llvm::MipsTargetLowering::getTypeForExtReturn(), llvm::SITargetLowering::isEligibleForTailCallOptimization(), isSupportedType(), lowerCallResult(), LowerCallResult(), LowerVASTART(), MatchingStackOffset(), mayTailCallThisCC(), unpackF64OnRV32DSoftABI(), and llvm::X86CallLowering::X86CallLowering().
|
inline |
Definition at line 513 of file CallingConvLower.h.
Referenced by CC_RISCV().
|
inline |
Definition at line 508 of file CallingConvLower.h.
Referenced by llvm::CC_ARM_AAPCS_Custom_Aggregate(), CC_RISCV(), llvm::CC_SystemZ_I128Indirect(), and llvm::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 210 of file CallingConvLower.cpp.
References assert(), llvm::dbgs(), E, llvm::CCValAssign::Full, llvm::EVT::getEVTString(), I, isValueTypeInRegForCC(), llvm_unreachable, llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::ISD::ArgFlagsTy::setInReg().
Referenced by analyzeMustTailForwardedRegisters().
void CCState::HandleByVal | ( | unsigned | ValNo, |
MVT | ValVT, | ||
MVT | LocVT, | ||
CCValAssign::LocInfo | LocInfo, | ||
int | MinSize, | ||
int | 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::AMDGPU::HSAMD::Kernel::Arg::Key::Align, llvm::alignTo(), AllocateStack(), ensureMaxAlignment(), llvm::ISD::ArgFlagsTy::getByValAlign(), llvm::ISD::ArgFlagsTy::getByValSize(), llvm::CCValAssign::getMem(), llvm::MachineFunction::getSubtarget(), llvm::TargetSubtargetInfo::getTargetLowering(), llvm::TargetLowering::HandleByVal(), llvm::MCRegAliasIterator::isValid(), llvm::MinAlign(), Reg, and Size.
Referenced by AnalyzeArguments().
isAllocated - Return true if the specified register (or an alias) is allocated.
Definition at line 284 of file CallingConvLower.h.
References llvm::MipsISD::Ins.
Referenced by llvm::CC_X86_32_RegCall_Assign2Regs(), llvm::CC_X86_64_VectorCall(), llvm::CC_X86_VectorCallAssignRegister(), findFirstFreeSGPR(), and IsShadowAllocatedReg().
A shadow allocated register is a register that was allocated but wasn't added to the location list (Locs).
Definition at line 68 of file CallingConvLower.cpp.
References isAllocated(), and llvm::MCRegAliasIterator::isValid().
Referenced by llvm::CC_X86_VectorCallAssignRegister().
|
inline |
Definition at line 267 of file CallingConvLower.h.
Referenced by AnalyzeArguments(), and CC_MipsO32().
|
inline |
Definition at line 489 of file CallingConvLower.h.
References llvm::SmallVectorBase::size().
Referenced by LowerVASTART().
|
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 270 of file CallingConvLower.cpp.
References AnalyzeCallResult(), E, llvm::CCValAssign::getLocInfo(), llvm::CCValAssign::getLocMemOffset(), llvm::CCValAssign::getLocReg(), I, llvm::CCValAssign::isRegLoc(), and llvm::SmallVectorBase::size().
Referenced by llvm::SITargetLowering::isEligibleForTailCallOptimization(), MatchingStackOffset(), and mayTailCallThisCC().
|
inline |
Definition at line 503 of file CallingConvLower.h.
Referenced by LowerVASTART().