LLVM
17.0.0git
|
#include "llvm/Support/RISCVISAInfo.h"
Classes | |
struct | ExtensionComparator |
Helper class for OrderedExtensionMap. More... | |
Public Types | |
typedef std::map< std::string, RISCVExtensionInfo, ExtensionComparator > | OrderedExtensionMap |
OrderedExtensionMap is std::map, it's specialized to keep entries in canonical order of extension. More... | |
Public Member Functions | |
RISCVISAInfo (const RISCVISAInfo &)=delete | |
RISCVISAInfo & | operator= (const RISCVISAInfo &)=delete |
RISCVISAInfo (unsigned XLen, OrderedExtensionMap &Exts) | |
void | toFeatures (std::vector< StringRef > &Features, llvm::function_ref< StringRef(const Twine &)> StrAlloc, bool AddAllExtensions) const |
Convert RISCV ISA info to a feature vector. More... | |
const OrderedExtensionMap & | getExtensions () const |
unsigned | getXLen () const |
unsigned | getFLen () const |
unsigned | getMinVLen () const |
unsigned | getMaxVLen () 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, bool IgnoreUnknown=false) |
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) |
static llvm::Expected< std::unique_ptr< RISCVISAInfo > > | postProcessAndChecking (std::unique_ptr< RISCVISAInfo > &&ISAInfo) |
Definition at line 26 of file RISCVISAInfo.h.
typedef std::map<std::string, RISCVExtensionInfo, ExtensionComparator> llvm::RISCVISAInfo::OrderedExtensionMap |
OrderedExtensionMap is std::map, it's specialized to keep entries in canonical order of extension.
Definition at line 43 of file RISCVISAInfo.h.
|
delete |
Referenced by parseArchString(), and parseFeatures().
|
inline |
Definition at line 45 of file RISCVISAInfo.h.
Definition at line 309 of file RISCVISAInfo.cpp.
References LHS, multiLetterExtensionRank(), RHS, and singleLetterExtensionRank().
Referenced by llvm::RISCVISAInfo::ExtensionComparator::operator()().
StringRef RISCVISAInfo::computeDefaultABI | ( | ) | const |
Definition at line 1026 of file RISCVISAInfo.cpp.
References hasExtension(), and llvm_unreachable.
|
inline |
Definition at line 63 of file RISCVISAInfo.h.
|
inline |
Definition at line 66 of file RISCVISAInfo.h.
|
inline |
Definition at line 69 of file RISCVISAInfo.h.
|
inline |
Definition at line 70 of file RISCVISAInfo.h.
|
inline |
Definition at line 68 of file RISCVISAInfo.h.
|
inline |
Definition at line 67 of file RISCVISAInfo.h.
|
inline |
Definition at line 65 of file RISCVISAInfo.h.
bool RISCVISAInfo::hasExtension | ( | StringRef | Ext | ) | const |
Definition at line 245 of file RISCVISAInfo.cpp.
References llvm::MipsISD::Ext, isSupportedExtension(), and stripExperimentalPrefix().
Referenced by computeDefaultABI().
|
static |
Definition at line 230 of file RISCVISAInfo.cpp.
References llvm::any_of(), llvm::MipsISD::Ext, SupportedExperimentalExtensions, and SupportedExtensions.
Referenced by getExtensionVersion(), hasExtension(), and parseArchString().
|
static |
Definition at line 235 of file RISCVISAInfo.cpp.
References llvm::any_of(), llvm::MipsISD::Ext, SupportedExperimentalExtensions, and SupportedExtensions.
|
static |
Definition at line 221 of file RISCVISAInfo.cpp.
References llvm::any_of(), llvm::MipsISD::Ext, stripExperimentalPrefix(), SupportedExperimentalExtensions, and SupportedExtensions.
Referenced by llvm::RISCVFeatures::parseFeatureBits().
|
delete |
|
static |
Parse RISCV ISA info from arch string.
Definition at line 507 of file RISCVISAInfo.cpp.
References AllStdExts, llvm::any_of(), llvm::StringRef::begin(), llvm::StringRef::consume_front(), llvm::consumeError(), llvm::StringRef::contains(), llvm::createStringError(), llvm::StringRef::drop_front(), E, llvm::StringRef::end(), llvm::MipsISD::Ext, llvm::StringRef::find_first_of(), findDefaultVersion(), findFirstNonVersionCharacter(), getExtensionType(), getExtensionTypeDesc(), getExtensionVersion(), I, llvm::invalid_argument, llvm::is_contained(), isSupportedExtension(), llvm_unreachable, move, llvm::StringRef::npos, postProcessAndChecking(), llvm::cl::Prefix, RISCVISAInfo(), llvm::StringRef::size(), llvm::StringRef::split(), llvm::StringRef::startswith(), llvm::StringRef::str(), llvm::StringRef::substr(), and llvm::IndexedInstrProf::Version.
|
static |
Parse RISCV ISA info from feature vector.
Definition at line 473 of file RISCVISAInfo.cpp.
References llvm::ArrayRef(), assert(), llvm::StringRef::drop_front(), llvm::find_if(), move, postProcessAndChecking(), RISCVISAInfo(), llvm::StringRef::size(), llvm::StringRef::str(), stripExperimentalPrefix(), SupportedExperimentalExtensions, and SupportedExtensions.
Referenced by llvm::RISCVFeatures::parseFeatureBits().
|
static |
Definition at line 1014 of file RISCVISAInfo.cpp.
References move.
Referenced by parseArchString(), and parseFeatures().
void RISCVISAInfo::toFeatures | ( | std::vector< StringRef > & | Features, |
llvm::function_ref< StringRef(const Twine &)> | StrAlloc, | ||
bool | AddAllExtensions | ||
) | const |
Convert RISCV ISA info to a feature vector.
Definition at line 333 of file RISCVISAInfo.cpp.
References llvm::MipsISD::Ext, isExperimentalExtension(), SupportedExperimentalExtensions, and SupportedExtensions.
std::vector< std::string > RISCVISAInfo::toFeatureVector | ( | ) | const |
Definition at line 999 of file RISCVISAInfo.cpp.
References llvm::MipsISD::Ext, and isExperimentalExtension().
std::string RISCVISAInfo::toString | ( | ) | const |
Definition at line 982 of file RISCVISAInfo.cpp.
References llvm::MipsISD::Ext, llvm::AArch64CC::LS, and llvm::raw_string_ostream::str().