LLVM  15.0.0git
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
llvm::RISCVISAInfo Class Reference

#include "llvm/Support/RISCVISAInfo.h"


struct  ExtensionComparator
 Helper class for OrderedExtensionMap. More...

Public Types

typedef std::map< std::string, RISCVExtensionInfo, ExtensionComparatorOrderedExtensionMap
 OrderedExtensionMap is std::map, it's specialized to keep entries in canonical order of extension. More...

Public Member Functions

 RISCVISAInfo (const RISCVISAInfo &)=delete
RISCVISAInfooperator= (const RISCVISAInfo &)=delete
void toFeatures (std::vector< StringRef > &Features, std::function< StringRef(const Twine &)> StrAlloc) const
 Convert RISCV ISA info to a feature vector. More...
const OrderedExtensionMapgetExtensions () const
unsigned getXLen () const
unsigned getFLen () const
unsigned getMinVLen () const
unsigned getMaxELen () const
unsigned getMaxELenFp () const
bool hasExtension (StringRef Ext) const
std::string toString () const
std::vector< std::string > toFeatureVector () const
StringRef computeDefaultABI () const

Static Public Member Functions

static bool compareExtension (const std::string &LHS, const std::string &RHS)
static llvm::Expected< std::unique_ptr< RISCVISAInfo > > parseArchString (StringRef Arch, bool EnableExperimentalExtension, bool ExperimentalExtensionVersionCheck=true)
 Parse RISCV ISA info from arch string. More...
static llvm::Expected< std::unique_ptr< RISCVISAInfo > > parseFeatures (unsigned XLen, const std::vector< std::string > &Features)
 Parse RISCV ISA info from feature vector. More...
static bool isSupportedExtensionFeature (StringRef Ext)
static bool isSupportedExtension (StringRef Ext)
static bool isSupportedExtension (StringRef Ext, unsigned MajorVersion, unsigned MinorVersion)

Detailed Description

Definition at line 26 of file RISCVISAInfo.h.

Member Typedef Documentation

◆ OrderedExtensionMap

OrderedExtensionMap is std::map, it's specialized to keep entries in canonical order of extension.

Definition at line 43 of file RISCVISAInfo.h.

Constructor & Destructor Documentation


llvm::RISCVISAInfo::RISCVISAInfo ( const RISCVISAInfo )

Referenced by parseArchString(), and parseFeatures().

Member Function Documentation

◆ compareExtension()

bool RISCVISAInfo::compareExtension ( const std::string &  LHS,
const std::string &  RHS 

◆ computeDefaultABI()

StringRef RISCVISAInfo::computeDefaultABI ( ) const

Definition at line 965 of file RISCVISAInfo.cpp.

References hasExtension(), and llvm_unreachable.

◆ getExtensions()

const OrderedExtensionMap& llvm::RISCVISAInfo::getExtensions ( ) const

Definition at line 58 of file RISCVISAInfo.h.

◆ getFLen()

unsigned llvm::RISCVISAInfo::getFLen ( ) const

Definition at line 61 of file RISCVISAInfo.h.

◆ getMaxELen()

unsigned llvm::RISCVISAInfo::getMaxELen ( ) const

Definition at line 63 of file RISCVISAInfo.h.

◆ getMaxELenFp()

unsigned llvm::RISCVISAInfo::getMaxELenFp ( ) const

Definition at line 64 of file RISCVISAInfo.h.

◆ getMinVLen()

unsigned llvm::RISCVISAInfo::getMinVLen ( ) const

Definition at line 62 of file RISCVISAInfo.h.

◆ getXLen()

unsigned llvm::RISCVISAInfo::getXLen ( ) const

Definition at line 60 of file RISCVISAInfo.h.

◆ hasExtension()

bool RISCVISAInfo::hasExtension ( StringRef  Ext) const

◆ isSupportedExtension() [1/2]

bool RISCVISAInfo::isSupportedExtension ( StringRef  Ext)

◆ isSupportedExtension() [2/2]

bool RISCVISAInfo::isSupportedExtension ( StringRef  Ext,
unsigned  MajorVersion,
unsigned  MinorVersion 

◆ isSupportedExtensionFeature()

bool RISCVISAInfo::isSupportedExtensionFeature ( StringRef  Ext)

◆ operator=()

RISCVISAInfo& llvm::RISCVISAInfo::operator= ( const RISCVISAInfo )

◆ parseArchString()

llvm::Expected< std::unique_ptr< RISCVISAInfo > > RISCVISAInfo::parseArchString ( StringRef  Arch,
bool  EnableExperimentalExtension,
bool  ExperimentalExtensionVersionCheck = true 

◆ parseFeatures()

llvm::Expected< std::unique_ptr< RISCVISAInfo > > RISCVISAInfo::parseFeatures ( unsigned  XLen,
const std::vector< std::string > &  Features 

◆ toFeatures()

void RISCVISAInfo::toFeatures ( std::vector< StringRef > &  Features,
std::function< StringRef(const Twine &)>  StrAlloc 
) const

Convert RISCV ISA info to a feature vector.

Definition at line 316 of file RISCVISAInfo.cpp.

References llvm::MipsISD::Ext, and isExperimentalExtension().

◆ toFeatureVector()

std::vector< std::string > RISCVISAInfo::toFeatureVector ( ) const

Definition at line 938 of file RISCVISAInfo.cpp.

References llvm::MipsISD::Ext, and isExperimentalExtension().

◆ toString()

std::string RISCVISAInfo::toString ( ) const

The documentation for this class was generated from the following files: