LLVM 23.0.0git
RISCVCallingConv.cpp File Reference

Go to the source code of this file.

Functions

static bool CC_RISCV_Impl (unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags, Type *OrigTy, CCState &State, bool IsRet)
static ArrayRef< MCPhysReggetArgGPR16s (const RISCVABI::ABI ABI)
static ArrayRef< MCPhysReggetArgGPR32s (const RISCVABI::ABI ABI)
static ArrayRef< MCPhysReggetFastCCArgGPRs (const RISCVABI::ABI ABI)
static ArrayRef< MCPhysReggetFastCCArgGPRF16s (const RISCVABI::ABI ABI)
static ArrayRef< MCPhysReggetFastCCArgGPRF32s (const RISCVABI::ABI ABI)
static bool CC_RISCVAssign2XLen (CCState &State, CCValAssign VA1, ISD::ArgFlagsTy ArgFlags1, unsigned ValNo2, MVT ValVT2, MVT LocVT2, ISD::ArgFlagsTy ArgFlags2, const RISCVSubtarget &Subtarget)
static MCRegister allocateRVVReg (MVT ValVT, unsigned ValNo, CCState &State, const RISCVTargetLowering &TLI)
static bool CC_RISCV_FastCC (unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags, Type *OrigTy, CCState &State)
static bool CC_RISCV_GHC (unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags, Type *OrigTy, CCState &State)

Variables

static CCAssignFn CC_RISCV_GHC
 Used for assigning arguments with CallingConvention::GHC.
static CCAssignFn CC_RISCV_FastCC
 Used for assigning arguments with CallingConvention::Fast.
static const MCPhysReg ArgFPR16s []
static const MCPhysReg ArgFPR32s []
static const MCPhysReg ArgFPR64s []
static const MCPhysReg ArgVRs []
static const MCPhysReg ArgVRM2s []
static const MCPhysReg ArgVRM4s []
static const MCPhysReg ArgVRM8s [] = {RISCV::V8M8, RISCV::V16M8}
static const MCPhysReg ArgVRN2M1s []
static const MCPhysReg ArgVRN3M1s []
static const MCPhysReg ArgVRN4M1s []
static const MCPhysReg ArgVRN5M1s []
static const MCPhysReg ArgVRN6M1s []
static const MCPhysReg ArgVRN7M1s []
static const MCPhysReg ArgVRN8M1s []
static const MCPhysReg ArgVRN2M2s []
static const MCPhysReg ArgVRN3M2s []
static const MCPhysReg ArgVRN4M2s []
static const MCPhysReg ArgVRN2M4s []

Function Documentation

◆ allocateRVVReg()

◆ CC_RISCV_FastCC()

◆ CC_RISCV_GHC()

bool CC_RISCV_GHC ( unsigned ValNo,
MVT ValVT,
MVT LocVT,
CCValAssign::LocInfo LocInfo,
ISD::ArgFlagsTy ArgFlags,
Type * OrigTy,
CCState & State )
static

◆ CC_RISCV_Impl()

bool CC_RISCV_Impl ( unsigned ValNo,
MVT ValVT,
MVT LocVT,
CCValAssign::LocInfo LocInfo,
ISD::ArgFlagsTy ArgFlags,
Type * OrigTy,
CCState & State,
bool IsRet )
static

Definition at line 367 of file RISCVCallingConv.cpp.

