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() <<
"\nSupported Profiles\n";
102 for (
const auto &
P : SupportedProfiles)
105 outs() <<
"\nUse -march to specify the target's extension.\n"
106 "For example, clang -march=rv32i_v1p0\n";
110 return Ext.consume_front(
"experimental-");
122 "Already guarded by if-statement in ::parseArchString");
124 int Pos = Ext.size() - 1;
125 while (Pos > 0 &&
isDigit(Ext[Pos]))
127 if (Pos > 0 && Ext[Pos] ==
'p' &&
isDigit(Ext[Pos - 1])) {
129 while (Pos > 0 &&
isDigit(Ext[Pos]))
137 bool operator()(
const RISCVSupportedExtension &LHS,
StringRef RHS) {
140 bool operator()(
StringRef LHS,
const RISCVSupportedExtension &RHS) {
146static std::optional<RISCVISAUtils::ExtensionVersion>
150 for (
auto &ExtInfo : {
ArrayRef(SupportedExtensions),
151 ArrayRef(SupportedExperimentalExtensions)}) {
154 if (
I == ExtInfo.end() ||
I->Name != ExtName)
162void RISCVISAInfo::addExtension(
StringRef ExtName,
168 if (Ext.starts_with(
"s"))
169 return "standard supervisor-level extension";
170 if (Ext.starts_with(
"x"))
171 return "non-standard user-level extension";
172 if (Ext.starts_with(
"z"))
173 return "standard user-level extension";
178 if (Ext.starts_with(
"s"))
180 if (Ext.starts_with(
"x"))
182 if (Ext.starts_with(
"z"))
187static std::optional<RISCVISAUtils::ExtensionVersion>
191 if (
I == std::end(SupportedExperimentalExtensions) ||
I->Name != Ext)
201 IsExperimental ?
ArrayRef(SupportedExperimentalExtensions)
205 return I != ExtInfo.
end() &&
I->Name == Ext;
211 for (
auto ExtInfo : {
ArrayRef(SupportedExtensions),
212 ArrayRef(SupportedExperimentalExtensions)}) {
214 if (
I != ExtInfo.end() &&
I->Name == Ext)
222 unsigned MinorVersion) {
223 for (
auto ExtInfo : {
ArrayRef(SupportedExtensions),
224 ArrayRef(SupportedExperimentalExtensions)}) {
226 std::equal_range(ExtInfo.begin(), ExtInfo.end(), Ext, LessExtName());
227 for (
auto I = Range.first, E = Range.second;
I != E; ++
I)
228 if (
I->Version.Major == MajorVersion &&
I->Version.Minor == MinorVersion)
241 return Exts.count(Ext.str()) != 0;
245 bool IgnoreUnknown)
const {
246 std::vector<std::string> Features;
247 for (
const auto &[ExtName,
_] : Exts) {
257 Features.push_back((
llvm::Twine(
"+experimental-") + ExtName).str());
259 Features.push_back((
llvm::Twine(
"+") + ExtName).str());
262 if (AddAllExtensions) {
263 for (
const RISCVSupportedExtension &Ext : SupportedExtensions) {
264 if (Exts.count(Ext.Name))
266 Features.push_back((
llvm::Twine(
"-") + Ext.Name).str());
269 for (
const RISCVSupportedExtension &Ext : SupportedExperimentalExtensions) {
270 if (Exts.count(Ext.Name))
272 Features.push_back((
llvm::Twine(
"-experimental-") + Ext.Name).str());
279 if (ExtName.size() == 1) {
281 "unsupported standard user-level extension '" +
286 " '" + ExtName +
"'");
295 unsigned &Minor,
unsigned &ConsumeLength,
296 bool EnableExperimentalExtension,
297 bool ExperimentalExtensionVersionCheck) {
302 MajorStr = In.take_while(
isDigit);
303 In = In.substr(MajorStr.
size());
305 if (!MajorStr.
empty() && In.consume_front(
"p")) {
306 MinorStr = In.take_while(
isDigit);
307 In = In.substr(MajorStr.
size() + MinorStr.
size() - 1);
310 if (MinorStr.
empty()) {
313 "minor version number missing after 'p' for extension '" + Ext +
"'");
320 "Failed to parse major version number for extension '" + Ext +
"'");
325 "Failed to parse minor version number for extension '" + Ext +
"'");
327 ConsumeLength = MajorStr.
size();
329 if (!MinorStr.
empty())
330 ConsumeLength += MinorStr.
size() + 1 ;
335 if (Ext.size() > 1 && In.size())
338 "multi-character extensions must be separated by underscores");
342 if (!EnableExperimentalExtension)
344 "requires '-menable-experimental-extensions' "
345 "for experimental extension '" +
348 if (ExperimentalExtensionVersionCheck &&
352 "experimental extension requires explicit version number `" + Ext +
355 auto SupportedVers = *ExperimentalExtension;
356 if (ExperimentalExtensionVersionCheck &&
357 (Major != SupportedVers.Major || Minor != SupportedVers.Minor)) {
358 std::string
Error =
"unsupported version number " + MajorStr.
str();
359 if (!MinorStr.
empty())
361 Error +=
" for experimental extension '" + Ext.str() +
362 "' (this compiler supports " + utostr(SupportedVers.Major) +
363 "." + utostr(SupportedVers.Minor) +
")";
376 Major = DefaultVersion->Major;
377 Minor = DefaultVersion->Minor;
390 std::string
Error =
"unsupported version number " + std::string(MajorStr);
391 if (!MinorStr.
empty())
393 Error +=
" for extension '" + Ext.str() +
"'";
399 const std::vector<std::string> &Features) {
400 assert(XLen == 32 || XLen == 64);
401 std::unique_ptr<RISCVISAInfo> ISAInfo(
new RISCVISAInfo(XLen));
403 for (
auto &Feature : Features) {
405 assert(ExtName.
size() > 1 && (ExtName[0] ==
'+' || ExtName[0] ==
'-'));
406 bool Add = ExtName[0] ==
'+';
409 auto ExtensionInfos = Experimental
410 ?
ArrayRef(SupportedExperimentalExtensions)
412 auto ExtensionInfoIterator =
417 if (ExtensionInfoIterator == ExtensionInfos.end() ||
418 ExtensionInfoIterator->Name != ExtName)
422 ISAInfo->addExtension(ExtName, ExtensionInfoIterator->Version);
424 ISAInfo->Exts.erase(ExtName.
str());
436 "string may only contain [a-z0-9_]");
445 if (XLen == 0 || Arch.
empty() || (Arch[0] !=
'i' && Arch[0] !=
'e'))
447 "arch string must begin with valid base ISA");
449 std::unique_ptr<RISCVISAInfo> ISAInfo(
new RISCVISAInfo(XLen));
455 Arch.
split(Split,
'_');
458 std::tie(Prefix, MinorVersionStr) = Ext.rsplit(
'p');
459 if (MinorVersionStr.
empty())
461 "extension lacks version in expected format");
462 unsigned MajorVersion, MinorVersion;
465 "failed to parse minor version number");
469 size_t VersionStart = Prefix.size();
470 while (VersionStart != 0) {
471 if (!
isDigit(Prefix[VersionStart - 1]))
475 if (VersionStart == Prefix.size())
477 "extension lacks version in expected format");
479 if (VersionStart == 0)
481 "missing extension name");
483 StringRef ExtName = Prefix.slice(0, VersionStart);
487 "failed to parse major version number");
488 ISAInfo->addExtension(ExtName, {MajorVersion, MinorVersion});
490 ISAInfo->updateImpliedLengths();
491 return std::move(ISAInfo);
495 std::vector<std::string> &SplitExts) {
500 Exts.
split(Split,
"_");
502 for (
auto Ext : Split) {
505 "extension name missing after separator '_'");
507 SplitExts.push_back(Ext.str());
515 std::map<std::string, unsigned>> &SeenExtMap,
516 bool IgnoreUnknown,
bool EnableExperimentalExtension,
517 bool ExperimentalExtensionVersionCheck) {
528 "invalid extension prefix '" + RawExt +
"'");
531 if (!IgnoreUnknown &&
Name.size() ==
Type.size())
533 Desc +
" name missing after '" +
Type +
"'");
535 unsigned Major, Minor, ConsumeLength;
537 EnableExperimentalExtension,
538 ExperimentalExtensionVersionCheck)) {
547 if (!IgnoreUnknown && SeenExtMap.contains(
Name.str()))
549 "duplicated " +
Desc +
" '" +
Name +
"'");
554 SeenExtMap[
Name.str()] = {Major, Minor};
561 std::map<std::string, unsigned>> &SeenExtMap,
562 bool IgnoreUnknown,
bool EnableExperimentalExtension,
563 bool ExperimentalExtensionVersionCheck) {
564 unsigned Major, Minor, ConsumeLength;
568 EnableExperimentalExtension,
569 ExperimentalExtensionVersionCheck)) {
572 RawExt = RawExt.
substr(ConsumeLength);
578 RawExt = RawExt.
substr(ConsumeLength);
581 if (!IgnoreUnknown && SeenExtMap.contains(
Name.str()))
583 "duplicated standard user-level extension '" +
589 SeenExtMap[
Name.str()] = {Major, Minor};
595 bool ExperimentalExtensionVersionCheck,
596 bool IgnoreUnknown) {
600 "string must be lowercase");
615 if (
I != std::begin(SupportedProfiles) && Arch.
starts_with((--
I)->Name)) {
616 std::string NewArch =
I->MArch.str();
618 if (!ArchWithoutProfile.
empty()) {
619 if (ArchWithoutProfile.
front() !=
'_')
622 "additional extensions must be after separator '_'");
623 NewArch += ArchWithoutProfile.
str();
626 ExperimentalExtensionVersionCheck, IgnoreUnknown);
630 if (XLen == 0 || Arch.
empty())
633 "string must begin with rv32{i,e,g}, rv64{i,e,g}, or a supported "
636 std::unique_ptr<RISCVISAInfo> ISAInfo(
new RISCVISAInfo(XLen));
638 std::map<std::string, unsigned>>
643 char Baseline = Arch.
front();
649 "first letter after \'rv" +
Twine(XLen) +
650 "\' should be 'e', 'i' or 'g'");
658 "version not supported for 'g'");
662 if (Arch.
back() ==
'_')
664 "extension name missing after separator '_'");
669 unsigned Major, Minor, ConsumeLength;
670 if (Baseline ==
'g') {
679 assert(Version &&
"Default extension version not found?");
681 SeenExtMap[Ext] = {Version->Major, Version->Minor};
686 StringRef(&Baseline, 1), Exts, Major, Minor, ConsumeLength,
687 EnableExperimentalExtension, ExperimentalExtensionVersionCheck)) {
694 Major = Version->Major;
695 Minor = Version->Minor;
699 SeenExtMap[
StringRef(&Baseline, 1).
str()] = {Major, Minor};
707 std::vector<std::string> SplitExts;
711 for (
auto &Ext : SplitExts) {
713 while (!CurrExt.
empty()) {
716 CurrExt, SeenExtMap, IgnoreUnknown, EnableExperimentalExtension,
717 ExperimentalExtensionVersionCheck))
719 }
else if (CurrExt.
front() ==
'z' || CurrExt.
front() ==
's' ||
720 CurrExt.
front() ==
'x') {
730 CurrExt, SeenExtMap, IgnoreUnknown, EnableExperimentalExtension,
731 ExperimentalExtensionVersionCheck))
739 "invalid standard user-level extension '" +
746 for (
auto &SeenExtAndVers : SeenExtMap) {
747 const std::string &ExtName = SeenExtAndVers.first;
752 ISAInfo->addExtension(ExtName, ExtVers);
758Error RISCVISAInfo::checkDependency() {
759 bool HasC = Exts.count(
"c") != 0;
760 bool HasF = Exts.count(
"f") != 0;
761 bool HasZfinx = Exts.count(
"zfinx") != 0;
762 bool HasVector = Exts.count(
"zve32x") != 0;
763 bool HasZvl = MinVLen != 0;
764 bool HasZcmt = Exts.count(
"zcmt") != 0;
766 if (HasF && HasZfinx)
768 "'f' and 'zfinx' extensions are incompatible");
770 if (HasZvl && !HasVector)
773 "'zvl*b' requires 'v' or 'zve*' extension to also be specified");
775 if (Exts.count(
"zvbb") && !HasVector)
778 "'zvbb' requires 'v' or 'zve*' extension to also be specified");
780 if (Exts.count(
"zvbc") && !Exts.count(
"zve64x"))
783 "'zvbc' requires 'v' or 'zve64*' extension to also be specified");
785 if ((Exts.count(
"zvkb") || Exts.count(
"zvkg") || Exts.count(
"zvkned") ||
786 Exts.count(
"zvknha") || Exts.count(
"zvksed") || Exts.count(
"zvksh")) &&
790 "'zvk*' requires 'v' or 'zve*' extension to also be specified");
792 if (Exts.count(
"zvknhb") && !Exts.count(
"zve64x"))
795 "'zvknhb' requires 'v' or 'zve64*' extension to also be specified");
797 if ((HasZcmt || Exts.count(
"zcmp")) && Exts.count(
"d") &&
798 (HasC || Exts.count(
"zcd")))
801 Twine(
"'") + (HasZcmt ?
"zcmt" :
"zcmp") +
802 "' extension is incompatible with '" + (HasC ?
"c" :
"zcd") +
803 "' extension when 'd' extension is enabled");
805 if (XLen != 32 && Exts.count(
"zcf"))
807 "'zcf' is only supported for 'rv32'");
809 if (Exts.count(
"zacas") && !(Exts.count(
"a") || Exts.count(
"zamo")))
812 "'zacas' requires 'a' or 'zaamo' extension to also be specified");
814 if (Exts.count(
"zabha") && !(Exts.count(
"a") || Exts.count(
"zamo")))
817 "'zabha' requires 'a' or 'zaamo' extension to also be specified");
839#define GET_IMPLIED_EXTENSIONS
840#include "llvm/TargetParser/RISCVTargetParserDef.inc"
842void RISCVISAInfo::updateImplication() {
843 bool HasE = Exts.count(
"e") != 0;
844 bool HasI = Exts.count(
"i") != 0;
848 if (!HasE && !HasI) {
850 addExtension(
"i", Version.value());
858 for (
auto const &Ext : Exts)
859 WorkList.
insert(Ext.first);
861 while (!WorkList.
empty()) {
863 auto Range = std::equal_range(std::begin(ImpliedExts),
864 std::end(ImpliedExts), ExtName);
865 std::for_each(Range.first, Range.second,
867 const char *ImpliedExt = Implied.ImpliedExt;
868 if (WorkList.count(ImpliedExt))
870 if (Exts.count(ImpliedExt))
872 auto Version = findDefaultVersion(ImpliedExt);
873 addExtension(ImpliedExt, Version.value());
874 WorkList.insert(ImpliedExt);
879 if (XLen == 32 && Exts.count(
"zce") && Exts.count(
"f") &&
880 !Exts.count(
"zcf")) {
882 addExtension(
"zcf", Version.value());
887 {
"zk"}, {
"zkn"}, {
"zks"}, {
"zvkn"}, {
"zvknc"},
888 {
"zvkng"}, {
"zvks"}, {
"zvksc"}, {
"zvksg"},
891void RISCVISAInfo::updateCombination() {
892 bool MadeChange =
false;
901 auto Range = std::equal_range(std::begin(ImpliedExts),
902 std::end(ImpliedExts), CombineExt);
903 bool HasAllRequiredFeatures = std::all_of(
905 return hasExtension(Implied.ImpliedExt);
907 if (HasAllRequiredFeatures) {
909 addExtension(CombineExt,
Version.value());
913 }
while (MadeChange);
916void RISCVISAInfo::updateImpliedLengths() {
917 assert(FLen == 0 && MaxELenFp == 0 && MaxELen == 0 && MinVLen == 0 &&
918 "Expected lengths to be initialied to zero");
923 else if (Exts.count(
"f"))
926 if (Exts.count(
"v")) {
927 MaxELenFp = std::max(MaxELenFp, 64u);
928 MaxELen = std::max(MaxELen, 64u);
931 for (
auto const &Ext : Exts) {
940 MaxELenFp = std::max(MaxELenFp, 32u);
941 else if (ExtName ==
"d")
942 MaxELenFp = std::max(MaxELenFp, 64u);
943 else if (ExtName !=
"x")
946 MaxELen = std::max(MaxELen, ZveELen);
959 MinVLen = std::max(MinVLen, ZvlLen);
969 Arch <<
"rv" << XLen;
971 ListSeparator LS(
"_");
972 for (
auto const &Ext : Exts) {
974 auto ExtInfo = Ext.second;
975 Arch << LS << ExtName;
976 Arch << ExtInfo.Major <<
"p" << ExtInfo.Minor;
984 ISAInfo->updateImplication();
985 ISAInfo->updateCombination();
986 ISAInfo->updateImpliedLengths();
988 if (
Error Result = ISAInfo->checkDependency())
989 return std::move(Result);
990 return std::move(ISAInfo);
1002 }
else if (XLen == 64) {
1024 unsigned Major, Minor, ConsumeLength;
1036 return std::string();
1042 return std::string();
1045 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)
static bool isLower(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 consumeInteger(unsigned Radix, T &Result)
Parse the current string as an integer of the specified radix.
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.
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.
static constexpr size_t npos
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.
@ C
The default llvm calling convention, compatible with C.
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)
bool all_of(R &&range, UnaryPredicate P)
Provide wrappers to std::all_of which take ranges instead of having to pass begin/end explicitly.
raw_fd_ostream & outs()
This returns a reference to a raw_fd_ostream for standard output.
auto upper_bound(R &&Range, T &&Value)
Provide wrappers to std::upper_bound which take ranges instead of having to pass begin/end explicitly...
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...
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.