LLVM 20.0.0git
Functions
llvm::RISCVVType Namespace Reference

Functions

static bool isValidSEW (unsigned SEW)
 
static bool isValidLMUL (unsigned LMUL, bool Fractional)
 
unsigned encodeVTYPE (RISCVII::VLMUL VLMUL, unsigned SEW, bool TailAgnostic, bool MaskAgnostic)
 
static RISCVII::VLMUL getVLMUL (unsigned VType)
 
std::pair< unsigned, booldecodeVLMUL (RISCVII::VLMUL VLMUL)
 
static RISCVII::VLMUL encodeLMUL (unsigned LMUL, bool Fractional)
 
static unsigned decodeVSEW (unsigned VSEW)
 
static unsigned encodeSEW (unsigned SEW)
 
static unsigned getSEW (unsigned VType)
 
static bool isTailAgnostic (unsigned VType)
 
static bool isMaskAgnostic (unsigned VType)
 
void printVType (unsigned VType, raw_ostream &OS)
 
unsigned getSEWLMULRatio (unsigned SEW, RISCVII::VLMUL VLMul)
 
std::optional< RISCVII::VLMULgetSameRatioLMUL (unsigned SEW, RISCVII::VLMUL VLMUL, unsigned EEW)
 
static RISCVII::VLMUL twoTimesVLMUL (RISCVII::VLMUL VLMul)
 Return the RISCVII::VLMUL that is two times VLMul.
 
static std::pair< unsigned, boolgetEMULEqualsEEWDivSEWTimesLMUL (unsigned Log2EEW, const MachineInstr &MI)
 Return EMUL = (EEW / SEW) * LMUL where EEW comes from Log2EEW and LMUL and SEW are from the TSFlags of MI.
 

Function Documentation

◆ decodeVLMUL()

std::pair< unsigned, bool > llvm::RISCVVType::decodeVLMUL ( RISCVII::VLMUL  VLMUL)

◆ decodeVSEW()

static unsigned llvm::RISCVVType::decodeVSEW ( unsigned  VSEW)
inlinestatic

◆ encodeLMUL()

static RISCVII::VLMUL llvm::RISCVVType::encodeLMUL ( unsigned  LMUL,
bool  Fractional 
)
inlinestatic

Definition at line 109 of file RISCVTargetParser.h.

References assert(), isValidLMUL(), and llvm::Log2_32().

Referenced by getSameRatioLMUL(), and lowerGetVectorLength().

◆ encodeSEW()

static unsigned llvm::RISCVVType::encodeSEW ( unsigned  SEW)
inlinestatic

◆ encodeVTYPE()

unsigned llvm::RISCVVType::encodeVTYPE ( RISCVII::VLMUL  VLMUL,
unsigned  SEW,
bool  TailAgnostic,
bool  MaskAgnostic 
)

Definition at line 168 of file RISCVTargetParser.cpp.

References assert(), encodeSEW(), and isValidSEW().

Referenced by llvm::RISCVDAGToDAGISel::selectVSETVLI().

◆ getEMULEqualsEEWDivSEWTimesLMUL()

static std::pair< unsigned, bool > llvm::RISCVVType::getEMULEqualsEEWDivSEWTimesLMUL ( unsigned  Log2EEW,
const MachineInstr MI 
)
static

Return EMUL = (EEW / SEW) * LMUL where EEW comes from Log2EEW and LMUL and SEW are from the TSFlags of MI.

Definition at line 157 of file RISCVVLOptimizer.cpp.

References decodeVLMUL(), llvm::RISCVII::getLMul(), llvm::RISCVII::getSEWOpNum(), and MI.

Referenced by getIntegerExtensionOperandInfo(), and getOperandInfo().

◆ getSameRatioLMUL()

std::optional< RISCVII::VLMUL > llvm::RISCVVType::getSameRatioLMUL ( unsigned  SEW,
RISCVII::VLMUL  VLMUL,
unsigned  EEW 
)

Definition at line 236 of file RISCVTargetParser.cpp.

References encodeLMUL(), getSEWLMULRatio(), and isValidLMUL().

Referenced by adjustIncoming(), and llvm::mca::getEEWAndEMUL().

◆ getSEW()

static unsigned llvm::RISCVVType::getSEW ( unsigned  VType)
inlinestatic

◆ getSEWLMULRatio()

unsigned llvm::RISCVVType::getSEWLMULRatio ( unsigned  SEW,
RISCVII::VLMUL  VLMul 
)

◆ getVLMUL()

static RISCVII::VLMUL llvm::RISCVVType::getVLMUL ( unsigned  VType)
inlinestatic

◆ isMaskAgnostic()

static bool llvm::RISCVVType::isMaskAgnostic ( unsigned  VType)
inlinestatic

Definition at line 132 of file RISCVTargetParser.h.

Referenced by printVType().

◆ isTailAgnostic()

static bool llvm::RISCVVType::isTailAgnostic ( unsigned  VType)
inlinestatic

Definition at line 130 of file RISCVTargetParser.h.

Referenced by isConvertibleToVMV_V_V(), and printVType().

◆ isValidLMUL()

static bool llvm::RISCVVType::isValidLMUL ( unsigned  LMUL,
bool  Fractional 
)
inlinestatic

Definition at line 94 of file RISCVTargetParser.h.

References llvm::isPowerOf2_32().

Referenced by encodeLMUL(), and getSameRatioLMUL().

◆ isValidSEW()

static bool llvm::RISCVVType::isValidSEW ( unsigned  SEW)
inlinestatic

◆ printVType()

void llvm::RISCVVType::printVType ( unsigned  VType,
raw_ostream OS 
)

◆ twoTimesVLMUL()

static RISCVII::VLMUL llvm::RISCVVType::twoTimesVLMUL ( RISCVII::VLMUL  VLMul)
static

Return the RISCVII::VLMUL that is two times VLMul.

Precondition: VLMul is not LMUL_RESERVED or LMUL_8.

Definition at line 134 of file RISCVVLOptimizer.cpp.

References llvm_unreachable, llvm::RISCVII::LMUL_1, llvm::RISCVII::LMUL_2, llvm::RISCVII::LMUL_4, llvm::RISCVII::LMUL_8, llvm::RISCVII::LMUL_F2, llvm::RISCVII::LMUL_F4, and llvm::RISCVII::LMUL_F8.

Referenced by getOperandInfo().