9#ifndef LLVM_SUPPORT_RISCVISAINFO_H
10#define LLVM_SUPPORT_RISCVISAINFO_H
30 : XLen(XLen), FLen(0), MinVLen(0), MaxELen(0), MaxELenFp(0), Exts(Exts) {}
39 bool ExperimentalExtensionVersionCheck =
true,
40 bool IgnoreUnknown =
false);
50 parseFeatures(
unsigned XLen,
const std::vector<std::string> &Features);
53 std::vector<std::string>
toFeatures(
bool AddAllExtensions =
false,
54 bool IgnoreUnknown =
true)
const;
75 unsigned MinorVersion);
82 : XLen(XLen), FLen(0), MinVLen(0), MaxELen(0), MaxELenFp(0) {}
87 unsigned MaxELen, MaxELenFp;
91 void addExtension(StringRef ExtName, RISCVISAUtils::ExtensionVersion Version);
93 Error checkDependency();
95 void updateImplication();
96 void updateCombination();
This file defines the StringMap class.
Tagged union holding either a T or a Error.
static bool isSupportedExtensionFeature(StringRef Ext)
RISCVISAInfo & operator=(const RISCVISAInfo &)=delete
static std::string getTargetFeatureForExtension(StringRef Ext)
unsigned getMinVLen() const
static 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...
bool hasExtension(StringRef Ext) const
RISCVISAInfo(const RISCVISAInfo &)=delete
std::string toString() const
static llvm::Expected< std::unique_ptr< RISCVISAInfo > > postProcessAndChecking(std::unique_ptr< RISCVISAInfo > &&ISAInfo)
const RISCVISAUtils::OrderedExtensionMap & getExtensions() const
StringRef computeDefaultABI() const
unsigned getMaxVLen() const
static bool isSupportedExtension(StringRef Ext)
RISCVISAInfo(unsigned XLen, RISCVISAUtils::OrderedExtensionMap &Exts)
static llvm::Expected< std::unique_ptr< RISCVISAInfo > > parseFeatures(unsigned XLen, const std::vector< std::string > &Features)
Parse RISC-V ISA info from feature vector.
unsigned getMaxELen() const
unsigned getMaxELenFp() const
std::vector< std::string > toFeatures(bool AddAllExtensions=false, bool IgnoreUnknown=true) const
Convert RISC-V ISA info to a feature vector.
static llvm::Expected< std::unique_ptr< RISCVISAInfo > > parseArchString(StringRef Arch, bool EnableExperimentalExtension, bool ExperimentalExtensionVersionCheck=true, bool IgnoreUnknown=false)
Parse RISC-V ISA info from arch string.
static bool isSupportedExtensionWithVersion(StringRef Ext)
StringRef - Represent a constant reference to a string, i.e.
std::map< std::string, ExtensionVersion, ExtensionComparator > OrderedExtensionMap
OrderedExtensionMap is std::map, it's specialized to keep entries in canonical order of extension.
This is an optimization pass for GlobalISel generic memory operations.
void riscvExtensionsHelp(StringMap< StringRef > DescMap)