15#ifndef LLVM_CLANG_BASIC_TARGETBUILTINS_H
16#define LLVM_CLANG_BASIC_TARGETBUILTINS_H
21#include "llvm/Support/MathExtras.h"
29#define BUILTIN(ID, TYPE, ATTRS) BI##ID,
30#define TARGET_BUILTIN(ID, TYPE, ATTRS, FEATURE) BI##ID,
31#include "clang/Basic/BuiltinsNEON.def"
41#define BUILTIN(ID, TYPE, ATTRS) BI##ID,
42#include "clang/Basic/BuiltinsARM.def"
50#define BUILTIN(ID, TYPE, ATTRS) BI##ID,
51#define TARGET_BUILTIN(ID, TYPE, ATTRS, FEATURE) BI##ID,
52#include "clang/Basic/BuiltinsSVE.def"
60#define BUILTIN(ID, TYPE, ATTRS) BI##ID,
61#define TARGET_BUILTIN(ID, TYPE, ATTRS, FEATURE) BI##ID,
62#include "clang/Basic/BuiltinsSME.def"
76 #define BUILTIN(ID, TYPE, ATTRS) BI##ID,
77 #include "clang/Basic/BuiltinsAArch64.def"
86 #define BUILTIN(ID, TYPE, ATTRS) BI##ID,
87 #include "clang/Basic/BuiltinsBPF.inc"
96#define BUILTIN(ID, TYPE, ATTRS) BI##ID,
97#include "clang/Basic/BuiltinsPPC.def"
106#define BUILTIN(ID, TYPE, ATTRS) BI##ID,
107#include "clang/Basic/BuiltinsNVPTX.def"
116 #define BUILTIN(ID, TYPE, ATTRS) BI##ID,
117 #include "clang/Basic/BuiltinsAMDGPU.def"
126#define BUILTIN(ID, TYPE, ATTRS) BI##ID,
127#include "clang/Basic/BuiltinsX86.def"
128#define BUILTIN(ID, TYPE, ATTRS) BI##ID,
129#include "clang/Basic/BuiltinsX86.inc"
132#define BUILTIN(ID, TYPE, ATTRS) BI##ID,
133#include "clang/Basic/BuiltinsX86_64.def"
142#define BUILTIN(ID, TYPE, ATTRS) BI##ID,
143#include "clang/Basic/BuiltinsVE.def"
148 namespace RISCVVector {
151#define BUILTIN(ID, TYPE, ATTRS) BI##ID,
152#include "clang/Basic/BuiltinsRISCVVector.def"
163#define BUILTIN(ID, TYPE, ATTRS) BI##ID,
164#include "clang/Basic/BuiltinsRISCV.inc"
170 namespace LoongArch {
173#define BUILTIN(ID, TYPE, ATTRS) BI##ID,
174#include "clang/Basic/BuiltinsLoongArch.def"
209 Flags |= UnsignedFlag;
219 bool isUnsigned()
const {
return (Flags & UnsignedFlag) != 0; }
220 bool isQuad()
const {
return (Flags & QuadFlag) != 0; }
241 llvm_unreachable(
"Invalid NeonTypeFlag!");
247#define LLVM_GET_ARM_INTRIN_IMMCHECKTYPES
248#include "clang/Basic/arm_immcheck_types.inc"
249#undef LLVM_GET_ARM_INTRIN_IMMCHECKTYPES
255 unsigned EltTypeShift;
256 unsigned MemEltTypeShift;
257 unsigned MergeTypeShift;
258 unsigned SplatOperandMaskShift;
261#define LLVM_GET_SVE_TYPEFLAGS
262#include "clang/Basic/arm_sve_typeflags.inc"
263#undef LLVM_GET_SVE_TYPEFLAGS
266#define LLVM_GET_SVE_ELTTYPES
267#include "clang/Basic/arm_sve_typeflags.inc"
268#undef LLVM_GET_SVE_ELTTYPES
272#define LLVM_GET_SVE_MEMELTTYPES
273#include "clang/Basic/arm_sve_typeflags.inc"
274#undef LLVM_GET_SVE_MEMELTTYPES
278#define LLVM_GET_SVE_MERGETYPES
279#include "clang/Basic/arm_sve_typeflags.inc"
280#undef LLVM_GET_SVE_MERGETYPES
284 EltTypeShift = llvm::countr_zero(EltTypeMask);
285 MemEltTypeShift = llvm::countr_zero(MemEltTypeMask);
286 MergeTypeShift = llvm::countr_zero(MergeTypeMask);
287 SplatOperandMaskShift = llvm::countr_zero(SplatOperandMask);
291 return (
EltType)((Flags & EltTypeMask) >> EltTypeShift);
295 return (
MemEltType)((Flags & MemEltTypeMask) >> MemEltTypeShift);
299 return (
MergeType)((Flags & MergeTypeMask) >> MergeTypeShift);
303 return ((Flags & SplatOperandMask) >> SplatOperandMaskShift) - 1;
307 return Flags & SplatOperandMask;
310 bool isLoad()
const {
return Flags & IsLoad; }
311 bool isStore()
const {
return Flags & IsStore; }
320 return Flags & IsOverloadWhileOrMultiVecCvt;
333 bool isUndef()
const {
return Flags & IsUndef; }
342 bool isFlagSet(uint64_t Flag)
const {
return Flags & Flag; }
349#define BUILTIN(ID, TYPE, ATTRS) BI##ID,
350#include "clang/Basic/BuiltinsHexagon.def"
359#define BUILTIN(ID, TYPE, ATTRS) BI##ID,
360#include "clang/Basic/BuiltinsMips.def"
369#define BUILTIN(ID, TYPE, ATTRS) BI##ID,
370#include "clang/Basic/BuiltinsXCore.def"
379#define BUILTIN(ID, TYPE, ATTRS) BI##ID,
380#include "clang/Basic/BuiltinsSystemZ.def"
386 namespace WebAssembly {
389#define BUILTIN(ID, TYPE, ATTRS) BI##ID,
390#include "clang/Basic/BuiltinsWebAssembly.def"
Defines enum values for all the target-independent builtin functions.
Flags to identify the types for overloaded Neon builtins.
NeonTypeFlags(unsigned F)
unsigned getEltSizeInBits() const
EltType getEltType() const
NeonTypeFlags(EltType ET, bool IsUnsigned, bool IsQuad)
Flags to identify the types for overloaded SVE builtins.
bool isZExtReturn() const
bool isReverseUSDOT() const
bool isOverloadNone() const
MemEltType getMemEltType() const
bool isGatherLoad() const
bool isOverloadCvt() const
EltType getEltType() const
bool isOverloadDefault() const
bool isOverloadWhileRW() const
bool isReverseMergeAnyAccOp() const
bool isReductionQV() const
bool isFlagSet(uint64_t Flag) const
bool isInsertOp1SVALL() const
bool isAppendSVALL() const
bool isReverseMergeAnyBinOp() const
bool isStructStore() const
bool isTupleCreate() const
bool isGatherPrefetch() const
bool hasSplatOperand() const
MergeType getMergeType() const
bool isByteIndexed() const
bool isStructLoad() const
bool isOverloadWhileOrMultiVecCvt() const
unsigned getSplatOperand() const
bool isScatterStore() const
bool isReverseCompare() const
The JSON file list parser is used to communicate input to InstallAPI.
static constexpr uint64_t LargestBuiltinID