References llvm::RISCVABI::ABI_ILP32, llvm::RISCVABI::ABI_ILP32D, llvm::RISCVABI::ABI_ILP32E, llvm::RISCVABI::ABI_ILP32F, llvm::RISCVABI::ABI_LP64, llvm::RISCVABI::ABI_LP64D, llvm::RISCVABI::ABI_LP64E, llvm::RISCVABI::ABI_LP64F, allocateRVVReg(), ArgFPR16s, ArgFPR32s, ArgFPR64s, ArgGPRs, assert(), llvm::CCValAssign::BCvt, CC_RISCVAssign2XLen(), llvm::SmallVectorImpl< T >::clear(), DL, llvm::SmallVectorTemplateCommon< T, typename >::empty(), getArgGPR16s(), getArgGPR32s(), llvm::RISCV::getArgGPRs(), llvm::CCValAssign::getCustomMem(), llvm::CCValAssign::getCustomReg(), llvm::MachineFunction::getDataLayout(), llvm::MachineFunction::getInfo(), llvm::CCValAssign::getMem(), llvm::ISD::ArgFlagsTy::getNonZeroOrigAlign(), llvm::CCValAssign::getPending(), llvm::CCValAssign::getReg(), llvm::MVT::getScalarSizeInBits(), llvm::MVT::getStoreSize(), llvm::MachineFunction::getSubtarget(), llvm::RISCVSubtarget::getTargetABI(), llvm::RISCVSubtarget::getTargetLowering(), llvm::RISCVSubtarget::getXLen(), llvm::RISCVSubtarget::getXLenVT(), llvm::CCValAssign::Indirect, llvm::MVT::isFixedLengthVector(), llvm::MVT::isFloatingPoint(), llvm::ISD::ArgFlagsTy::isNest(), llvm::RISCVSubtarget::isPExtPackedType(), llvm::MVT::isRISCVVectorTuple(), llvm::MVT::isScalableVector(), llvm::MVT::isScalarInteger(), llvm::ISD::ArgFlagsTy::isSplit(), llvm::ISD::ArgFlagsTy::isSplitEnd(), llvm::ISD::ArgFlagsTy::isVarArg(), llvm::MVT::isVector(), llvm_unreachable, llvm::SmallVectorTemplateBase< T, bool >::push_back(), Reg, llvm::reportFatalUsageError(), llvm::SmallVectorTemplateCommon< T, typename >::size(), and llvm::MaybeAlign::valueOrOne().

◆ CC_RISCVAssign2XLen()

◆ getArgGPR16s()

ArrayRef< MCPhysReg > getArgGPR16s ( const RISCVABI::ABI ABI)
static

◆ getArgGPR32s()

ArrayRef< MCPhysReg > getArgGPR32s ( const RISCVABI::ABI ABI)
static

◆ getFastCCArgGPRF16s()

ArrayRef< MCPhysReg > getFastCCArgGPRF16s ( const RISCVABI::ABI ABI)
static

◆ getFastCCArgGPRF32s()

ArrayRef< MCPhysReg > getFastCCArgGPRF32s ( const RISCVABI::ABI ABI)
static

◆ getFastCCArgGPRs()

ArrayRef< MCPhysReg > getFastCCArgGPRs ( const RISCVABI::ABI ABI)
static

Variable Documentation

◆ ArgFPR16s

const MCPhysReg ArgFPR16s[]
static
Initial value:
= {RISCV::F10_H, RISCV::F11_H, RISCV::F12_H,
RISCV::F13_H, RISCV::F14_H, RISCV::F15_H,
RISCV::F16_H, RISCV::F17_H}

Definition at line 83 of file RISCVCallingConv.cpp.

Referenced by CC_RISCV_Impl().

◆ ArgFPR32s

const MCPhysReg ArgFPR32s[]
static
Initial value:
= {RISCV::F10_F, RISCV::F11_F, RISCV::F12_F,
RISCV::F13_F, RISCV::F14_F, RISCV::F15_F,
RISCV::F16_F, RISCV::F17_F}

Definition at line 86 of file RISCVCallingConv.cpp.

◆ ArgFPR64s

const MCPhysReg ArgFPR64s[]
static
Initial value:
= {RISCV::F10_D, RISCV::F11_D, RISCV::F12_D,
RISCV::F13_D, RISCV::F14_D, RISCV::F15_D,
RISCV::F16_D, RISCV::F17_D}

Definition at line 89 of file RISCVCallingConv.cpp.

◆ ArgVRM2s

const MCPhysReg ArgVRM2s[]
static
Initial value:
= {RISCV::V8M2, RISCV::V10M2, RISCV::V12M2,
RISCV::V14M2, RISCV::V16M2, RISCV::V18M2,
RISCV::V20M2, RISCV::V22M2}

Definition at line 97 of file RISCVCallingConv.cpp.

Referenced by allocateRVVReg().

◆ ArgVRM4s

const MCPhysReg ArgVRM4s[]
static
Initial value:
= {RISCV::V8M4, RISCV::V12M4, RISCV::V16M4,
RISCV::V20M4}

Definition at line 100 of file RISCVCallingConv.cpp.

Referenced by allocateRVVReg().

◆ ArgVRM8s

