13#ifndef LLVM_CLANG_LIB_BASIC_TARGETS_AARCH64_H
14#define LLVM_CLANG_LIB_BASIC_TARGETS_AARCH64_H
18#include "llvm/TargetParser/AArch64TargetParser.h"
58 static const char *
const GCCRegNames[];
66 unsigned FPU = FPUMode;
73 bool HasFullFP16 =
false;
74 bool HasDotProd =
false;
75 bool HasFP16FML =
false;
77 bool HasPAuth =
false;
79 bool HasRandGen =
false;
80 bool HasMatMul =
false;
81 bool HasBFloat16 =
false;
83 bool HasSVE2p1 =
false;
84 bool HasSVEAES =
false;
85 bool HasSVE2SHA3 =
false;
86 bool HasSVE2SM4 =
false;
87 bool HasSVEB16B16 =
false;
88 bool HasSVEBitPerm =
false;
89 bool HasMatmulFP64 =
false;
90 bool HasMatmulFP32 =
false;
92 bool HasFlagM =
false;
93 bool HasAlternativeNZCV =
false;
100 bool HasCCDP =
false;
101 bool HasFRInt3264 =
false;
103 bool HasSME2 =
false;
104 bool HasSMEF64F64 =
false;
105 bool HasSMEI16I64 =
false;
106 bool HasSMEF16F16 =
false;
107 bool HasSMEB16B16 =
false;
108 bool HasSME2p1 =
false;
110 bool HasFP8FMA =
false;
111 bool HasFP8DOT2 =
false;
112 bool HasFP8DOT4 =
false;
113 bool HasSSVE_FP8DOT2 =
false;
114 bool HasSSVE_FP8DOT4 =
false;
115 bool HasSSVE_FP8FMA =
false;
116 bool HasSME_F8F32 =
false;
117 bool HasSME_F8F16 =
false;
119 bool HasPredRes =
false;
120 bool HasSSBS =
false;
122 bool HasWFxT =
false;
123 bool HasJSCVT =
false;
124 bool HasFCMA =
false;
125 bool HasNoFP =
false;
126 bool HasNoNeon =
false;
127 bool HasNoSVE =
false;
130 bool HasRCPC3 =
false;
131 bool HasSMEFA64 =
false;
132 bool HasPAuthLR =
false;
134 const llvm::AArch64::ArchInfo *ArchInfo = &llvm::AArch64::ARMV8A;
142 StringRef
getABI()
const override;
143 bool setABI(
const std::string &Name)
override;
148 StringRef &Err)
const override;
152 bool setCPU(
const std::string &Name)
override;
160 void getTargetDefinesARMV81A(
const LangOptions &Opts,
162 void getTargetDefinesARMV82A(
const LangOptions &Opts,
164 void getTargetDefinesARMV83A(
const LangOptions &Opts,
166 void getTargetDefinesARMV84A(
const LangOptions &Opts,
168 void getTargetDefinesARMV85A(
const LangOptions &Opts,
170 void getTargetDefinesARMV86A(
const LangOptions &Opts,
172 void getTargetDefinesARMV87A(
const LangOptions &Opts,
174 void getTargetDefinesARMV88A(
const LangOptions &Opts,
176 void getTargetDefinesARMV89A(
const LangOptions &Opts,
178 void getTargetDefinesARMV9A(
const LangOptions &Opts,
180 void getTargetDefinesARMV91A(
const LangOptions &Opts,
182 void getTargetDefinesARMV92A(
const LangOptions &Opts,
184 void getTargetDefinesARMV93A(
const LangOptions &Opts,
186 void getTargetDefinesARMV94A(
const LangOptions &Opts,
188 void getTargetDefinesARMV95A(
const LangOptions &Opts,
190 void getTargetDefinesARMV96A(
const LangOptions &Opts,
192 void getTargetDefinesARMV97A(
const LangOptions &Opts,
199 std::optional<std::pair<unsigned, unsigned>>
200 getVScaleRange(
const LangOptions &LangOpts, ArmStreamingKind Mode,
201 llvm::StringMap<bool> *FeatureMap =
nullptr)
const override;
202 bool doesFeatureAffectCodeGen(StringRef Name)
const override;
203 bool validateCpuSupports(StringRef FeatureStr)
const override;
205 void setFeatureEnabled(llvm::StringMap<bool> &Features, StringRef Name,
206 bool Enabled)
const override;
207 bool handleTargetFeatures(std::vector<std::string> &Features,
214 bool hasBFloat16Type()
const override;
216 CallingConvCheckResult checkCallingConvention(
CallingConv CC)
const override;
218 bool isCLZForZeroUndef()
const override;
220 BuiltinVaListKind getBuiltinVaListKind()
const override;
225 std::string convertConstraint(
const char *&Constraint)
const override;
227 bool validateAsmConstraint(
const char *&Name,
230 validateConstraintModifier(StringRef Constraint,
char Modifier,
unsigned Size,
231 std::string &SuggestedModifier)
const override;
232 std::string_view getClobbers()
const override;
239 int getEHDataRegisterNumber(
unsigned RegNo)
const override;
241 bool validatePointerAuthKey(
const llvm::APSInt &value)
const override;
246 return std::make_pair(256, 64);
249 bool hasInt128Type()
const override;
255 bool validateGlobalRegisterVariable(StringRef RegName,
unsigned RegSize,
256 bool &HasSizeMismatch)
const override;
282 if (Name ==
"pauthtest") {
291 const llvm::Triple Triple;
315 bool HasNonWeakDef)
const override;
333 const llvm::Triple &Triple);
static llvm::APInt 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...
TargetInfo(const llvm::Triple &T)
BuiltinVaListKind
The different kinds of __builtin_va_list types defined by the target implementation.
virtual bool setABI(const std::string &Name)
Use the specified ABI.
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...
std::pair< unsigned, unsigned > hardwareInterferenceSizes() const override
The first value in the pair is the minimum offset between two objects to avoid false sharing (destruc...
uint64_t getPointerWidthV(LangAS AddrSpace) const override
bool supportsTargetAttributeTune() const override
Determine whether this TargetInfo supports tune in target attribute.
AArch64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
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 setABI(const std::string &Name) override
Use the specified ABI.
bool isValidCPUName(StringRef Name) const override
Determine whether this TargetInfo supports the given CPU name.
void fillValidCPUList(SmallVectorImpl< StringRef > &Values) const override
Fill a SmallVectorImpl with the valid values to setCPU.
StringRef getABI() const override
Get the ABI currently in use.
bool hasBitIntType() const override
Determine whether the _BitInt type is supported on this target.
bool supportsCpuSupports() const override
bool validateBranchProtection(StringRef Spec, StringRef Arch, BranchProtectionInfo &BPI, const LangOptions &LO, StringRef &Err) const override
Determine if this TargetInfo supports the given branch protection specification.
uint64_t getPointerAlignV(LangAS AddrSpace) const override
bool setCPU(const std::string &Name) override
Target the specified CPU.
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
===-— Other target property query methods -----------------------—===//
AArch64beTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
AArch64leTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
===-— Other target property query methods -----------------------—===//
void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple, MacroBuilder &Builder) const override
AppleMachOAArch64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
AppleMachOTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
DarwinAArch64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple, MacroBuilder &Builder) const override
BuiltinVaListKind getBuiltinVaListKind() const override
Returns the kind of __builtin_va_list type that should be used with this target.
DarwinTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
bool setABI(const std::string &Name) override
unsigned getMinGlobalAlign(uint64_t TypeSize, bool HasNonWeakDef) const override
getMinGlobalAlign - Return the minimum alignment of a global variable, unless its alignment is explic...
MicrosoftARM64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
TargetInfo::CallingConvKind getCallingConvKind(bool ClangABICompat4) const override
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
===-— Other target property query methods -----------------------—===//
MinGWARM64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
BuiltinVaListKind getBuiltinVaListKind() const override
Returns the kind of __builtin_va_list type that should be used with this target.
WindowsARM64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
CallingConvCheckResult checkCallingConvention(CallingConv CC) const override
Determines whether a given calling convention is valid for the target.
WindowsTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
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.
unsigned char PointerWidth