14 #ifndef LLVM_CLANG_LIB_BASIC_TARGETS_SPIR_H 15 #define LLVM_CLANG_LIB_BASIC_TARGETS_SPIR_H 19 #include "llvm/ADT/Triple.h" 20 #include "llvm/Support/Compiler.h" 41 assert(getTriple().getOS() == llvm::Triple::UnknownOS &&
42 "SPIR target must use unknown OS");
43 assert(getTriple().getEnvironment() == llvm::Triple::UnknownEnvironment &&
44 "SPIR target must use unknown environment type");
47 LongWidth = LongAlign = 64;
49 UseAddrSpaceMapMangling =
true;
50 HasLegalHalfType =
true;
60 return Feature ==
"spir";
98 getSupportedOpenCLOpts().supportAll();
105 PointerWidth = PointerAlign = 32;
108 resetDataLayout(
"e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-" 109 "v96:128-v192:256-v256:256-v512:512-v1024:1024");
120 PointerWidth = PointerAlign = 64;
123 resetDataLayout(
"e-i64:64-v16:16-v24:32-v32:32-v48:64-" 124 "v96:128-v192:256-v256:256-v512:512-v1024:1024");
132 #endif // LLVM_CLANG_LIB_BASIC_TARGETS_SPIR_H
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.
CallingConv getDefaultCallingConv(CallingConvMethodType MT) const override
Gets the default calling convention for the given target and declaration context. ...
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.