LLVM 20.0.0git
Functions | Variables
RISCVCallingConv.cpp File Reference
#include "RISCVCallingConv.h"
#include "RISCVSubtarget.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/MC/MCRegister.h"

Go to the source code of this file.

Functions

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 (unsigned XLen, CCState &State, CCValAssign VA1, ISD::ArgFlagsTy ArgFlags1, unsigned ValNo2, MVT ValVT2, MVT LocVT2, ISD::ArgFlagsTy ArgFlags2, bool EABI)
 
static MCRegister allocateRVVReg (MVT ValVT, unsigned ValNo, CCState &State, const RISCVTargetLowering &TLI)
 

Variables

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

static MCRegister allocateRVVReg ( MVT  ValVT,
unsigned  ValNo,
CCState State,
const RISCVTargetLowering TLI 
)
static

◆ CC_RISCVAssign2XLen()

static bool CC_RISCVAssign2XLen ( unsigned  XLen,
CCState State,
CCValAssign  VA1,
ISD::ArgFlagsTy  ArgFlags1,
unsigned  ValNo2,
MVT  ValVT2,
MVT  LocVT2,
ISD::ArgFlagsTy  ArgFlags2,
bool  EABI 
)
static

◆ getArgGPR16s()

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

Definition at line 142 of file RISCVCallingConv.cpp.

References llvm::RISCVABI::ABI_ILP32E, and llvm::RISCVABI::ABI_LP64E.

Referenced by llvm::CC_RISCV().

◆ getArgGPR32s()

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

Definition at line 159 of file RISCVCallingConv.cpp.

References llvm::RISCVABI::ABI_ILP32E, and llvm::RISCVABI::ABI_LP64E.

Referenced by llvm::CC_RISCV().

◆ getFastCCArgGPRF16s()

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

Definition at line 194 of file RISCVCallingConv.cpp.

References llvm::RISCVABI::ABI_ILP32E, and llvm::RISCVABI::ABI_LP64E.

Referenced by llvm::CC_RISCV_FastCC().

◆ getFastCCArgGPRF32s()

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

Definition at line 214 of file RISCVCallingConv.cpp.

References llvm::RISCVABI::ABI_ILP32E, and llvm::RISCVABI::ABI_LP64E.

Referenced by llvm::CC_RISCV_FastCC().

◆ getFastCCArgGPRs()

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

Definition at line 176 of file RISCVCallingConv.cpp.

References llvm::RISCVABI::ABI_ILP32E, and llvm::RISCVABI::ABI_LP64E.

Referenced by llvm::CC_RISCV_FastCC().

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 45 of file RISCVCallingConv.cpp.

Referenced by llvm::CC_RISCV().

◆ 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 48 of file RISCVCallingConv.cpp.

Referenced by llvm::CC_RISCV().

◆ 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 51 of file RISCVCallingConv.cpp.

Referenced by llvm::CC_RISCV().

◆ 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 59 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 62 of file RISCVCallingConv.cpp.

Referenced by allocateRVVReg().

◆ ArgVRM8s

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

Definition at line 64 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 65 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 111 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 123 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 70 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 115 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 76 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 119 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 82 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 89 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 96 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 102 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 55 of file RISCVCallingConv.cpp.

Referenced by allocateRVVReg().