29struct RISCVSupportedExtension {
34 bool operator<(
const RISCVSupportedExtension &RHS)
const {
47 "i",
"m",
"a",
"f",
"d",
"zicsr",
"zifencei"
50#define GET_SUPPORTED_EXTENSIONS
51#include "llvm/TargetParser/RISCVTargetParserDef.inc"
53#define GET_SUPPORTED_PROFILES
54#include "llvm/TargetParser/RISCVTargetParserDef.inc"
58 static std::atomic<bool> TableChecked(
false);
59 if (!TableChecked.load(std::memory_order_relaxed)) {
61 "Extensions are not sorted by name");
63 "Experimental extensions are not sorted by name");
64 TableChecked.store(
true, std::memory_order_relaxed);
72 unsigned VersionWidth = Description.
empty() ? 0 : 10;
74 << Description <<
"\n";
79 outs() <<
"All available -march extensions for RISC-V\n\n";
83 for (
const auto &E : SupportedExtensions)
84 ExtMap[E.Name] = {E.Version.Major, E.Version.Minor};
85 for (
const auto &E : ExtMap) {
87 std::to_string(E.second.Major) +
"." + std::to_string(E.second.Minor);
91 outs() <<
"\nExperimental extensions\n";
93 for (
const auto &E : SupportedExperimentalExtensions)
94 ExtMap[E.Name] = {E.Version.Major, E.Version.Minor};
95 for (
const auto &E : ExtMap) {
97 std::to_string(E.second.Major) +
"." + std::to_string(E.second.Minor);
98 PrintExtension(E.first, Version, DescMap[
"experimental-" + E.first]);
101 outs() <<
"\nUse -march to specify the target's extension.\n"
102 "For example, clang -march=rv32i_v1p0\n";
106 return Ext.consume_front(
"experimental-");
118 "Already guarded by if-statement in ::parseArchString");
120 int Pos = Ext.size() - 1;
121 while (Pos > 0 &&
isDigit(Ext[Pos]))
123 if (Pos > 0 && Ext[Pos] ==
'p' &&
isDigit(Ext[Pos - 1])) {
125 while (Pos > 0 &&
isDigit(Ext[Pos]))
133 bool operator()(
const RISCVSupportedExtension &LHS,
StringRef RHS) {
136 bool operator()(
StringRef LHS,
const RISCVSupportedExtension &RHS) {
142static std::optional<RISCVISAUtils::ExtensionVersion>
146 for (
auto &ExtInfo : {
ArrayRef(SupportedExtensions),
147 ArrayRef(SupportedExperimentalExtensions)}) {
150 if (
I == ExtInfo.end() ||
I->Name != ExtName)
158void RISCVISAInfo::addExtension(
StringRef ExtName,
164 if (Ext.starts_with(
"s"))
165 return "standard supervisor-level extension";
166 if (Ext.starts_with(
"x"))
167 return "non-standard user-level extension";
168 if (Ext.starts_with(
"z"))
169 return "standard user-level extension";
174 if (Ext.starts_with(
"s"))
176 if (Ext.starts_with(
"x"))
178 if (Ext.starts_with(
"z"))
183static std::optional<RISCVISAUtils::ExtensionVersion>
187 if (
I == std::end(SupportedExperimentalExtensions) ||
I->Name != Ext)
197 IsExperimental ?
ArrayRef(SupportedExperimentalExtensions)
201 return I != ExtInfo.
end() &&
I->Name == Ext;
207 for (
auto ExtInfo : {
ArrayRef(SupportedExtensions),
208 ArrayRef(SupportedExperimentalExtensions)}) {
210 if (
I != ExtInfo.end() &&
I->Name == Ext)
218 unsigned MinorVersion) {
219 for (
auto ExtInfo : {
ArrayRef(SupportedExtensions),
220 ArrayRef(SupportedExperimentalExtensions)}) {
222 std::equal_range(ExtInfo.begin(), ExtInfo.end(), Ext, LessExtName());
223 for (
auto I = Range.first, E = Range.second;
I != E; ++
I)
224 if (
I->Version.Major == MajorVersion &&
I->Version.Minor == MinorVersion)
237 return Exts.count(Ext.str()) != 0;
241 bool IgnoreUnknown)
const {
242 std::vector<std::string> Features;
243 for (
const auto &[ExtName,
_] : Exts) {
253 Features.push_back((
llvm::Twine(
"+experimental-") + ExtName).str());
255 Features.push_back((
llvm::Twine(
"+") + ExtName).str());
258 if (AddAllExtensions) {
259 for (
const RISCVSupportedExtension &Ext : SupportedExtensions) {
260 if (Exts.count(Ext.Name))
262 Features.push_back((
llvm::Twine(
"-") + Ext.Name).str());
265 for (
const RISCVSupportedExtension &Ext : SupportedExperimentalExtensions) {
266 if (Exts.count(Ext.Name))
268 Features.push_back((
llvm::Twine(
"-experimental-") + Ext.Name).str());
275 if (ExtName.size() == 1) {
277 "unsupported standard user-level extension '" +
282 " '" + ExtName +
"'");
291 unsigned &Minor,
unsigned &ConsumeLength,
292 bool EnableExperimentalExtension,
293 bool ExperimentalExtensionVersionCheck) {
298 MajorStr = In.take_while(
isDigit);
299 In = In.substr(MajorStr.
size());
301 if (!MajorStr.
empty() && In.consume_front(
"p")) {
302 MinorStr = In.take_while(
isDigit);
303 In = In.substr(MajorStr.
size() + MinorStr.
size() - 1);
306 if (MinorStr.
empty()) {
309 "minor version number missing after 'p' for extension '" + Ext +
"'");
316 "Failed to parse major version number for extension '" + Ext +
"'");
321 "Failed to parse minor version number for extension '" + Ext +
"'");
323 ConsumeLength = MajorStr.
size();
325 if (!MinorStr.
empty())
326 ConsumeLength += MinorStr.
size() + 1 ;
331 if (Ext.size() > 1 && In.size())
334 "multi-character extensions must be separated by underscores");
338 if (!EnableExperimentalExtension)
340 "requires '-menable-experimental-extensions' "
341 "for experimental extension '" +
344 if (ExperimentalExtensionVersionCheck &&
348 "experimental extension requires explicit version number `" + Ext +
351 auto SupportedVers = *ExperimentalExtension;
352 if (ExperimentalExtensionVersionCheck &&
353 (Major != SupportedVers.Major || Minor != SupportedVers.Minor)) {
354 std::string
Error =
"unsupported version number " + MajorStr.
str();
355 if (!MinorStr.
empty())
357 Error +=
" for experimental extension '" + Ext.str() +
358 "' (this compiler supports " + utostr(SupportedVers.Major) +
359 "." + utostr(SupportedVers.Minor) +
")";
372 Major = DefaultVersion->Major;
373 Minor = DefaultVersion->Minor;
386 std::string
Error =
"unsupported version number " + std::string(MajorStr);
387 if (!MinorStr.
empty())
389 Error +=
" for extension '" + Ext.str() +
"'";
395 const std::vector<std::string> &Features) {
396 assert(XLen == 32 || XLen == 64);
397 std::unique_ptr<RISCVISAInfo> ISAInfo(
new RISCVISAInfo(XLen));
399 for (
auto &Feature : Features) {
401 assert(ExtName.
size() > 1 && (ExtName[0] ==
'+' || ExtName[0] ==
'-'));
402 bool Add = ExtName[0] ==
'+';
405 auto ExtensionInfos = Experimental
406 ?
ArrayRef(SupportedExperimentalExtensions)
408 auto ExtensionInfoIterator =
413 if (ExtensionInfoIterator == ExtensionInfos.end() ||
414 ExtensionInfoIterator->Name != ExtName)
418 ISAInfo->addExtension(ExtName, ExtensionInfoIterator->Version);
420 ISAInfo->Exts.erase(ExtName.
str());
430 "string must be lowercase");
440 "arch string must begin with valid base ISA");
441 std::unique_ptr<RISCVISAInfo> ISAInfo(
new RISCVISAInfo(XLen));
449 Arch.
split(Split,
'_');
452 std::tie(Prefix, MinorVersionStr) = Ext.rsplit(
'p');
453 if (MinorVersionStr.
empty())
455 "extension lacks version in expected format");
456 unsigned MajorVersion, MinorVersion;
459 "failed to parse minor version number");
463 int TrailingDigits = 0;
465 while (!ExtName.
empty()) {
473 "extension lacks version in expected format");
475 StringRef MajorVersionStr = Prefix.take_back(TrailingDigits);
478 "failed to parse major version number");
479 ISAInfo->addExtension(ExtName, {MajorVersion, MinorVersion});
481 ISAInfo->updateFLen();
482 ISAInfo->updateMinVLen();
483 ISAInfo->updateMaxELen();
484 return std::move(ISAInfo);
488 std::vector<std::string> &SplitExts) {
493 Exts.
split(Split,
"_");
495 for (
auto Ext : Split) {
498 "extension name missing after separator '_'");
500 SplitExts.push_back(Ext.str());
508 std::map<std::string, unsigned>> &SeenExtMap,
509 bool IgnoreUnknown,
bool EnableExperimentalExtension,
510 bool ExperimentalExtensionVersionCheck) {
521 "invalid extension prefix '" + RawExt +
"'");
524 if (!IgnoreUnknown &&
Name.size() ==
Type.size())
526 Desc +
" name missing after '" +
Type +
"'");
528 unsigned Major, Minor, ConsumeLength;
530 EnableExperimentalExtension,
531 ExperimentalExtensionVersionCheck)) {
540 if (!IgnoreUnknown && SeenExtMap.contains(
Name.str()))
542 "duplicated " +
Desc +
" '" +
Name +
"'");
547 SeenExtMap[
Name.str()] = {Major, Minor};
554 std::map<std::string, unsigned>> &SeenExtMap,
555 bool IgnoreUnknown,
bool EnableExperimentalExtension,
556 bool ExperimentalExtensionVersionCheck) {
557 unsigned Major, Minor, ConsumeLength;
561 EnableExperimentalExtension,
562 ExperimentalExtensionVersionCheck)) {
565 RawExt = RawExt.
substr(ConsumeLength);
571 RawExt = RawExt.
substr(ConsumeLength);
574 if (!IgnoreUnknown && SeenExtMap.contains(
Name.str()))
576 "duplicated standard user-level extension '" +
582 SeenExtMap[
Name.str()] = {Major, Minor};
588 bool ExperimentalExtensionVersionCheck,
589 bool IgnoreUnknown) {
593 "string must be lowercase");
598 const auto *FoundProfile =
603 if (FoundProfile == std::end(SupportedProfiles))
606 std::string NewArch = FoundProfile->MArch.str();
608 if (!ArchWithoutProfile.
empty()) {
612 "additional extensions must be after separator '_'");
613 NewArch += ArchWithoutProfile.
str();
616 ExperimentalExtensionVersionCheck, IgnoreUnknown);
624 "string must begin with rv32{i,e,g} or rv64{i,e,g}");
627 unsigned XLen = HasRV64 ? 64 : 32;
628 std::unique_ptr<RISCVISAInfo> ISAInfo(
new RISCVISAInfo(XLen));
630 std::map<std::string, unsigned>>
635 char Baseline = Arch[4];
641 "first letter after \'" + Arch.
slice(0, 4) +
642 "\' should be 'e', 'i' or 'g'");
650 "version not supported for 'g'");
654 if (Arch.
back() ==
'_')
656 "extension name missing after separator '_'");
661 unsigned Major, Minor, ConsumeLength;
662 if (Baseline ==
'g') {
671 assert(Version &&
"Default extension version not found?");
673 SeenExtMap[Ext] = {Version->Major, Version->Minor};
678 StringRef(&Baseline, 1), Exts, Major, Minor, ConsumeLength,
679 EnableExperimentalExtension, ExperimentalExtensionVersionCheck)) {
686 Major = Version->Major;
687 Minor = Version->Minor;
691 SeenExtMap[
StringRef(&Baseline, 1).
str()] = {Major, Minor};
699 std::vector<std::string> SplitExts;
703 for (
auto &Ext : SplitExts) {
705 while (!CurrExt.
empty()) {
708 CurrExt, SeenExtMap, IgnoreUnknown, EnableExperimentalExtension,
709 ExperimentalExtensionVersionCheck))
711 }
else if (CurrExt.
front() ==
'z' || CurrExt.
front() ==
's' ||
712 CurrExt.
front() ==
'x') {
722 CurrExt, SeenExtMap, IgnoreUnknown, EnableExperimentalExtension,
723 ExperimentalExtensionVersionCheck))
731 "invalid standard user-level extension '" +
738 for (
auto &SeenExtAndVers : SeenExtMap) {
739 const std::string &ExtName = SeenExtAndVers.first;
744 ISAInfo->addExtension(ExtName, ExtVers);
750Error RISCVISAInfo::checkDependency() {
751 bool HasC = Exts.count(
"c") != 0;
752 bool HasF = Exts.count(
"f") != 0;
753 bool HasZfinx = Exts.count(
"zfinx") != 0;
754 bool HasVector = Exts.count(
"zve32x") != 0;
755 bool HasZvl = MinVLen != 0;
756 bool HasZcmt = Exts.count(
"zcmt") != 0;
758 if (HasF && HasZfinx)
760 "'f' and 'zfinx' extensions are incompatible");
762 if (HasZvl && !HasVector)
765 "'zvl*b' requires 'v' or 'zve*' extension to also be specified");
767 if (Exts.count(
"zvbb") && !HasVector)
770 "'zvbb' requires 'v' or 'zve*' extension to also be specified");
772 if (Exts.count(
"zvbc") && !Exts.count(
"zve64x"))
775 "'zvbc' requires 'v' or 'zve64*' extension to also be specified");
777 if ((Exts.count(
"zvkb") || Exts.count(
"zvkg") || Exts.count(
"zvkned") ||
778 Exts.count(
"zvknha") || Exts.count(
"zvksed") || Exts.count(
"zvksh")) &&
782 "'zvk*' requires 'v' or 'zve*' extension to also be specified");
784 if (Exts.count(
"zvknhb") && !Exts.count(
"zve64x"))
787 "'zvknhb' requires 'v' or 'zve64*' extension to also be specified");
789 if ((HasZcmt || Exts.count(
"zcmp")) && Exts.count(
"d") &&
790 (HasC || Exts.count(
"zcd")))
793 Twine(
"'") + (HasZcmt ?
"zcmt" :
"zcmp") +
794 "' extension is incompatible with '" + (HasC ?
"c" :
"zcd") +
795 "' extension when 'd' extension is enabled");
797 if (XLen != 32 && Exts.count(
"zcf"))
799 "'zcf' is only supported for 'rv32'");
801 if (Exts.count(
"zacas") && !(Exts.count(
"a") || Exts.count(
"zamo")))
804 "'zacas' requires 'a' or 'zaamo' extension to also be specified");
806 if (Exts.count(
"zabha") && !(Exts.count(
"a") || Exts.count(
"zamo")))
809 "'zabha' requires 'a' or 'zaamo' extension to also be specified");
831#define GET_IMPLIED_EXTENSIONS
832#include "llvm/TargetParser/RISCVTargetParserDef.inc"
834void RISCVISAInfo::updateImplication() {
835 bool HasE = Exts.count(
"e") != 0;
836 bool HasI = Exts.count(
"i") != 0;
840 if (!HasE && !HasI) {
842 addExtension(
"i", Version.value());
850 for (
auto const &Ext : Exts)
851 WorkList.
insert(Ext.first);
853 while (!WorkList.
empty()) {
855 auto Range = std::equal_range(std::begin(ImpliedExts),
856 std::end(ImpliedExts), ExtName);
857 std::for_each(Range.first, Range.second,
859 const char *ImpliedExt = Implied.ImpliedExt;
860 if (WorkList.count(ImpliedExt))
862 if (Exts.count(ImpliedExt))
864 auto Version = findDefaultVersion(ImpliedExt);
865 addExtension(ImpliedExt, Version.value());
866 WorkList.insert(ImpliedExt);
871 if (XLen == 32 && Exts.count(
"zce") && Exts.count(
"f") &&
872 !Exts.count(
"zcf")) {
874 addExtension(
"zcf", Version.value());
879 {
"zk"}, {
"zkn"}, {
"zks"}, {
"zvkn"}, {
"zvknc"},
880 {
"zvkng"}, {
"zvks"}, {
"zvksc"}, {
"zvksg"},
883void RISCVISAInfo::updateCombination() {
884 bool MadeChange =
false;
893 auto Range = std::equal_range(std::begin(ImpliedExts),
894 std::end(ImpliedExts), CombineExt);
895 bool HasAllRequiredFeatures = std::all_of(
897 return hasExtension(Implied.ImpliedExt);
899 if (HasAllRequiredFeatures) {
901 addExtension(CombineExt,
Version.value());
905 }
while (MadeChange);
908void RISCVISAInfo::updateFLen() {
913 else if (Exts.count(
"f"))
917void RISCVISAInfo::updateMinVLen() {
918 for (
auto const &Ext : Exts) {
924 MinVLen = std::max(MinVLen, ZvlLen);
929void RISCVISAInfo::updateMaxELen() {
931 for (
auto const &Ext : Exts) {
935 if (ExtName.
back() ==
'f')
936 MaxELenFp = std::max(MaxELenFp, 32u);
937 if (ExtName.
back() ==
'd')
938 MaxELenFp = std::max(MaxELenFp, 64u);
942 MaxELen = std::max(MaxELen, ZveELen);
951 Arch <<
"rv" << XLen;
953 ListSeparator LS(
"_");
954 for (
auto const &Ext : Exts) {
956 auto ExtInfo = Ext.second;
957 Arch << LS << ExtName;
958 Arch << ExtInfo.Major <<
"p" << ExtInfo.Minor;
966 ISAInfo->updateImplication();
967 ISAInfo->updateCombination();
968 ISAInfo->updateFLen();
969 ISAInfo->updateMinVLen();
970 ISAInfo->updateMaxELen();
972 if (
Error Result = ISAInfo->checkDependency())
973 return std::move(Result);
974 return std::move(ISAInfo);
986 }
else if (XLen == 64) {
1008 unsigned Major, Minor, ConsumeLength;
1020 return std::string();
1026 return std::string();
1029 return std::string();
std::optional< std::vector< StOtherPiece > > Other
This file implements a map that provides insertion order iteration.
static void verifyTables()
static StringRef getExtensionTypeDesc(StringRef Ext)
static Error processSingleLetterExtension(StringRef &RawExt, MapVector< std::string, RISCVISAUtils::ExtensionVersion, std::map< std::string, unsigned > > &SeenExtMap, bool IgnoreUnknown, bool EnableExperimentalExtension, bool ExperimentalExtensionVersionCheck)
static std::optional< RISCVISAUtils::ExtensionVersion > findDefaultVersion(StringRef ExtName)
static size_t findLastNonVersionCharacter(StringRef Ext)
static StringRef getExtensionType(StringRef Ext)
static constexpr StringLiteral CombineIntoExts[]
static bool stripExperimentalPrefix(StringRef &Ext)
static Error processMultiLetterExtension(StringRef RawExt, MapVector< std::string, RISCVISAUtils::ExtensionVersion, std::map< std::string, unsigned > > &SeenExtMap, bool IgnoreUnknown, bool EnableExperimentalExtension, bool ExperimentalExtensionVersionCheck)
static std::optional< RISCVISAUtils::ExtensionVersion > isExperimentalExtension(StringRef Ext)
static void PrintExtension(StringRef Name, StringRef Version, StringRef Description)
static bool operator<(const ImpliedExtsEntry &LHS, StringRef RHS)
static Error getExtensionVersion(StringRef Ext, StringRef In, unsigned &Major, unsigned &Minor, unsigned &ConsumeLength, bool EnableExperimentalExtension, bool ExperimentalExtensionVersionCheck)
static const char * RISCVGImplications[]
static Error getStringErrorForInvalidExt(std::string_view ExtName)
static Error splitExtsByUnderscore(StringRef Exts, std::vector< std::string > &SplitExts)
static bool isDigit(const char C)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file implements a set that has insertion order iteration characteristics.
static bool contains(SmallPtrSetImpl< ConstantExpr * > &Cache, ConstantExpr *Expr, Constant *C)
static void verifyTables()
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
Tagged union holding either a T or a Error.
This class implements a map that also provides access to all stored values in a deterministic order.
static bool isSupportedExtensionFeature(StringRef Ext)
static std::string getTargetFeatureForExtension(StringRef Ext)
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
std::string toString() const
static llvm::Expected< std::unique_ptr< RISCVISAInfo > > postProcessAndChecking(std::unique_ptr< RISCVISAInfo > &&ISAInfo)
StringRef computeDefaultABI() const
static bool isSupportedExtension(StringRef Ext)
static llvm::Expected< std::unique_ptr< RISCVISAInfo > > parseFeatures(unsigned XLen, const std::vector< std::string > &Features)
Parse RISC-V ISA info from feature vector.
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)
bool empty() const
Determine if the SetVector is empty or not.
bool insert(const value_type &X)
Insert a new element into the SetVector.
value_type pop_back_val()
A SetVector that performs no allocations if smaller than a certain size.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
A wrapper around a string literal that serves as a proxy for constructing global tables of StringRefs...
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
StringRef - Represent a constant reference to a string, i.e.
std::pair< StringRef, StringRef > split(char Separator) const
Split into two substrings around the first occurrence of a separator character.
bool consume_back(StringRef Suffix)
Returns true if this StringRef has the given suffix and removes that suffix.
bool getAsInteger(unsigned Radix, T &Result) const
Parse the current string as an integer of the specified radix.
std::string str() const
str - Get the contents as an std::string.
constexpr StringRef substr(size_t Start, size_t N=npos) const
Return a reference to the substring from [Start, Start + N).
bool starts_with(StringRef Prefix) const
Check if this string starts with the given Prefix.
constexpr bool empty() const
empty - Check if the string is empty.
StringRef drop_front(size_t N=1) const
Return a StringRef equal to 'this' but with the first N elements dropped.
char back() const
back - Get the last character in the string.
StringRef slice(size_t Start, size_t End) const
Return a reference to the substring from [Start, End).
constexpr size_t size() const
size - Get the string size.
char front() const
front - Get the first character in the string.
bool consume_front(StringRef Prefix)
Returns true if this StringRef has the given prefix and removes that prefix.
StringRef take_front(size_t N=1) const
Return a StringRef equal to 'this' but with only the first N elements remaining.
StringRef drop_back(size_t N=1) const
Return a StringRef equal to 'this' but with the last N elements dropped.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
The instances of the Type class are immutable: once they are created, they are never changed.
raw_ostream & indent(unsigned NumSpaces)
indent - Insert 'NumSpaces' spaces.
A raw_ostream that writes to an std::string.
std::string & str()
Returns the string's reference.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
constexpr StringLiteral AllStdExts
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.
bool operator<(int64_t V1, const APSInt &V2)
raw_fd_ostream & outs()
This returns a reference to a raw_fd_ostream for standard output.
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.
bool any_of(R &&range, UnaryPredicate P)
Provide wrappers to std::any_of which take ranges instead of having to pass begin/end explicitly.
bool is_sorted(R &&Range, Compare C)
Wrapper function around std::is_sorted to check if elements in a range R are sorted with respect to a...
void riscvExtensionsHelp(StringMap< StringRef > DescMap)
FormattedString left_justify(StringRef Str, unsigned Width)
left_justify - append spaces after string so total output is Width characters.
auto lower_bound(R &&Range, T &&Value)
Provide wrappers to std::lower_bound which take ranges instead of having to pass begin/end explicitly...
auto find_if(R &&Range, UnaryPredicate P)
Provide wrappers to std::find_if which take ranges instead of having to pass begin/end explicitly.
void consumeError(Error Err)
Consume a Error without doing anything.
bool operator<(const ImpliedExtsEntry &Other) const
Description of the encoding of one expression Op.
Represents the major and version number components of a RISC-V extension.