17#include "llvm/TargetParser/TargetParser.h"
25#define GET_BUILTIN_STR_TABLE
26#include "clang/Basic/BuiltinsSPIRVCommon.inc"
27#undef GET_BUILTIN_STR_TABLE
30#define GET_BUILTIN_INFOS
31#include "clang/Basic/BuiltinsSPIRVCommon.inc"
32#undef GET_BUILTIN_INFOS
36#define GET_BUILTIN_STR_TABLE
37#include "clang/Basic/BuiltinsSPIRVCL.inc"
38#undef GET_BUILTIN_STR_TABLE
41#define GET_BUILTIN_INFOS
42#include "clang/Basic/BuiltinsSPIRVCL.inc"
43#undef GET_BUILTIN_INFOS
48#define GET_BUILTIN_STR_TABLE
49#include "clang/Basic/BuiltinsSPIRVVK.inc"
50#undef GET_BUILTIN_STR_TABLE
53#define GET_BUILTIN_INFOS
54#include "clang/Basic/BuiltinsSPIRVVK.inc"
55#undef GET_BUILTIN_INFOS
93 Builder.defineMacro(
"__VULKAN__");
114 AMDGPUTI(llvm::Triple(llvm::Triple::amdgcn, llvm::Triple::NoSubArch,
115 llvm::Triple::AMD, llvm::Triple::AMDHSA),
124 const std::vector<std::string> &FeatureVec)
const {
125 llvm::AMDGPU::fillAMDGPUFeatureMap({},
getTriple(), Features);
132 return AMDGPUTI.validateAsmConstraint(Name, Info);
137 return AMDGPUTI.convertConstraint(Constraint);
142 return AMDGPUTI.getTargetBuiltins();
150 Builder.defineMacro(
"__AMD__");
151 Builder.defineMacro(
"__AMDGPU__");
152 Builder.defineMacro(
"__AMDGCN__");
155 Builder.defineMacro(
"__AMDGCN_UNSAFE_FP_ATOMICS__");
159 assert(Aux &&
"Cannot invoke setAuxTarget without a valid auxiliary target!");
194 return AMDGPUTI.isValidCPUName(CPU);
199 return AMDGPUTI.fillValidCPUList(Values);
static constexpr llvm::StringTable BuiltinStrings
static const AMDGPUTargetInfo AMDGPUTI(llvm::Triple(llvm::Triple::amdgcn, llvm::Triple::NoSubArch, llvm::Triple::AMD, llvm::Triple::AMDHSA), {})
static constexpr Builtin::Info BuiltinInfos[]
static constexpr unsigned NumBuiltins
Defines the clang::MacroBuilder utility class.
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...
bool AtomicIgnoreDenormalMode
void copyAuxTarget(const TargetInfo *Aux)
Copy type and layout related info.
TargetInfo(const llvm::Triple &T)
const llvm::Triple & getTriple() const
Returns the target triple of the primary target.
virtual bool hasFloat128Type() const
Determine whether the __float128 type is supported on this target.
virtual bool initFeatureMap(llvm::StringMap< bool > &Features, DiagnosticsEngine &Diags, StringRef CPU, const std::vector< std::string > &FeatureVec) const
Initialize the map with the default set of target features for the CPU this should include all legal ...
llvm::SmallVector< Builtin::InfosShard > getTargetBuiltins() const override
Return information about target-specific builtins for the current primary target, and info about whic...
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
===-— Other target property query methods -----------------------—===//
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
===-— Other target property query methods -----------------------—===//
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
===-— Other target property query methods -----------------------—===//
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
===-— Other target property query methods -----------------------—===//
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
===-— Other target property query methods -----------------------—===//
llvm::SmallVector< Builtin::InfosShard > getTargetBuiltins() const override
Return information about target-specific builtins for the current primary target, and info about whic...
void fillValidCPUList(SmallVectorImpl< StringRef > &Values) const override
Fill a SmallVectorImpl with the valid values to setCPU.
ArrayRef< const char * > getGCCRegNames() const override
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
===-— Other target property query methods -----------------------—===//
bool isValidCPUName(StringRef Name) const override
Determine whether this TargetInfo supports the given CPU name.
void setAuxTarget(const TargetInfo *Aux) override
bool validateAsmConstraint(const char *&Name, TargetInfo::ConstraintInfo &Info) const override
bool initFeatureMap(llvm::StringMap< bool > &Features, DiagnosticsEngine &Diags, StringRef, const std::vector< std::string > &) const override
Initialize the map with the default set of target features for the CPU this should include all legal ...
std::string convertConstraint(const char *&Constraint) const override
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
===-— Other target property query methods -----------------------—===//
void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override
===-— Other target property query methods -----------------------—===//
static constexpr Builtin::Info BuiltinInfos[]
static constexpr Builtin::Info BuiltinInfos[]
LLVM_LIBRARY_VISIBILITY void DefineStd(clang::MacroBuilder &Builder, llvm::StringRef MacroName, const clang::LangOptions &Opts)
Define a macro name and standard variants.
The JSON file list parser is used to communicate input to InstallAPI.
The info used to represent each builtin.
const llvm::fltSemantics * DoubleFormat
const llvm::fltSemantics * LongDoubleFormat
const llvm::fltSemantics * Float128Format
unsigned char LongDoubleAlign
unsigned char LongDoubleWidth
const llvm::fltSemantics * FloatFormat
const llvm::fltSemantics * HalfFormat