const MCPhysReg ArgVRM8s[] = {RISCV::V8M8, RISCV::V16M8}
static

Definition at line 102 of file RISCVCallingConv.cpp.

Referenced by allocateRVVReg().

◆ ArgVRN2M1s

const MCPhysReg ArgVRN2M1s[]
static
Initial value:
= {
RISCV::V8_V9, RISCV::V9_V10, RISCV::V10_V11, RISCV::V11_V12,
RISCV::V12_V13, RISCV::V13_V14, RISCV::V14_V15, RISCV::V15_V16,
RISCV::V16_V17, RISCV::V17_V18, RISCV::V18_V19, RISCV::V19_V20,
RISCV::V20_V21, RISCV::V21_V22, RISCV::V22_V23}

Definition at line 103 of file RISCVCallingConv.cpp.

Referenced by allocateRVVReg().

◆ ArgVRN2M2s

const MCPhysReg ArgVRN2M2s[]
static
Initial value:
= {RISCV::V8M2_V10M2, RISCV::V10M2_V12M2,
RISCV::V12M2_V14M2, RISCV::V14M2_V16M2,
RISCV::V16M2_V18M2, RISCV::V18M2_V20M2,
RISCV::V20M2_V22M2}

Definition at line 149 of file RISCVCallingConv.cpp.

Referenced by allocateRVVReg().

◆ ArgVRN2M4s

const MCPhysReg ArgVRN2M4s[]
static
Initial value:
= {RISCV::V8M4_V12M4, RISCV::V12M4_V16M4,
RISCV::V16M4_V20M4}

Definition at line 161 of file RISCVCallingConv.cpp.

Referenced by allocateRVVReg().

◆ ArgVRN3M1s

const MCPhysReg ArgVRN3M1s[]
static
Initial value:
= {
RISCV::V8_V9_V10, RISCV::V9_V10_V11, RISCV::V10_V11_V12,
RISCV::V11_V12_V13, RISCV::V12_V13_V14, RISCV::V13_V14_V15,
RISCV::V14_V15_V16, RISCV::V15_V16_V17, RISCV::V16_V17_V18,
RISCV::V17_V18_V19, RISCV::V18_V19_V20, RISCV::V19_V20_V21,
RISCV::V20_V21_V22, RISCV::V21_V22_V23}

Definition at line 108 of file RISCVCallingConv.cpp.

Referenced by allocateRVVReg().

◆ ArgVRN3M2s

const MCPhysReg ArgVRN3M2s[]
static
Initial value:
= {
RISCV::V8M2_V10M2_V12M2, RISCV::V10M2_V12M2_V14M2,
RISCV::V12M2_V14M2_V16M2, RISCV::V14M2_V16M2_V18M2,
RISCV::V16M2_V18M2_V20M2, RISCV::V18M2_V20M2_V22M2}

Definition at line 153 of file RISCVCallingConv.cpp.

Referenced by allocateRVVReg().

◆ ArgVRN4M1s

const MCPhysReg ArgVRN4M1s[]
static
Initial value:
= {
RISCV::V8_V9_V10_V11, RISCV::V9_V10_V11_V12, RISCV::V10_V11_V12_V13,
RISCV::V11_V12_V13_V14, RISCV::V12_V13_V14_V15, RISCV::V13_V14_V15_V16,
RISCV::V14_V15_V16_V17, RISCV::V15_V16_V17_V18, RISCV::V16_V17_V18_V19,
RISCV::V17_V18_V19_V20, RISCV::V18_V19_V20_V21, RISCV::V19_V20_V21_V22,
RISCV::V20_V21_V22_V23}

Definition at line 114 of file RISCVCallingConv.cpp.

Referenced by allocateRVVReg().

◆ ArgVRN4M2s

const MCPhysReg ArgVRN4M2s[]
static
Initial value:
= {
RISCV::V8M2_V10M2_V12M2_V14M2, RISCV::V10M2_V12M2_V14M2_V16M2,
RISCV::V12M2_V14M2_V16M2_V18M2, RISCV::V14M2_V16M2_V18M2_V20M2,
RISCV::V16M2_V18M2_V20M2_V22M2}

Definition at line 157 of file RISCVCallingConv.cpp.

Referenced by allocateRVVReg().

◆ ArgVRN5M1s

