13#ifndef LLVM_CLANG_LIB_BASIC_TARGETS_AARCH64_H
14#define LLVM_CLANG_LIB_BASIC_TARGETS_AARCH64_H
18#include "llvm/TargetParser/AArch64TargetParser.h"
54 virtual void setDataLayout() = 0;
56 static const char *
const GCCRegNames[];
64 unsigned FPU = FPUMode;
70 bool HasFullFP16 =
false;
71 bool HasDotProd =
false;
72 bool HasFP16FML =
false;
75 bool HasPAuth =
false;
77 bool HasRandGen =
false;
78 bool HasMatMul =
false;
79 bool HasBFloat16 =
false;
81 bool HasSVE2p1 =
false;
82 bool HasSVEAES =
false;
83 bool HasSVE2SHA3 =
false;
84 bool HasSVE2SM4 =
false;
85 bool HasSVEB16B16 =
false;
86 bool HasSVEBitPerm =
false;
87 bool HasMatmulFP64 =
false;
88 bool HasMatmulFP32 =
false;
90 bool HasFlagM =
false;
91 bool HasAlternativeNZCV =
false;
99 bool HasFRInt3264 =
false;
101 bool HasSME2 =
false;
102 bool HasSMEF64F64 =
false;
103 bool HasSMEI16I64 =
false;
104 bool HasSMEF16F16 =
false;
105 bool HasSMEB16B16 =
false;
106 bool HasSME2p1 =
false;
108 bool HasPredRes =
false;
109 bool HasSSBS =
false;
111 bool HasWFxT =
false;
112 bool HasJSCVT =
false;
113 bool HasFCMA =
false;
114 bool HasNoFP =
false;
115 bool HasNoNeon =
false;
116 bool HasNoSVE =
false;
119 bool HasRCPC3 =
false;
120 bool HasSMEFA64 =
false;
121 bool HasPAuthLR =
false;
123 const llvm::AArch64::ArchInfo *ArchInfo = &llvm::AArch64::ARMV8A;
130 StringRef getABI()
const override;
131 bool setABI(
const std::string &Name)
override;
133 bool validateBranchProtection(StringRef Spec, StringRef Arch,
135 StringRef &Err)
const override;
137 bool isValidCPUName(StringRef Name)
const override;
139 bool setCPU(
const std::string &Name)
override;
147 void setArchFeatures();
149 void getTargetDefinesARMV81A(
const LangOptions &Opts,
151 void getTargetDefinesARMV82A(
const LangOptions &Opts,
153 void getTargetDefinesARMV83A(
const LangOptions &Opts,
155 void getTargetDefinesARMV84A(
const LangOptions &Opts,
157 void getTargetDefinesARMV85A(
const LangOptions &Opts,
159 void getTargetDefinesARMV86A(
const LangOptions &Opts,
161 void getTargetDefinesARMV87A(
const LangOptions &Opts,
163 void getTargetDefinesARMV88A(
const LangOptions &Opts,
165 void getTargetDefinesARMV89A(
const LangOptions &Opts,
167 void getTargetDefinesARMV9A(
const LangOptions &Opts,
169 void getTargetDefinesARMV91A(
const LangOptions &Opts,
171 void getTargetDefinesARMV92A(
const LangOptions &Opts,
173 void getTargetDefinesARMV93A(
const LangOptions &Opts,
175 void getTargetDefinesARMV94A(
const LangOptions &Opts,
177 void getTargetDefinesARMV95A(
const LangOptions &Opts,
179 void getTargetDefinesARMV96A(
const LangOptions &Opts,
186 std::optional<std::pair<unsigned, unsigned>>
187 getVScaleRange(
const LangOptions &LangOpts)
const override;
188 bool doesFeatureAffectCodeGen(StringRef Name)
const override;
189 bool validateCpuSupports(StringRef FeatureStr)
const override;
190 bool hasFeature(StringRef Feature)
const override;
191 void setFeatureEnabled(llvm::StringMap<bool> &Features, StringRef Name,
192 bool Enabled)
const override;
193 bool handleTargetFeatures(std::vector<std::string> &Features,
200 bool hasBFloat16Type()
const override;
202 CallingConvCheckResult checkCallingConvention(
CallingConv CC)
const override;
204 bool isCLZForZeroUndef()
const override;
206 BuiltinVaListKind getBuiltinVaListKind()
const override;
211 std::string convertConstraint(
const char *&Constraint)
const override;
213 bool validateAsmConstraint(
const char *&Name,
216 validateConstraintModifier(StringRef Constraint,
char Modifier,
unsigned Size,
217 std::string &SuggestedModifier)
const override;
218 std::string_view getClobbers()
const override;
225 int getEHDataRegisterNumber(
unsigned RegNo)
const override;
227 bool validatePointerAuthKey(
const llvm::APSInt &value)
const override;
230 bool hasInt128Type()
const override;
236 bool validateGlobalRegisterVariable(StringRef RegName,
unsigned RegSize,
237 bool &HasSizeMismatch)
const override;
240 if (AddrSpace == LangAS::ptr32_sptr || AddrSpace == LangAS::ptr32_uptr)
242 if (AddrSpace == LangAS::ptr64)
248 return getPointerWidthV(AddrSpace);
259 void setDataLayout()
override;
264 const llvm::Triple Triple;
270 void setDataLayout()
override;
272 BuiltinVaListKind getBuiltinVaListKind()
const override;
274 CallingConvCheckResult checkCallingConvention(
CallingConv CC)
const override;
287 getCallingConvKind(
bool ClangABICompat4)
const override;
289 unsigned getMinGlobalAlign(uint64_t TypeSize,
290 bool HasNonWeakDef)
const override;
307 void setDataLayout()
override;
311 const llvm::Triple &Triple);
320 void getOSDefines(
const LangOptions &Opts,
const llvm::Triple &Triple,
329 BuiltinVaListKind getBuiltinVaListKind()
const override;
332 void getOSDefines(
const LangOptions &Opts,
const llvm::Triple &Triple,
static uint64_t getFMVPriority(const TargetInfo &TI, const CodeGenFunction::FMVResolverOption &RO)
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...
uint64_t getPointerWidthV(LangAS AddrSpace) const override
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
uint64_t getPointerAlignV(LangAS AddrSpace) const override
void getAppleMachOAArch64Defines(MacroBuilder &Builder, const LangOptions &Opts, const llvm::Triple &Triple)
static const unsigned ARM64AddrSpaceMap[]
The JSON file list parser is used to communicate input to InstallAPI.
LangAS
Defines the address space values used by the address space qualifier of QualType.
CallingConv
CallingConv - Specifies the calling convention that a function uses.
Contains information gathered from parsing the contents of TargetAttr.