13 #ifndef LLVM_CLANG_LIB_BASIC_TARGETS_SPIR_H 14 #define LLVM_CLANG_LIB_BASIC_TARGETS_SPIR_H 18 #include "llvm/ADT/Triple.h" 19 #include "llvm/Support/Compiler.h" 43 assert(getTriple().getOS() == llvm::Triple::UnknownOS &&
44 "SPIR target must use unknown OS");
45 assert(getTriple().getEnvironment() == llvm::Triple::UnknownEnvironment &&
46 "SPIR target must use unknown environment type");
49 LongWidth = LongAlign = 64;
51 UseAddrSpaceMapMangling =
true;
52 HasLegalHalfType =
true;
63 return Feature ==
"spir";
101 getSupportedOpenCLOpts().supportAll();
108 PointerWidth = PointerAlign = 32;
111 resetDataLayout(
"e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-" 112 "v96:128-v192:256-v256:256-v512:512-v1024:1024");
123 PointerWidth = PointerAlign = 64;
126 resetDataLayout(
"e-i64:64-v16:16-v24:32-v32:32-v48:64-" 127 "v96:128-v192:256-v256:256-v512:512-v1024:1024");
135 #endif // LLVM_CLANG_LIB_BASIC_TARGETS_SPIR_H
CallingConv getDefaultCallingConv() const override
Gets the default calling convention for the given target and declaration context. ...
bool useFP16ConversionIntrinsics() const override
Check whether llvm intrinsics such as llvm.convert.to.fp16 should be used to convert to and from __fp...
CallingConvCheckResult checkCallingConvention(CallingConv CC) const override
Determines whether a given calling convention is valid for the target.
SPIR32TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
Options for controlling the target.
ArrayRef< Builtin::Info > getTargetBuiltins() const override
Return information about target-specific builtins for the current primary target, and info about whic...
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
SPIRTargetInfo(const llvm::Triple &Triple, const TargetOptions &)
ArrayRef< const char * > getGCCRegNames() const override
typedef void* __builtin_va_list;
Exposes information about the current target.
CallingConv
CallingConv - Specifies the calling convention that a function uses.
void setSupportedOpenCLOpts() override
Set supported OpenCL extensions and optional core features.
Defines the clang::TargetOptions class.
static const unsigned SPIRAddrSpaceMap[]
Dataflow Directional Tag Classes.
BuiltinVaListKind getBuiltinVaListKind() const override
Returns the kind of __builtin_va_list type that should be used with this target.
SPIR64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
BuiltinVaListKind
The different kinds of __builtin_va_list types defined by the target implementation.
bool validateAsmConstraint(const char *&Name, TargetInfo::ConstraintInfo &info) const override
ArrayRef< TargetInfo::GCCRegAlias > getGCCRegAliases() const override
Defines the clang::TargetInfo interface.
bool hasFeature(StringRef Feature) const override
Determine whether the given target has the given feature.
const char * getClobbers() const override
Returns a string of target-specific clobbers, in LLVM format.