LLVM: llvm::RISCVISAInfo Class Reference (original) (raw)

#include "[llvm/TargetParser/RISCVISAInfo.h](RISCVISAInfo%5F8h%5Fsource.html)"

Public Member Functions
RISCVISAInfo (const RISCVISAInfo &)=delete
RISCVISAInfo & operator= (const RISCVISAInfo &)=delete
LLVM_ABI std::vector< std::string > toFeatures (bool AddAllExtensions=false, bool IgnoreUnknown=true) const
Convert RISC-V ISA info to a feature vector.
const RISCVISAUtils::OrderedExtensionMap & getExtensions () const
unsigned getXLen () const
unsigned getFLen () const
unsigned getMinVLen () const
unsigned getMaxVLen () const
unsigned getMaxELen () const
unsigned getMaxELenFp () const
LLVM_ABI bool hasExtension (StringRef Ext) const
LLVM_ABI std::string toString () const
LLVM_ABI StringRef computeDefaultABI () const
Static Public Member Functions
static LLVM_ABI llvm::Expected< std::unique_ptr< RISCVISAInfo > > parseArchString (StringRef Arch, bool EnableExperimentalExtension, bool ExperimentalExtensionVersionCheck=true)
Parse RISC-V ISA info from arch string.
static LLVM_ABI llvm::Expected< std::unique_ptr< RISCVISAInfo > > parseNormalizedArchString (StringRef Arch)
Parse RISC-V ISA info from an arch string that is already in normalized form (as defined in the psABI).
static LLVM_ABI llvm::Expected< std::unique_ptr< RISCVISAInfo > > parseFeatures (unsigned XLen, const std::vector< std::string > &Features)
Parse RISC-V ISA info from feature vector.
static LLVM_ABI llvm::Expected< std::unique_ptr< RISCVISAInfo > > createFromExtMap (unsigned XLen, const RISCVISAUtils::OrderedExtensionMap &Exts)
static LLVM_ABI bool isSupportedExtensionFeature (StringRef Ext)
static LLVM_ABI bool isSupportedExtension (StringRef Ext)
static LLVM_ABI bool isSupportedExtensionWithVersion (StringRef Ext)
static LLVM_ABI bool isSupportedExtension (StringRef Ext, unsigned MajorVersion, unsigned MinorVersion)
static LLVM_ABI std::string getTargetFeatureForExtension (StringRef Ext)
static LLVM_ABI void printSupportedExtensions (StringMap< StringRef > &DescMap)
static LLVM_ABI void printEnabledExtensions (bool IsRV64, std::set< StringRef > &EnabledFeatureNames, StringMap< StringRef > &DescMap)
static LLVM_ABI std::pair< int, int > getRISCVFeaturesBitsInfo (StringRef Ext)
Return the group id and bit position of __riscv_feature_bits.
Static Public Attributes
static constexpr unsigned FeatureBitSize = 2

Definition at line 24 of file RISCVISAInfo.h.

computeDefaultABI()

StringRef RISCVISAInfo::computeDefaultABI ( ) const

createFromExtMap()

getExtensions()

getFLen()

unsigned llvm::RISCVISAInfo::getFLen ( ) const inline

getMaxELen()

unsigned llvm::RISCVISAInfo::getMaxELen ( ) const inline

getMaxELenFp()

unsigned llvm::RISCVISAInfo::getMaxELenFp ( ) const inline

getMaxVLen()

unsigned llvm::RISCVISAInfo::getMaxVLen ( ) const inline

getMinVLen()

unsigned llvm::RISCVISAInfo::getMinVLen ( ) const inline

getRISCVFeaturesBitsInfo()

std::pair< int, int > RISCVISAInfo::getRISCVFeaturesBitsInfo ( StringRef Ext) static

getTargetFeatureForExtension()

std::string RISCVISAInfo::getTargetFeatureForExtension ( StringRef Ext) static

getXLen()

unsigned llvm::RISCVISAInfo::getXLen ( ) const inline

hasExtension()

isSupportedExtension() [1/2]

isSupportedExtension() [2/2]

isSupportedExtensionFeature()

bool RISCVISAInfo::isSupportedExtensionFeature ( StringRef Ext) static

isSupportedExtensionWithVersion()

bool RISCVISAInfo::isSupportedExtensionWithVersion ( StringRef Ext) static

operator=()

parseArchString()

Parse RISC-V ISA info from arch string.

If IgnoreUnknown is set, any unrecognised extension names or extensions with unrecognised versions will be silently dropped, except for the special case of the base 'i' and 'e' extensions, where the default version will be used (as ignoring the base is not possible).

Definition at line 549 of file RISCVISAInfo.cpp.

References llvm::all_of(), llvm::RISCVISAUtils::AllStdExts, assert(), llvm::CallingConv::C, llvm::StringRef::consume_front(), contains(), llvm::StringRef::drop_front(), llvm::StringRef::empty(), llvm::StringRef::find(), findDefaultVersion(), findLastNonVersionCharacter(), llvm::StringRef::front(), getError(), getErrorForInvalidExt(), getExtensionType(), getExtensionTypeDesc(), getExtensionVersion(), I, llvm::isDigit(), llvm::isLower(), isSupportedExtension(), parseArchString(), Profile, RISCVGImplications, RISCVGImplicationsZi, RISCVISAInfo(), llvm::StringRef::size(), llvm::StringRef::slice(), llvm::StringRef::starts_with(), llvm::StringRef::str(), llvm::StringRef::substr(), llvm::StringRef::take_front(), llvm::upper_bound(), and llvm::Version.

Referenced by llvm::RISCV::getFeaturesForCPU(), and parseArchString().

parseFeatures()

parseNormalizedArchString()

Parse RISC-V ISA info from an arch string that is already in normalized form (as defined in the psABI).

Unlike parseArchString, this function will not error for unrecognized extension names or extension versions.

Definition at line 473 of file RISCVISAInfo.cpp.

References llvm::all_of(), llvm::CallingConv::C, llvm::StringRef::consume_front(), llvm::StringRef::drop_front(), llvm::StringRef::empty(), llvm::StringRef::find(), llvm::StringRef::getAsInteger(), getError(), llvm::isDigit(), llvm::isLower(), RISCVISAInfo(), llvm::StringRef::rsplit(), llvm::StringRef::size(), llvm::StringRef::slice(), llvm::StringRef::str(), and llvm::StringRef::substr().

printEnabledExtensions()

printSupportedExtensions()

toFeatures()

std::vector< std::string > RISCVISAInfo::toFeatures ( bool AddAllExtensions = false,
bool IgnoreUnknown = true ) const

toString()

std::string RISCVISAInfo::toString ( ) const

FeatureBitSize

unsigned llvm::RISCVISAInfo::FeatureBitSize = 2 staticconstexpr

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