22 if (Arch.
size() >= 2 && Arch[0] ==
'v' && std::isdigit(Arch[1]))
23 return (Arch[1] - 48);
33 .Case(NAME, ARM::DEFAULT_FPU)
34 #include "../../include/llvm/Support/AArch64TargetParser.def" 35 .Default(ARM::FK_INVALID);
45 .ArchBaseExtensions | \
47 #include "../../include/llvm/Support/AArch64TargetParser.def" 53 return ArchKind::ARMV8A;
58 #include "../../include/llvm/Support/AArch64TargetParser.def" 59 .Default(ArchKind::INVALID);
63 std::vector<StringRef> &Features) {
68 Features.push_back(
"+fp-armv8");
70 Features.push_back(
"+neon");
72 Features.push_back(
"+crc");
74 Features.push_back(
"+crypto");
76 Features.push_back(
"+dotprod");
78 Features.push_back(
"+fp16fml");
80 Features.push_back(
"+fullfp16");
82 Features.push_back(
"+spe");
84 Features.push_back(
"+ras");
86 Features.push_back(
"+lse");
88 Features.push_back(
"+rdm");
90 Features.push_back(
"+sve");
92 Features.push_back(
"+sve2");
94 Features.push_back(
"+sve2-aes");
96 Features.push_back(
"+sve2-sm4");
98 Features.push_back(
"+sve2-sha3");
100 Features.push_back(
"+sve2-bitperm");
102 Features.push_back(
"+rcpc");
108 std::vector<StringRef> &Features) {
109 if (AK == ArchKind::ARMV8_1A)
110 Features.push_back(
"+v8.1a");
111 if (AK == ArchKind::ARMV8_2A)
112 Features.push_back(
"+v8.2a");
113 if (AK == ArchKind::ARMV8_3A)
114 Features.push_back(
"+v8.3a");
115 if (AK == ArchKind::ARMV8_4A)
116 Features.push_back(
"+v8.4a");
117 if (AK == ArchKind::ARMV8_5A)
118 Features.push_back(
"+v8.5a");
120 return AK != ArchKind::INVALID;
141 if (ArchExtKind == AE.ID)
150 if (AE.NegFeature && ArchExtBase == AE.getName())
156 if (AE.Feature && ArchExt == AE.getName())
163 if (AK == ArchKind::INVALID)
168 if (CPU.ArchID == AK && CPU.Default)
169 return CPU.getName();
177 if (Arch.ArchID != ArchKind::INVALID)
191 return ArchKind::INVALID;
195 if (A.getName().endswith(Syn))
198 return ArchKind::INVALID;
203 if (ArchExt == A.getName())
204 return static_cast<ArchExtKind>(A.ID);
214 return ArchKind::INVALID;
224 PBP = {
"none",
"a_key",
false};
228 if (Spec ==
"standard") {
229 PBP.
Scope =
"non-leaf";
235 Spec.
split(Opts,
"+");
236 for (
int I = 0,
E = Opts.
size();
I !=
E; ++
I) {
242 if (Opt ==
"pac-ret") {
243 PBP.
Scope =
"non-leaf";
244 for (;
I + 1 !=
E; ++
I) {
246 if (PACOpt ==
"leaf")
248 else if (PACOpt ==
"b-key")
unsigned getArchAttr(ArchKind AK)
bool isOSDarwin() const
isOSDarwin - Is this a "Darwin" OS (macOS, iOS, tvOS or watchOS).
This class represents lattice values for constants.
ArchKind getCPUArchKind(StringRef CPU)
LLVM_NODISCARD bool startswith(StringRef Prefix) const
Check if this string starts with the given Prefix.
void push_back(const T &Elt)
bool BranchTargetEnforcement
StringRef getCPUAttr(ArchKind AK)
ArchExtKind parseArchExt(StringRef ArchExt)
StringRef getArchExtName(unsigned ArchExtKind)
unsigned getDefaultFPU(StringRef CPU, ArchKind AK)
StringRef getArchExtFeature(StringRef ArchExt)
static StringRef getName(Value *V)
StringRef getCanonicalArchName(StringRef Arch)
bool getExtensionFeatures(unsigned Extensions, std::vector< StringRef > &Features)
LLVM_NODISCARD StringRef substr(size_t Start, size_t N=npos) const
Return a reference to the substring from [Start, Start + N).
ArchKind parseArch(StringRef Arch)
LLVM_NODISCARD size_t size() const
size - Get the string size.
#define AARCH64_CPU_NAME(NAME, ID, DEFAULT_FPU, IS_DEFAULT, DEFAULT_EXT)
StringRef getArchName(ArchKind AK)
bool isOSWindows() const
Tests whether the OS is Windows.
A switch()-like statement whose cases are string literals.
bool parseBranchProtection(StringRef Spec, ParsedBranchProtection &PBP, StringRef &Err)
bool isX18ReservedByDefault(const Triple &TT)
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
const ARM::ExtName AArch64ARCHExtNames[]
const ARM::CpuNames< ArchKind > AArch64CPUNames[]
Triple - Helper class for working with autoconf configuration names.
StringRef getArchSynonym(StringRef Arch)
void fillValidCPUArchList(SmallVectorImpl< StringRef > &Values)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
LLVM_NODISCARD std::pair< StringRef, StringRef > split(char Separator) const
Split into two substrings around the first occurrence of a separator character.
const ARM::ArchNames< ArchKind > AArch64ARCHNames[]
static unsigned checkArchVersion(llvm::StringRef Arch)
StringRef getName() const
Return a constant reference to the value's name.
ArchKind parseCPUArch(StringRef CPU)
static Triple::ArchType parseArch(StringRef ArchName)
StringRef getSubArch(ArchKind AK)
bool isAndroid() const
Tests whether the target is Android.
StringRef - Represent a constant reference to a string, i.e.
bool getArchFeatures(ArchKind AK, std::vector< StringRef > &Features)
StringRef getDefaultCPU(StringRef Arch)
unsigned getDefaultExtensions(StringRef CPU, ArchKind AK)