23 if (Arch.
size() >= 2 && Arch[0] ==
'v' && std::isdigit(Arch[1]))
24 return (Arch[1] - 48);
33 std::optional<CpuInfo> Cpu =
parseCpu(CPU);
41 if (
A->getSubArch() == SubArch)
48 for (
const StringRef &FeatureStr : FeatureStrs) {
50 if (FeatureStr ==
E.Name) {
51 FeaturesMask |= (1ULL <<
E.CPUFeature);
59 std::vector<StringRef> &Features) {
62 if ((InputExts &
E.ID) && !
E.Feature.empty())
63 Features.push_back(
E.Feature);
79 if (!AE.NegFeature.empty() && ArchExtBase == AE.Name)
85 if (!AE.Feature.empty() && ArchExt == AE.Name)
99 return TT.isAndroid() || TT.isOSDarwin() || TT.isOSFuchsia() ||
100 TT.isOSWindows() || TT.isOHOSFamily();
111 if (
A->Name.endswith(Syn))
119 if (ArchExt ==
A.Name)
static unsigned checkArchVersion(llvm::StringRef Arch)
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
This file implements the StringSwitch template, which mimics a switch() statement whose cases are str...
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
void push_back(const T &Elt)
StringRef - Represent a constant reference to a string, i.e.
constexpr StringRef substr(size_t Start, size_t N=npos) const
Return a reference to the substring from [Start, Start + N).
constexpr size_t size() const
size - Get the string size.
bool startswith(StringRef Prefix) const
Triple - Helper class for working with autoconf configuration names.
static constexpr std::array< const ArchInfo *, 16 > ArchInfos
bool getExtensionFeatures(uint64_t Extensions, std::vector< StringRef > &Features)
bool isX18ReservedByDefault(const Triple &TT)
StringRef getArchExtFeature(StringRef ArchExt)
std::optional< ExtensionInfo > parseArchExtension(StringRef Extension)
constexpr CpuInfo CpuInfos[]
std::optional< CpuInfo > parseCpu(StringRef Name)
uint64_t getCpuSupportsMask(ArrayRef< StringRef > FeatureStrs)
constexpr ArchInfo ARMV8A
void fillValidCPUArchList(SmallVectorImpl< StringRef > &Values)
std::optional< ArchInfo > parseArch(StringRef Arch)
constexpr CpuAlias CpuAliases[]
std::optional< ArchInfo > getArchForCpu(StringRef CPU)
StringRef resolveCPUAlias(StringRef CPU)
constexpr ExtensionInfo Extensions[]
StringRef getCanonicalArchName(StringRef Arch)
MArch is expected to be of the form (arm|thumb)?(eb)?(v.
StringRef getArchSynonym(StringRef Arch)
Converts e.g. "armv8" -> "armv8-a".
@ C
The default llvm calling convention, compatible with C.
This is an optimization pass for GlobalISel generic memory operations.
static std::optional< ArchInfo > findBySubArch(StringRef SubArch)