13#ifndef LLVM_CLANG_LIB_BASIC_TARGETS_AARCH64_H
14#define LLVM_CLANG_LIB_BASIC_TARGETS_AARCH64_H
18#include "llvm/TargetParser/AArch64TargetParser.h"
57 virtual void setDataLayout() = 0;
59 static const char *
const GCCRegNames[];
67 unsigned FPU = FPUMode;
74 bool HasFullFP16 =
false;
75 bool HasDotProd =
false;
76 bool HasFP16FML =
false;
79 bool HasPAuth =
false;
81 bool HasRandGen =
false;
82 bool HasMatMul =
false;
83 bool HasBFloat16 =
false;
85 bool HasSVE2p1 =
false;
86 bool HasSVEAES =
false;
87 bool HasSVE2SHA3 =
false;
88 bool HasSVE2SM4 =
false;
89 bool HasSVEB16B16 =
false;
90 bool HasSVEBitPerm =
false;
91 bool HasMatmulFP64 =
false;
92 bool HasMatmulFP32 =
false;
94 bool HasFlagM =
false;
95 bool HasAlternativeNZCV =
false;
101 bool HasCCPP =
false;
102 bool HasCCDP =
false;
103 bool HasFRInt3264 =
false;
105 bool HasSME2 =
false;
106 bool HasSMEF64F64 =
false;
107 bool HasSMEI16I64 =
false;
108 bool HasSMEF16F16 =
false;
109 bool HasSMEB16B16 =
false;
110 bool HasSME2p1 =
false;
112 bool HasFP8FMA =
false;
113 bool HasFP8DOT2 =
false;
114 bool HasFP8DOT4 =
false;
115 bool HasSSVE_FP8DOT2 =
false;
116 bool HasSSVE_FP8DOT4 =
false;
117 bool HasSSVE_FP8FMA =
false;
118 bool HasSME_F8F32 =
false;
119 bool HasSME_F8F16 =
false;
121 bool HasPredRes =
false;
122 bool HasSSBS =
false;
124 bool HasWFxT =
false;
125 bool HasJSCVT =
false;
126 bool HasFCMA =
false;
127 bool HasNoFP =
false;
128 bool HasNoNeon =
false;
129 bool HasNoSVE =
false;
132 bool HasRCPC3 =
false;
133 bool HasSMEFA64 =
false;
134 bool HasPAuthLR =
false;
136 const llvm::AArch64::ArchInfo *ArchInfo = &llvm::AArch64::ARMV8A;
143 StringRef
getABI()
const override;
144 bool setABI(
const std::string &Name)
override;
149 StringRef &Err)
const override;
153 bool setCPU(
const std::string &Name)
override;
161 void getTargetDefinesARMV81A(
const LangOptions &Opts,
163 void getTargetDefinesARMV82A(
const LangOptions &Opts,
165 void getTargetDefinesARMV83A(
const LangOptions &Opts,
167 void getTargetDefinesARMV84A(
const LangOptions &Opts,
169 void getTargetDefinesARMV85A(
const LangOptions &Opts,
171 void getTargetDefinesARMV86A(
const LangOptions &Opts,
173 void getTargetDefinesARMV87A(
const LangOptions &Opts,
175 void getTargetDefinesARMV88A(
const LangOptions &Opts,
177 void getTargetDefinesARMV89A(
const LangOptions &Opts,
179 void getTargetDefinesARMV9A(
const LangOptions &Opts,
181 void getTargetDefinesARMV91A(
const LangOptions &Opts,
183 void getTargetDefinesARMV92A(
const LangOptions &Opts,
185 void getTargetDefinesARMV93A(
const LangOptions &Opts,
187 void getTargetDefinesARMV94A(
const LangOptions &Opts,
189 void getTargetDefinesARMV95A(
const LangOptions &Opts,
191 void getTargetDefinesARMV96A(
const LangOptions &Opts,
198 std::optional<std::pair<unsigned, unsigned>>
199 getVScaleRange(
const LangOptions &LangOpts, ArmStreamingKind Mode,
200 llvm::StringMap<bool> *FeatureMap =
nullptr)
const override;
201 bool doesFeatureAffectCodeGen(StringRef Name)
const override;
202 bool validateCpuSupports(StringRef FeatureStr)
const override;
204 void setFeatureEnabled(llvm::StringMap<bool> &Features, StringRef Name,
205 bool Enabled)
const override;
206 bool handleTargetFeatures(std::vector<std::string> &Features,
213 bool hasBFloat16Type()
const override;
215 CallingConvCheckResult checkCallingConvention(
CallingConv CC)
const override;
217 bool isCLZForZeroUndef()
const override;
219 BuiltinVaListKind getBuiltinVaListKind()
const override;
224 std::string convertConstraint(
const char *&Constraint)
const override;
226 bool validateAsmConstraint(
const char *&Name,
229 validateConstraintModifier(StringRef Constraint,
char Modifier,
unsigned Size,
230 std::string &SuggestedModifier)
const override;
231 std::string_view getClobbers()
const override;
238 int getEHDataRegisterNumber(
unsigned RegNo)
const override;
240 bool validatePointerAuthKey(
const llvm::APSInt &value)
const override;
245 return std::make_pair(256, 64);
248 bool hasInt128Type()
const override;
254 bool validateGlobalRegisterVariable(StringRef RegName,
unsigned RegSize,
255 bool &HasSizeMismatch)
const override;
277 void setDataLayout()
override;
282 const llvm::Triple Triple;
308 bool HasNonWeakDef)
const override;
325 void setDataLayout()
override;
329 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.
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)
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)
void setDataLayout() override
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