13#ifndef LLVM_CLANG_LIB_BASIC_TARGETS_AARCH64_H
14#define LLVM_CLANG_LIB_BASIC_TARGETS_AARCH64_H
18#include "llvm/TargetParser/AArch64TargetParser.h"
25 virtual void setDataLayout() = 0;
27 static const char *
const GCCRegNames[];
35 unsigned FPU = FPUMode;
41 bool HasUnaligned =
true;
42 bool HasFullFP16 =
false;
43 bool HasDotProd =
false;
44 bool HasFP16FML =
false;
47 bool HasPAuth =
false;
49 bool HasRandGen =
false;
50 bool HasMatMul =
false;
51 bool HasBFloat16 =
false;
53 bool HasSVE2AES =
false;
54 bool HasSVE2SHA3 =
false;
55 bool HasSVE2SM4 =
false;
56 bool HasSVE2BitPerm =
false;
57 bool HasMatmulFP64 =
false;
58 bool HasMatmulFP32 =
false;
60 bool HasFlagM =
false;
61 bool HasAlternativeNZCV =
false;
69 bool HasFRInt3264 =
false;
71 bool HasSMEF64F64 =
false;
72 bool HasSMEI16I64 =
false;
74 bool HasPredRes =
false;
78 bool HasJSCVT =
false;
81 bool HasNoNeon =
false;
82 bool HasNoSVE =
false;
86 const llvm::AArch64::ArchInfo *ArchInfo = &llvm::AArch64::ARMV8A;
93 StringRef getABI()
const override;
94 bool setABI(
const std::string &Name)
override;
96 bool validateBranchProtection(StringRef Spec, StringRef Arch,
98 StringRef &Err)
const override;
100 bool isValidCPUName(StringRef Name)
const override;
102 bool setCPU(
const std::string &Name)
override;
104 unsigned multiVersionSortPriority(StringRef Name)
const override;
105 unsigned multiVersionFeatureCost()
const override;
110 const std::vector<std::string> &FeaturesVec)
const override;
115 void setArchFeatures();
117 void getTargetDefinesARMV81A(
const LangOptions &Opts,
119 void getTargetDefinesARMV82A(
const LangOptions &Opts,
121 void getTargetDefinesARMV83A(
const LangOptions &Opts,
123 void getTargetDefinesARMV84A(
const LangOptions &Opts,
125 void getTargetDefinesARMV85A(
const LangOptions &Opts,
127 void getTargetDefinesARMV86A(
const LangOptions &Opts,
129 void getTargetDefinesARMV87A(
const LangOptions &Opts,
131 void getTargetDefinesARMV88A(
const LangOptions &Opts,
133 void getTargetDefinesARMV89A(
const LangOptions &Opts,
135 void getTargetDefinesARMV9A(
const LangOptions &Opts,
137 void getTargetDefinesARMV91A(
const LangOptions &Opts,
139 void getTargetDefinesARMV92A(
const LangOptions &Opts,
141 void getTargetDefinesARMV93A(
const LangOptions &Opts,
143 void getTargetDefinesARMV94A(
const LangOptions &Opts,
150 std::optional<std::pair<unsigned, unsigned>>
151 getVScaleRange(
const LangOptions &LangOpts)
const override;
152 bool doesFeatureAffectCodeGen(StringRef Name)
const override;
153 StringRef getFeatureDependencies(StringRef Name)
const override;
154 bool validateCpuSupports(StringRef FeatureStr)
const override;
155 bool hasFeature(StringRef Feature)
const override;
156 void setFeatureEnabled(llvm::StringMap<bool> &Features, StringRef Name,
157 bool Enabled)
const override;
158 bool handleTargetFeatures(std::vector<std::string> &Features,
165 bool hasBFloat16Type()
const override;
167 CallingConvCheckResult checkCallingConvention(
CallingConv CC)
const override;
169 bool isCLZForZeroUndef()
const override;
171 BuiltinVaListKind getBuiltinVaListKind()
const override;
176 std::string convertConstraint(
const char *&Constraint)
const override;
178 bool validateAsmConstraint(
const char *&Name,
181 validateConstraintModifier(StringRef Constraint,
char Modifier,
unsigned Size,
182 std::string &SuggestedModifier)
const override;
183 std::string_view getClobbers()
const override;
190 int getEHDataRegisterNumber(
unsigned RegNo)
const override;
193 bool hasInt128Type()
const override;
205 void setDataLayout()
override;
210 const llvm::Triple Triple;
216 void setDataLayout()
override;
218 BuiltinVaListKind getBuiltinVaListKind()
const override;
220 CallingConvCheckResult checkCallingConvention(
CallingConv CC)
const override;
233 getCallingConvKind(
bool ClangABICompat4)
const override;
235 unsigned getMinGlobalAlign(uint64_t TypeSize)
const override;
252 void setDataLayout()
override;
260 BuiltinVaListKind getBuiltinVaListKind()
const override;
263 void getOSDefines(
const LangOptions &Opts,
const llvm::Triple &Triple,
static bool hasFeature(StringRef Feature, const LangOptions &LangOpts, const TargetInfo &Target)
Determine whether a translation unit built using the current language options has the given feature.
Enumerates target-specific builtins in their own namespaces within namespace clang.
Concrete class used by the front-end to report problems and issues.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Exposes information about the current target.
Options for controlling the target.
StringRef getConstraintRegister(StringRef Constraint, StringRef Expression) const override
Extracts a register from the passed constraint (if it is a single-register constraint) and the asm la...
bool useFP16ConversionIntrinsics() const override
Check whether llvm intrinsics such as llvm.convert.to.fp16 should be used to convert to and from __fp...
bool supportsTargetAttributeTune() const override
brief Determine whether this TargetInfo supports tune in target attribute.
const char * getBFloat16Mangling() const override
Return the mangled code of bfloat.
bool checkArithmeticFenceSupported() const override
Controls if __arithmetic_fence is supported in the targeted backend.
bool hasBitIntType() const override
Determine whether the _BitInt type is supported on this target.
CallingConv
CallingConv - Specifies the calling convention that a function uses.
Contains information gathered from parsing the contents of TargetAttr.