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 HasFullFP16 =
false;
42 bool HasDotProd =
false;
43 bool HasFP16FML =
false;
46 bool HasPAuth =
false;
48 bool HasRandGen =
false;
49 bool HasMatMul =
false;
50 bool HasBFloat16 =
false;
52 bool HasSVE2p1 =
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;
72 bool HasSMEF64F64 =
false;
73 bool HasSMEI16I64 =
false;
74 bool HasSME2p1 =
false;
76 bool HasPredRes =
false;
80 bool HasJSCVT =
false;
83 bool HasNoNeon =
false;
84 bool HasNoSVE =
false;
87 bool HasRCPC3 =
false;
88 bool HasSMEFA64 =
false;
89 bool HasPAuthLR =
false;
91 const llvm::AArch64::ArchInfo *ArchInfo = &llvm::AArch64::ARMV8A;
98 StringRef getABI()
const override;
99 bool setABI(
const std::string &Name)
override;
101 bool validateBranchProtection(StringRef Spec, StringRef Arch,
103 StringRef &Err)
const override;
105 bool isValidCPUName(StringRef Name)
const override;
107 bool setCPU(
const std::string &Name)
override;
109 unsigned multiVersionSortPriority(StringRef Name)
const override;
110 unsigned multiVersionFeatureCost()
const override;
116 void setArchFeatures();
118 void getTargetDefinesARMV81A(
const LangOptions &Opts,
120 void getTargetDefinesARMV82A(
const LangOptions &Opts,
122 void getTargetDefinesARMV83A(
const LangOptions &Opts,
124 void getTargetDefinesARMV84A(
const LangOptions &Opts,
126 void getTargetDefinesARMV85A(
const LangOptions &Opts,
128 void getTargetDefinesARMV86A(
const LangOptions &Opts,
130 void getTargetDefinesARMV87A(
const LangOptions &Opts,
132 void getTargetDefinesARMV88A(
const LangOptions &Opts,
134 void getTargetDefinesARMV89A(
const LangOptions &Opts,
136 void getTargetDefinesARMV9A(
const LangOptions &Opts,
138 void getTargetDefinesARMV91A(
const LangOptions &Opts,
140 void getTargetDefinesARMV92A(
const LangOptions &Opts,
142 void getTargetDefinesARMV93A(
const LangOptions &Opts,
144 void getTargetDefinesARMV94A(
const LangOptions &Opts,
146 void getTargetDefinesARMV95A(
const LangOptions &Opts,
153 std::optional<std::pair<unsigned, unsigned>>
154 getVScaleRange(
const LangOptions &LangOpts)
const override;
155 bool doesFeatureAffectCodeGen(StringRef Name)
const override;
156 bool validateCpuSupports(StringRef FeatureStr)
const override;
157 bool hasFeature(StringRef Feature)
const override;
158 void setFeatureEnabled(llvm::StringMap<bool> &Features, StringRef Name,
159 bool Enabled)
const override;
160 bool handleTargetFeatures(std::vector<std::string> &Features,
167 bool hasBFloat16Type()
const override;
169 CallingConvCheckResult checkCallingConvention(
CallingConv CC)
const override;
171 bool isCLZForZeroUndef()
const override;
173 BuiltinVaListKind getBuiltinVaListKind()
const override;
178 std::string convertConstraint(
const char *&Constraint)
const override;
180 bool validateAsmConstraint(
const char *&Name,
183 validateConstraintModifier(StringRef Constraint,
char Modifier,
unsigned Size,
184 std::string &SuggestedModifier)
const override;
185 std::string_view getClobbers()
const override;
192 int getEHDataRegisterNumber(
unsigned RegNo)
const override;
194 bool validatePointerAuthKey(
const llvm::APSInt &value)
const override;
197 bool hasInt128Type()
const override;
203 bool validateGlobalRegisterVariable(StringRef RegName,
unsigned RegSize,
204 bool &HasSizeMismatch)
const override;
214 void setDataLayout()
override;
219 const llvm::Triple Triple;
225 void setDataLayout()
override;
227 BuiltinVaListKind getBuiltinVaListKind()
const override;
229 CallingConvCheckResult checkCallingConvention(
CallingConv CC)
const override;
242 getCallingConvKind(
bool ClangABICompat4)
const override;
244 unsigned getMinGlobalAlign(uint64_t TypeSize,
245 bool HasNonWeakDef)
const override;
262 void setDataLayout()
override;
270 BuiltinVaListKind getBuiltinVaListKind()
const override;
273 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
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.
bool supportsCpuSupports() const override
The JSON file list parser is used to communicate input to InstallAPI.
CallingConv
CallingConv - Specifies the calling convention that a function uses.
Contains information gathered from parsing the contents of TargetAttr.