Go to the documentation of this file.
9 #ifndef LLVM_SUPPORT_RISCVISAINFO_H
10 #define LLVM_SUPPORT_RISCVISAINFO_H
42 typedef std::map<std::string, RISCVExtensionInfo, ExtensionComparator>
48 bool ExperimentalExtensionVersionCheck =
true);
52 parseFeatures(
unsigned XLen,
const std::vector<std::string> &Features);
55 void toFeatures(std::vector<StringRef> &Features,
60 unsigned getXLen()
const {
return XLen; };
61 unsigned getFLen()
const {
return FLen; };
74 unsigned MinorVersion);
78 : XLen(XLen), FLen(0), MinVLen(0), MaxELen(0), MaxELenFp(0) {}
83 unsigned MaxELen, MaxELenFp;
87 void addExtension(StringRef ExtName,
unsigned MajorVersion,
88 unsigned MinorVersion);
90 Error checkDependency();
92 void updateImplication();
93 void updateCombination();
99 postProcessAndChecking(std::unique_ptr<RISCVISAInfo> &&ISAInfo);
bool hasExtension(StringRef Ext) const
This is an optimization pass for GlobalISel generic memory operations.
static bool compareExtension(const std::string &LHS, const std::string &RHS)
StringRef computeDefaultABI() const
static bool isSupportedExtension(StringRef Ext)
Tagged union holding either a T or a Error.
std::vector< std::string > toFeatureVector() const
const OrderedExtensionMap & getExtensions() const
static llvm::Expected< std::unique_ptr< RISCVISAInfo > > parseFeatures(unsigned XLen, const std::vector< std::string > &Features)
Parse RISCV ISA info from feature vector.
std::string toString() const
unsigned getMinVLen() const
Helper class for OrderedExtensionMap.
static llvm::Expected< std::unique_ptr< RISCVISAInfo > > parseArchString(StringRef Arch, bool EnableExperimentalExtension, bool ExperimentalExtensionVersionCheck=true)
Parse RISCV ISA info from arch string.
print Print MemDeps of function
bool operator()(const std::string &LHS, const std::string &RHS) const
unsigned getMaxELenFp() const
StringRef - Represent a constant reference to a string, i.e.
std::map< std::string, RISCVExtensionInfo, ExtensionComparator > OrderedExtensionMap
OrderedExtensionMap is std::map, it's specialized to keep entries in canonical order of extension.
RISCVISAInfo(const RISCVISAInfo &)=delete
RISCVISAInfo & operator=(const RISCVISAInfo &)=delete
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
unsigned getMaxELen() const
static bool isSupportedExtensionFeature(StringRef Ext)
void toFeatures(std::vector< StringRef > &Features, std::function< StringRef(const Twine &)> StrAlloc) const
Convert RISCV ISA info to a feature vector.