clang 23.0.0git
AMDGPU.h
Go to the documentation of this file.
1//===--- AMDGPU.h - Declare AMDGPU target feature support -------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file declares AMDGPU TargetInfo objects.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_CLANG_LIB_BASIC_TARGETS_AMDGPU_H
14#define LLVM_CLANG_LIB_BASIC_TARGETS_AMDGPU_H
15
19#include "llvm/ADT/StringSet.h"
20#include "llvm/Support/AMDGPUAddrSpace.h"
21#include "llvm/Support/Compiler.h"
22#include "llvm/TargetParser/TargetParser.h"
23#include "llvm/TargetParser/Triple.h"
24#include <optional>
25
26namespace clang {
27namespace targets {
28
29class LLVM_LIBRARY_VISIBILITY AMDGPUTargetInfo final : public TargetInfo {
30
31 static const char *const GCCRegNames[];
32
33 static const LangASMap AMDGPUDefIsGenMap;
34 static const LangASMap AMDGPUDefIsPrivMap;
35
36 llvm::AMDGPU::GPUKind GPUKind;
37 unsigned GPUFeatures;
38 unsigned WavefrontSize;
39
40 /// Whether to use cumode or WGP mode. True for cumode. False for WGP mode.
41 bool CUMode;
42
43 /// Whether having image instructions.
44 bool HasImage = false;
45
46 /// Target ID is device name followed by optional feature name postfixed
47 /// by plus or minus sign delimitted by colon, e.g. gfx908:xnack+:sramecc-.
48 /// If the target ID contains feature+, map it to true.
49 /// If the target ID contains feature-, map it to false.
50 /// If the target ID does not contain a feature (default), do not map it.
51 llvm::StringMap<bool> OffloadArchFeatures;
52 std::string TargetID;
53
54 bool hasFP64() const {
55 return getTriple().isAMDGCN() ||
56 !!(GPUFeatures & llvm::AMDGPU::FEATURE_FP64);
57 }
58
59 /// Has fast fma f32
60 bool hasFastFMAF() const {
61 return !!(GPUFeatures & llvm::AMDGPU::FEATURE_FAST_FMA_F32);
62 }
63
64 /// Has fast fma f64
65 bool hasFastFMA() const { return getTriple().isAMDGCN(); }
66
67 bool hasFMAF() const {
68 return getTriple().isAMDGCN() ||
69 !!(GPUFeatures & llvm::AMDGPU::FEATURE_FMA);
70 }
71
72 bool hasFullRateDenormalsF32() const {
73 return !!(GPUFeatures & llvm::AMDGPU::FEATURE_FAST_DENORMAL_F32);
74 }
75
76 bool hasLDEXPF() const {
77 return getTriple().isAMDGCN() ||
78 !!(GPUFeatures & llvm::AMDGPU::FEATURE_LDEXP);
79 }
80
81 static bool isAMDGCN(const llvm::Triple &TT) { return TT.isAMDGCN(); }
82
83 static bool isR600(const llvm::Triple &TT) {
84 return TT.getArch() == llvm::Triple::r600;
85 }
86
87 bool hasFlatSupport() const {
88 if (GPUKind >= llvm::AMDGPU::GK_GFX700)
89 return true;
90
91 // Dummy target is assumed to be gfx700+ for amdhsa.
92 if (GPUKind == llvm::AMDGPU::GK_NONE &&
93 getTriple().getOS() == llvm::Triple::AMDHSA)
94 return true;
95
96 return false;
97 }
98
99public:
100 AMDGPUTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts);
101
102 void setAddressSpaceMap(bool DefaultIsPrivate);
103
104 void adjust(DiagnosticsEngine &Diags, LangOptions &Opts,
105 const TargetInfo *Aux) override;
106
107 uint64_t getPointerWidthV(LangAS AS) const override {
108 if (isR600(getTriple()))
109 return 32;
110 unsigned TargetAS = getTargetAddressSpace(AS);
111
112 if (TargetAS == llvm::AMDGPUAS::PRIVATE_ADDRESS ||
113 TargetAS == llvm::AMDGPUAS::LOCAL_ADDRESS)
114 return 32;
115
116 return 64;
117 }
118
119 uint64_t getPointerAlignV(LangAS AddrSpace) const override {
120 return getPointerWidthV(AddrSpace);
121 }
122
123 virtual bool isAddressSpaceSupersetOf(LangAS A, LangAS B) const override {
124 // The flat address space AS(0) is a superset of all the other address
125 // spaces used by the backend target.
126 return A == B ||
127 ((A == LangAS::Default ||
129 toTargetAddressSpace(A) == llvm::AMDGPUAS::FLAT_ADDRESS)) &&
131 toTargetAddressSpace(B) >= llvm::AMDGPUAS::FLAT_ADDRESS &&
132 toTargetAddressSpace(B) <= llvm::AMDGPUAS::PRIVATE_ADDRESS &&
133 toTargetAddressSpace(B) != llvm::AMDGPUAS::REGION_ADDRESS);
134 }
135
136 uint64_t getMaxPointerWidth() const override {
137 return getTriple().isAMDGCN() ? 64 : 32;
138 }
139
140 bool hasBFloat16Type() const override { return isAMDGCN(getTriple()); }
141
142 std::string_view getClobbers() const override { return ""; }
143
144 ArrayRef<const char *> getGCCRegNames() const override;
145
147 return {};
148 }
149
150 /// Accepted register names: (n, m is unsigned integer, n < m)
151 /// v
152 /// s
153 /// a
154 /// {vn}, {v[n]}
155 /// {sn}, {s[n]}
156 /// {an}, {a[n]}
157 /// {S} , where S is a special register name
158 ////{v[n:m]}
159 /// {s[n:m]}
160 /// {a[n:m]}
161 bool validateAsmConstraint(const char *&Name,
162 TargetInfo::ConstraintInfo &Info) const override {
163 static const ::llvm::StringSet<> SpecialRegs({
164 "exec", "vcc", "flat_scratch", "m0", "scc", "tba", "tma",
165 "flat_scratch_lo", "flat_scratch_hi", "vcc_lo", "vcc_hi", "exec_lo",
166 "exec_hi", "tma_lo", "tma_hi", "tba_lo", "tba_hi",
167 });
168
169 switch (*Name) {
170 case 'I':
171 Info.setRequiresImmediate(-16, 64);
172 return true;
173 case 'J':
174 Info.setRequiresImmediate(-32768, 32767);
175 return true;
176 case 'A':
177 case 'B':
178 case 'C':
180 return true;
181 default:
182 break;
183 }
184
185 StringRef S(Name);
186
187 if (S == "DA" || S == "DB") {
188 Name++;
190 return true;
191 }
192
193 bool HasLeftParen = S.consume_front("{");
194 if (S.empty())
195 return false;
196 if (S.front() != 'v' && S.front() != 's' && S.front() != 'a') {
197 if (!HasLeftParen)
198 return false;
199 auto E = S.find('}');
200 if (!SpecialRegs.count(S.substr(0, E)))
201 return false;
202 S = S.drop_front(E + 1);
203 if (!S.empty())
204 return false;
205 // Found {S} where S is a special register.
206 Info.setAllowsRegister();
207 Name = S.data() - 1;
208 return true;
209 }
210 S = S.drop_front();
211 if (!HasLeftParen) {
212 if (!S.empty())
213 return false;
214 // Found s, v or a.
215 Info.setAllowsRegister();
216 Name = S.data() - 1;
217 return true;
218 }
219 bool HasLeftBracket = S.consume_front("[");
220 unsigned long long N;
221 if (S.empty() || consumeUnsignedInteger(S, 10, N))
222 return false;
223 if (S.consume_front(":")) {
224 if (!HasLeftBracket)
225 return false;
226 unsigned long long M;
227 if (consumeUnsignedInteger(S, 10, M) || N >= M)
228 return false;
229 }
230 if (HasLeftBracket) {
231 if (!S.consume_front("]"))
232 return false;
233 }
234 if (!S.consume_front("}"))
235 return false;
236 if (!S.empty())
237 return false;
238 // Found {vn}, {sn}, {an}, {v[n]}, {s[n]}, {a[n]}, {v[n:m]}, {s[n:m]}
239 // or {a[n:m]}.
240 Info.setAllowsRegister();
241 Name = S.data() - 1;
242 return true;
243 }
244
245 // \p Constraint will be left pointing at the last character of
246 // the constraint. In practice, it won't be changed unless the
247 // constraint is longer than one character.
248 std::string convertConstraint(const char *&Constraint) const override {
249
250 StringRef S(Constraint);
251 if (S == "DA" || S == "DB") {
252 return std::string("^") + std::string(Constraint++, 2);
253 }
254
255 const char *Begin = Constraint;
256 TargetInfo::ConstraintInfo Info("", "");
257 if (validateAsmConstraint(Constraint, Info))
258 return std::string(Begin).substr(0, Constraint - Begin + 1);
259
260 Constraint = Begin;
261 return std::string(1, *Constraint);
262 }
263
264 bool
265 initFeatureMap(llvm::StringMap<bool> &Features, DiagnosticsEngine &Diags,
266 StringRef CPU,
267 const std::vector<std::string> &FeatureVec) const override;
268
269 llvm::SmallVector<Builtin::InfosShard> getTargetBuiltins() const override;
270
271 bool useFP16ConversionIntrinsics() const override { return false; }
272
273 void getTargetDefines(const LangOptions &Opts,
274 MacroBuilder &Builder) const override;
275
279
280 bool isValidCPUName(StringRef Name) const override {
281 if (getTriple().isAMDGCN())
282 return llvm::AMDGPU::parseArchAMDGCN(Name) != llvm::AMDGPU::GK_NONE;
283 return llvm::AMDGPU::parseArchR600(Name) != llvm::AMDGPU::GK_NONE;
284 }
285
286 void fillValidCPUList(SmallVectorImpl<StringRef> &Values) const override;
287
288 bool setCPU(const std::string &Name) override {
289 if (getTriple().isAMDGCN()) {
290 GPUKind = llvm::AMDGPU::parseArchAMDGCN(Name);
291 GPUFeatures = llvm::AMDGPU::getArchAttrAMDGCN(GPUKind);
292 } else {
293 GPUKind = llvm::AMDGPU::parseArchR600(Name);
294 GPUFeatures = llvm::AMDGPU::getArchAttrR600(GPUKind);
295 }
296
297 return GPUKind != llvm::AMDGPU::GK_NONE;
298 }
299
300 void setSupportedOpenCLOpts() override {
301 auto &Opts = getSupportedOpenCLOpts();
302 Opts["cl_clang_storage_class_specifiers"] = true;
303 Opts["__cl_clang_variadic_functions"] = true;
304 Opts["__cl_clang_function_pointers"] = true;
305 Opts["__cl_clang_function_scope_local_variables"] = true;
306 Opts["__cl_clang_non_portable_kernel_param_types"] = true;
307 Opts["__cl_clang_bitfields"] = true;
308
309 bool IsAMDGCN = isAMDGCN(getTriple());
310
311 Opts["cl_khr_fp64"] = hasFP64();
312 Opts["__opencl_c_fp64"] = hasFP64();
313
314 if (IsAMDGCN || GPUKind >= llvm::AMDGPU::GK_CEDAR) {
315 Opts["cl_khr_byte_addressable_store"] = true;
316 Opts["cl_khr_global_int32_base_atomics"] = true;
317 Opts["cl_khr_global_int32_extended_atomics"] = true;
318 Opts["cl_khr_local_int32_base_atomics"] = true;
319 Opts["cl_khr_local_int32_extended_atomics"] = true;
320 }
321
322 if (IsAMDGCN) {
323 Opts["cl_khr_fp16"] = true;
324 Opts["cl_khr_int64_base_atomics"] = true;
325 Opts["cl_khr_int64_extended_atomics"] = true;
326 Opts["cl_khr_mipmap_image"] = true;
327 Opts["cl_khr_mipmap_image_writes"] = true;
328 Opts["cl_khr_subgroups"] = true;
329 Opts["cl_amd_media_ops"] = true;
330 Opts["cl_amd_media_ops2"] = true;
331
332 // FIXME: Check subtarget for image support.
333 Opts["__opencl_c_images"] = true;
334 Opts["__opencl_c_3d_image_writes"] = true;
335 Opts["__opencl_c_read_write_images"] = true;
336 Opts["cl_khr_3d_image_writes"] = true;
337 Opts["__opencl_c_program_scope_global_variables"] = true;
338 Opts["__opencl_c_atomic_order_acq_rel"] = true;
339 Opts["__opencl_c_atomic_order_seq_cst"] = true;
340 Opts["__opencl_c_atomic_scope_device"] = true;
341 Opts["__opencl_c_atomic_scope_all_devices"] = true;
342 Opts["__opencl_c_work_group_collective_functions"] = true;
343
344 if (hasFlatSupport()) {
345 Opts["__opencl_c_generic_address_space"] = true;
346 Opts["__opencl_c_device_enqueue"] = true;
347 Opts["__opencl_c_pipes"] = true;
348 }
349
350 if (getTriple().getEnvironment() == llvm::Triple::LLVM) {
351 Opts["cl_khr_subgroup_extended_types"] = true;
352 }
353 }
354 }
355
357 switch (TK) {
358 case OCLTK_Image:
360
361 case OCLTK_ClkEvent:
362 case OCLTK_Queue:
363 case OCLTK_ReserveID:
365
366 default:
368 }
369 }
370
371 LangAS getOpenCLBuiltinAddressSpace(unsigned AS) const override {
372 switch (AS) {
373 case 0:
375 case 1:
377 case 3:
379 case 4:
381 case 5:
383 default:
384 return getLangASFromTargetAS(AS);
385 }
386 }
387
388 LangAS getCUDABuiltinAddressSpace(unsigned AS) const override {
389 switch (AS) {
390 case 0:
391 return LangAS::Default;
392 case 1:
393 return LangAS::cuda_device;
394 case 3:
395 return LangAS::cuda_shared;
396 case 4:
398 default:
399 return getLangASFromTargetAS(AS);
400 }
401 }
402
403 std::optional<LangAS> getConstantAddressSpace() const override {
404 return getLangASFromTargetAS(llvm::AMDGPUAS::CONSTANT_ADDRESS);
405 }
406
407 const llvm::omp::GV &getGridValue() const override {
408 switch (WavefrontSize) {
409 case 32:
410 return llvm::omp::getAMDGPUGridValues<32>();
411 case 64:
412 return llvm::omp::getAMDGPUGridValues<64>();
413 default:
414 llvm_unreachable("getGridValue not implemented for this wavesize");
415 }
416 }
417
418 /// \returns Target specific vtbl ptr address space.
419 unsigned getVtblPtrAddressSpace() const override {
420 return static_cast<unsigned>(llvm::AMDGPUAS::CONSTANT_ADDRESS);
421 }
422
423 /// \returns If a target requires an address within a target specific address
424 /// space \p AddressSpace to be converted in order to be used, then return the
425 /// corresponding target specific DWARF address space.
426 ///
427 /// \returns Otherwise return std::nullopt and no conversion will be emitted
428 /// in the DWARF.
429 std::optional<unsigned>
430 getDWARFAddressSpace(unsigned AddressSpace) const override {
431 int DWARFAS = llvm::AMDGPU::mapToDWARFAddrSpace(AddressSpace);
432 // If there is no corresponding address space identifier, or it would be
433 // the default, then don't emit the attribute.
434 if (DWARFAS == -1 || DWARFAS == llvm::AMDGPU::DWARFAS::DEFAULT)
435 return std::nullopt;
436 return DWARFAS;
437 }
438
440 switch (CC) {
441 default:
442 return CCCR_Warning;
443 case CC_C:
444 case CC_DeviceKernel:
445 return CCCR_OK;
446 }
447 }
448
449 // In amdgcn target the null pointer in global, constant, and generic
450 // address space has value 0 but in private and local address space has
451 // value ~0.
452 uint64_t getNullPointerValue(LangAS AS) const override {
453 // Check language-specific address spaces
454 if (AS == LangAS::opencl_local || AS == LangAS::opencl_private ||
456 return ~0;
457 if (isTargetAddressSpace(AS))
458 return llvm::AMDGPU::getNullPointerValue(toTargetAddressSpace(AS));
459 return 0;
460 }
461
462 void setAuxTarget(const TargetInfo *Aux) override;
463
464 bool hasBitIntType() const override { return true; }
465
466 // Record offload arch features since they are needed for defining the
467 // pre-defined macros.
468 bool handleTargetFeatures(std::vector<std::string> &Features,
469 DiagnosticsEngine &Diags) override {
470 HasFullBFloat16 = true;
471 auto TargetIDFeatures =
472 getAllPossibleTargetIDFeatures(getTriple(), getArchNameAMDGCN(GPUKind));
473 for (const auto &F : Features) {
474 assert(F.front() == '+' || F.front() == '-');
475 if (F == "+wavefrontsize64")
476 WavefrontSize = 64;
477 else if (F == "+cumode")
478 CUMode = true;
479 else if (F == "-cumode")
480 CUMode = false;
481 else if (F == "+image-insts")
482 HasImage = true;
483 bool IsOn = F.front() == '+';
484 StringRef Name = StringRef(F).drop_front();
485 if (!llvm::is_contained(TargetIDFeatures, Name))
486 continue;
487 assert(!OffloadArchFeatures.contains(Name));
488 OffloadArchFeatures[Name] = IsOn;
489 }
490 return true;
491 }
492
493 std::optional<std::string> getTargetID() const override {
494 if (!isAMDGCN(getTriple()))
495 return std::nullopt;
496 // When -target-cpu is not set, we assume generic code that it is valid
497 // for all GPU and use an empty string as target ID to represent that.
498 if (GPUKind == llvm::AMDGPU::GK_NONE)
499 return std::string("");
500 return getCanonicalTargetID(getArchNameAMDGCN(GPUKind),
501 OffloadArchFeatures);
502 }
503
504 bool hasHIPImageSupport() const override { return HasImage; }
505
506 std::pair<unsigned, unsigned> hardwareInterferenceSizes() const override {
507 // This is imprecise as the value can vary between 64, 128 (even 256!) bytes
508 // depending on the level of cache and the target architecture. We select
509 // the size that corresponds to the largest L1 cache line for all
510 // architectures.
511 return std::make_pair(128, 128);
512 }
513};
514
515} // namespace targets
516} // namespace clang
517
518#endif // LLVM_CLANG_LIB_BASIC_TARGETS_AMDGPU_H
static StringRef getTriple(const Command &Job)
Defines the clang::TargetOptions class.
Concrete class used by the front-end to report problems and issues.
Definition Diagnostic.h:232
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Exposes information about the current target.
Definition TargetInfo.h:227
TargetInfo(const llvm::Triple &T)
BuiltinVaListKind
The different kinds of __builtin_va_list types defined by the target implementation.
Definition TargetInfo.h:334
@ CharPtrBuiltinVaList
typedef char* __builtin_va_list;
Definition TargetInfo.h:336
virtual LangAS getOpenCLTypeAddrSpace(OpenCLTypeKind TK) const
Get address space for OpenCL type.
llvm::StringMap< bool > & getSupportedOpenCLOpts()
Get supported OpenCL extensions and optional core features.
unsigned getTargetAddressSpace(LangAS AS) const
Options for controlling the target.
const llvm::omp::GV & getGridValue() const override
Definition AMDGPU.h:407
std::string_view getClobbers() const override
Returns a string of target-specific clobbers, in LLVM format.
Definition AMDGPU.h:142
uint64_t getPointerAlignV(LangAS AddrSpace) const override
Definition AMDGPU.h:119
LangAS getOpenCLBuiltinAddressSpace(unsigned AS) const override
Map from the address space field in builtin description strings to the language address space.
Definition AMDGPU.h:371
AMDGPUTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
Definition AMDGPU.cpp:223
uint64_t getPointerWidthV(LangAS AS) const override
Definition AMDGPU.h:107
bool setCPU(const std::string &Name) override
Target the specified CPU.
Definition AMDGPU.h:288
ArrayRef< TargetInfo::GCCRegAlias > getGCCRegAliases() const override
Definition AMDGPU.h:146
bool hasBFloat16Type() const override
Determine whether the _BFloat16 type is supported on this target.
Definition AMDGPU.h:140
uint64_t getNullPointerValue(LangAS AS) const override
Get integer value for null pointer.
Definition AMDGPU.h:452
void adjust(DiagnosticsEngine &Diags, LangOptions &Opts, const TargetInfo *Aux) override
Set forced language options.
Definition AMDGPU.cpp:269
LangAS getCUDABuiltinAddressSpace(unsigned AS) const override
Map from the address space field in builtin description strings to the language address space.
Definition AMDGPU.h:388
virtual bool isAddressSpaceSupersetOf(LangAS A, LangAS B) const override
Returns true if an address space can be safely converted to another.
Definition AMDGPU.h:123
bool useFP16ConversionIntrinsics() const override
Check whether conversions to and from __fp16 should go through an integer bitcast with i16.
Definition AMDGPU.h:271
void setAddressSpaceMap(bool DefaultIsPrivate)
Definition AMDGPU.cpp:219
bool handleTargetFeatures(std::vector< std::string > &Features, DiagnosticsEngine &Diags) override
Perform initialization based on the user configured set of features (e.g., +sse4).
Definition AMDGPU.h:468
bool validateAsmConstraint(const char *&Name, TargetInfo::ConstraintInfo &Info) const override
Accepted register names: (n, m is unsigned integer, n < m) v s a {vn}, {v[n]} {sn}...
Definition AMDGPU.h:161
std::optional< std::string > getTargetID() const override
Returns the target ID if supported.
Definition AMDGPU.h:493
std::optional< unsigned > getDWARFAddressSpace(unsigned AddressSpace) const override
Definition AMDGPU.h:430
std::string convertConstraint(const char *&Constraint) const override
Definition AMDGPU.h:248
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...
Definition AMDGPU.h:506
unsigned getVtblPtrAddressSpace() const override
Definition AMDGPU.h:419
std::optional< LangAS > getConstantAddressSpace() const override
Return an AST address space which can be used opportunistically for constant global memory.
Definition AMDGPU.h:403
bool isValidCPUName(StringRef Name) const override
Determine whether this TargetInfo supports the given CPU name.
Definition AMDGPU.h:280
bool hasBitIntType() const override
Determine whether the _BitInt type is supported on this target.
Definition AMDGPU.h:464
bool hasHIPImageSupport() const override
Whether to support HIP image/texture API's.
Definition AMDGPU.h:504
uint64_t getMaxPointerWidth() const override
Return the maximum width of pointers on this target.
Definition AMDGPU.h:136
CallingConvCheckResult checkCallingConvention(CallingConv CC) const override
Determines whether a given calling convention is valid for the target.
Definition AMDGPU.h:439
LangAS getOpenCLTypeAddrSpace(OpenCLTypeKind TK) const override
Get address space for OpenCL type.
Definition AMDGPU.h:356
void setSupportedOpenCLOpts() override
Set supported OpenCL extensions and optional core features.
Definition AMDGPU.h:300
BuiltinVaListKind getBuiltinVaListKind() const override
Returns the kind of __builtin_va_list type that should be used with this target.
Definition AMDGPU.h:276
Defines the clang::TargetInfo interface.
The JSON file list parser is used to communicate input to InstallAPI.
bool isTargetAddressSpace(LangAS AS)
OpenCLTypeKind
OpenCL type kinds.
Definition TargetInfo.h:213
@ OCLTK_ReserveID
Definition TargetInfo.h:220
@ OCLTK_Image
Definition TargetInfo.h:217
@ OCLTK_ClkEvent
Definition TargetInfo.h:215
@ OCLTK_Queue
Definition TargetInfo.h:219
unsigned toTargetAddressSpace(LangAS AS)
llvm::SmallVector< llvm::StringRef, 4 > getAllPossibleTargetIDFeatures(const llvm::Triple &T, llvm::StringRef Processor)
Get all feature strings that can be used in target ID for Processor.
Definition TargetID.cpp:41
LangAS
Defines the address space values used by the address space qualifier of QualType.
std::string getCanonicalTargetID(llvm::StringRef Processor, const llvm::StringMap< bool > &Features)
Returns canonical target ID, assuming Processor is canonical and all entries in Features are valid.
Definition TargetID.cpp:130
CallingConv
CallingConv - Specifies the calling convention that a function uses.
Definition Specifiers.h:278
@ CC_DeviceKernel
Definition Specifiers.h:292
LangAS getLangASFromTargetAS(unsigned TargetAS)
unsigned[(unsigned) LangAS::FirstTargetAddressSpace] LangASMap
The type of a lookup table which maps from language-specific address spaces to target-specific ones.
void setRequiresImmediate(int Min, int Max)