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