const MCPhysReg ArgVRN5M1s[]
static
Initial value:
= {
RISCV::V8_V9_V10_V11_V12, RISCV::V9_V10_V11_V12_V13,
RISCV::V10_V11_V12_V13_V14, RISCV::V11_V12_V13_V14_V15,
RISCV::V12_V13_V14_V15_V16, RISCV::V13_V14_V15_V16_V17,
RISCV::V14_V15_V16_V17_V18, RISCV::V15_V16_V17_V18_V19,
RISCV::V16_V17_V18_V19_V20, RISCV::V17_V18_V19_V20_V21,
RISCV::V18_V19_V20_V21_V22, RISCV::V19_V20_V21_V22_V23}

Definition at line 120 of file RISCVCallingConv.cpp.

Referenced by allocateRVVReg().

◆ ArgVRN6M1s

const MCPhysReg ArgVRN6M1s[]
static
Initial value:
= {
RISCV::V8_V9_V10_V11_V12_V13, RISCV::V9_V10_V11_V12_V13_V14,
RISCV::V10_V11_V12_V13_V14_V15, RISCV::V11_V12_V13_V14_V15_V16,
RISCV::V12_V13_V14_V15_V16_V17, RISCV::V13_V14_V15_V16_V17_V18,
RISCV::V14_V15_V16_V17_V18_V19, RISCV::V15_V16_V17_V18_V19_V20,
RISCV::V16_V17_V18_V19_V20_V21, RISCV::V17_V18_V19_V20_V21_V22,
RISCV::V18_V19_V20_V21_V22_V23}

Definition at line 127 of file RISCVCallingConv.cpp.

Referenced by allocateRVVReg().

◆ ArgVRN7M1s

const MCPhysReg ArgVRN7M1s[]
static
Initial value:
= {
RISCV::V8_V9_V10_V11_V12_V13_V14, RISCV::V9_V10_V11_V12_V13_V14_V15,
RISCV::V10_V11_V12_V13_V14_V15_V16, RISCV::V11_V12_V13_V14_V15_V16_V17,
RISCV::V12_V13_V14_V15_V16_V17_V18, RISCV::V13_V14_V15_V16_V17_V18_V19,
RISCV::V14_V15_V16_V17_V18_V19_V20, RISCV::V15_V16_V17_V18_V19_V20_V21,
RISCV::V16_V17_V18_V19_V20_V21_V22, RISCV::V17_V18_V19_V20_V21_V22_V23}

Definition at line 134 of file RISCVCallingConv.cpp.

Referenced by allocateRVVReg().

◆ ArgVRN8M1s

const MCPhysReg ArgVRN8M1s[]
static
Initial value:
= {RISCV::V8_V9_V10_V11_V12_V13_V14_V15,
RISCV::V9_V10_V11_V12_V13_V14_V15_V16,
RISCV::V10_V11_V12_V13_V14_V15_V16_V17,
RISCV::V11_V12_V13_V14_V15_V16_V17_V18,
RISCV::V12_V13_V14_V15_V16_V17_V18_V19,
RISCV::V13_V14_V15_V16_V17_V18_V19_V20,
RISCV::V14_V15_V16_V17_V18_V19_V20_V21,
RISCV::V15_V16_V17_V18_V19_V20_V21_V22,
RISCV::V16_V17_V18_V19_V20_V21_V22_V23}

Definition at line 140 of file RISCVCallingConv.cpp.

Referenced by allocateRVVReg().

◆ ArgVRs

const MCPhysReg ArgVRs[]
static
Initial value:
= {
RISCV::V8, RISCV::V9, RISCV::V10, RISCV::V11, RISCV::V12, RISCV::V13,
RISCV::V14, RISCV::V15, RISCV::V16, RISCV::V17, RISCV::V18, RISCV::V19,
RISCV::V20, RISCV::V21, RISCV::V22, RISCV::V23}

Definition at line 93 of file RISCVCallingConv.cpp.

◆ CC_RISCV_FastCC

CCAssignFn CC_RISCV_FastCC
static

Used for assigning arguments with CallingConvention::Fast.

Definition at line 33 of file RISCVCallingConv.cpp.

◆ CC_RISCV_GHC

CCAssignFn CC_RISCV_GHC
static

Used for assigning arguments with CallingConvention::GHC.

Definition at line 30 of file RISCVCallingConv.cpp.