LLVM 19.0.0git
TargetParser.cpp
Go to the documentation of this file.
1//===-- TargetParser - Parser for target features ---------------*- 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 implements a target parser to recognise hardware features such as
10// FPU/CPU/ARCH names as well as specific support such as HDIV, etc.
11//
12//===----------------------------------------------------------------------===//
13
15#include "llvm/ADT/ArrayRef.h"
17
18using namespace llvm;
19using namespace AMDGPU;
20
21namespace {
22
23struct GPUInfo {
25 StringLiteral CanonicalName;
27 unsigned Features;
28};
29
30constexpr GPUInfo R600GPUs[] = {
31 // Name Canonical Kind Features
32 // Name
33 {{"r600"}, {"r600"}, GK_R600, FEATURE_NONE },
34 {{"rv630"}, {"r600"}, GK_R600, FEATURE_NONE },
35 {{"rv635"}, {"r600"}, GK_R600, FEATURE_NONE },
36 {{"r630"}, {"r630"}, GK_R630, FEATURE_NONE },
37 {{"rs780"}, {"rs880"}, GK_RS880, FEATURE_NONE },
38 {{"rs880"}, {"rs880"}, GK_RS880, FEATURE_NONE },
39 {{"rv610"}, {"rs880"}, GK_RS880, FEATURE_NONE },
40 {{"rv620"}, {"rs880"}, GK_RS880, FEATURE_NONE },
41 {{"rv670"}, {"rv670"}, GK_RV670, FEATURE_NONE },
42 {{"rv710"}, {"rv710"}, GK_RV710, FEATURE_NONE },
43 {{"rv730"}, {"rv730"}, GK_RV730, FEATURE_NONE },
44 {{"rv740"}, {"rv770"}, GK_RV770, FEATURE_NONE },
45 {{"rv770"}, {"rv770"}, GK_RV770, FEATURE_NONE },
46 {{"cedar"}, {"cedar"}, GK_CEDAR, FEATURE_NONE },
47 {{"palm"}, {"cedar"}, GK_CEDAR, FEATURE_NONE },
48 {{"cypress"}, {"cypress"}, GK_CYPRESS, FEATURE_FMA },
49 {{"hemlock"}, {"cypress"}, GK_CYPRESS, FEATURE_FMA },
50 {{"juniper"}, {"juniper"}, GK_JUNIPER, FEATURE_NONE },
51 {{"redwood"}, {"redwood"}, GK_REDWOOD, FEATURE_NONE },
52 {{"sumo"}, {"sumo"}, GK_SUMO, FEATURE_NONE },
53 {{"sumo2"}, {"sumo"}, GK_SUMO, FEATURE_NONE },
54 {{"barts"}, {"barts"}, GK_BARTS, FEATURE_NONE },
55 {{"caicos"}, {"caicos"}, GK_CAICOS, FEATURE_NONE },
56 {{"aruba"}, {"cayman"}, GK_CAYMAN, FEATURE_FMA },
57 {{"cayman"}, {"cayman"}, GK_CAYMAN, FEATURE_FMA },
58 {{"turks"}, {"turks"}, GK_TURKS, FEATURE_NONE }
59};
60
61// This table should be sorted by the value of GPUKind
62// Don't bother listing the implicitly true features
63constexpr GPUInfo AMDGCNGPUs[] = {
64 // clang-format off
65 // Name Canonical Kind Features
66 // Name
67 {{"gfx600"}, {"gfx600"}, GK_GFX600, FEATURE_FAST_FMA_F32},
68 {{"tahiti"}, {"gfx600"}, GK_GFX600, FEATURE_FAST_FMA_F32},
69 {{"gfx601"}, {"gfx601"}, GK_GFX601, FEATURE_NONE},
70 {{"pitcairn"}, {"gfx601"}, GK_GFX601, FEATURE_NONE},
71 {{"verde"}, {"gfx601"}, GK_GFX601, FEATURE_NONE},
72 {{"gfx602"}, {"gfx602"}, GK_GFX602, FEATURE_NONE},
73 {{"hainan"}, {"gfx602"}, GK_GFX602, FEATURE_NONE},
74 {{"oland"}, {"gfx602"}, GK_GFX602, FEATURE_NONE},
75 {{"gfx700"}, {"gfx700"}, GK_GFX700, FEATURE_NONE},
76 {{"kaveri"}, {"gfx700"}, GK_GFX700, FEATURE_NONE},
77 {{"gfx701"}, {"gfx701"}, GK_GFX701, FEATURE_FAST_FMA_F32},
78 {{"hawaii"}, {"gfx701"}, GK_GFX701, FEATURE_FAST_FMA_F32},
79 {{"gfx702"}, {"gfx702"}, GK_GFX702, FEATURE_FAST_FMA_F32},
80 {{"gfx703"}, {"gfx703"}, GK_GFX703, FEATURE_NONE},
81 {{"kabini"}, {"gfx703"}, GK_GFX703, FEATURE_NONE},
82 {{"mullins"}, {"gfx703"}, GK_GFX703, FEATURE_NONE},
83 {{"gfx704"}, {"gfx704"}, GK_GFX704, FEATURE_NONE},
84 {{"bonaire"}, {"gfx704"}, GK_GFX704, FEATURE_NONE},
85 {{"gfx705"}, {"gfx705"}, GK_GFX705, FEATURE_NONE},
88 {{"gfx802"}, {"gfx802"}, GK_GFX802, FEATURE_FAST_DENORMAL_F32},
89 {{"iceland"}, {"gfx802"}, GK_GFX802, FEATURE_FAST_DENORMAL_F32},
90 {{"tonga"}, {"gfx802"}, GK_GFX802, FEATURE_FAST_DENORMAL_F32},
91 {{"gfx803"}, {"gfx803"}, GK_GFX803, FEATURE_FAST_DENORMAL_F32},
92 {{"fiji"}, {"gfx803"}, GK_GFX803, FEATURE_FAST_DENORMAL_F32},
93 {{"polaris10"}, {"gfx803"}, GK_GFX803, FEATURE_FAST_DENORMAL_F32},
94 {{"polaris11"}, {"gfx803"}, GK_GFX803, FEATURE_FAST_DENORMAL_F32},
95 {{"gfx805"}, {"gfx805"}, GK_GFX805, FEATURE_FAST_DENORMAL_F32},
96 {{"tongapro"}, {"gfx805"}, GK_GFX805, FEATURE_FAST_DENORMAL_F32},
97 {{"gfx810"}, {"gfx810"}, GK_GFX810, FEATURE_FAST_DENORMAL_F32|FEATURE_XNACK},
98 {{"stoney"}, {"gfx810"}, GK_GFX810, FEATURE_FAST_DENORMAL_F32|FEATURE_XNACK},
129
135 // clang-format on
136};
137
138const GPUInfo *getArchEntry(AMDGPU::GPUKind AK, ArrayRef<GPUInfo> Table) {
139 GPUInfo Search = { {""}, {""}, AK, AMDGPU::FEATURE_NONE };
140
141 auto I =
142 llvm::lower_bound(Table, Search, [](const GPUInfo &A, const GPUInfo &B) {
143 return A.Kind < B.Kind;
144 });
145
146 if (I == Table.end() || I->Kind != Search.Kind)
147 return nullptr;
148 return I;
149}
150
151} // namespace
152
154 switch (AK) {
156 return "gfx9";
159 return "gfx10";
161 return "gfx11";
163 return "gfx12";
164 default: {
165 StringRef ArchName = getArchNameAMDGCN(AK);
166 return ArchName.empty() ? "" : ArchName.drop_back(2);
167 }
168 }
169}
170
172 if (const auto *Entry = getArchEntry(AK, AMDGCNGPUs))
173 return Entry->CanonicalName;
174 return "";
175}
176
178 if (const auto *Entry = getArchEntry(AK, R600GPUs))
179 return Entry->CanonicalName;
180 return "";
181}
182
184 for (const auto &C : AMDGCNGPUs) {
185 if (CPU == C.Name)
186 return C.Kind;
187 }
188
189 return AMDGPU::GPUKind::GK_NONE;
190}
191
193 for (const auto &C : R600GPUs) {
194 if (CPU == C.Name)
195 return C.Kind;
196 }
197
198 return AMDGPU::GPUKind::GK_NONE;
199}
200
202 if (const auto *Entry = getArchEntry(AK, AMDGCNGPUs))
203 return Entry->Features;
204 return FEATURE_NONE;
205}
206
208 if (const auto *Entry = getArchEntry(AK, R600GPUs))
209 return Entry->Features;
210 return FEATURE_NONE;
211}
212
214 // XXX: Should this only report unique canonical names?
215 for (const auto &C : AMDGCNGPUs)
216 Values.push_back(C.Name);
217}
218
220 for (const auto &C : R600GPUs)
221 Values.push_back(C.Name);
222}
223
226 if (AK == AMDGPU::GPUKind::GK_NONE) {
227 if (GPU == "generic-hsa")
228 return {7, 0, 0};
229 if (GPU == "generic")
230 return {6, 0, 0};
231 return {0, 0, 0};
232 }
233
234 // clang-format off
235 switch (AK) {
236 case GK_GFX600: return {6, 0, 0};
237 case GK_GFX601: return {6, 0, 1};
238 case GK_GFX602: return {6, 0, 2};
239 case GK_GFX700: return {7, 0, 0};
240 case GK_GFX701: return {7, 0, 1};
241 case GK_GFX702: return {7, 0, 2};
242 case GK_GFX703: return {7, 0, 3};
243 case GK_GFX704: return {7, 0, 4};
244 case GK_GFX705: return {7, 0, 5};
245 case GK_GFX801: return {8, 0, 1};
246 case GK_GFX802: return {8, 0, 2};
247 case GK_GFX803: return {8, 0, 3};
248 case GK_GFX805: return {8, 0, 5};
249 case GK_GFX810: return {8, 1, 0};
250 case GK_GFX900: return {9, 0, 0};
251 case GK_GFX902: return {9, 0, 2};
252 case GK_GFX904: return {9, 0, 4};
253 case GK_GFX906: return {9, 0, 6};
254 case GK_GFX908: return {9, 0, 8};
255 case GK_GFX909: return {9, 0, 9};
256 case GK_GFX90A: return {9, 0, 10};
257 case GK_GFX90C: return {9, 0, 12};
258 case GK_GFX940: return {9, 4, 0};
259 case GK_GFX941: return {9, 4, 1};
260 case GK_GFX942: return {9, 4, 2};
261 case GK_GFX1010: return {10, 1, 0};
262 case GK_GFX1011: return {10, 1, 1};
263 case GK_GFX1012: return {10, 1, 2};
264 case GK_GFX1013: return {10, 1, 3};
265 case GK_GFX1030: return {10, 3, 0};
266 case GK_GFX1031: return {10, 3, 1};
267 case GK_GFX1032: return {10, 3, 2};
268 case GK_GFX1033: return {10, 3, 3};
269 case GK_GFX1034: return {10, 3, 4};
270 case GK_GFX1035: return {10, 3, 5};
271 case GK_GFX1036: return {10, 3, 6};
272 case GK_GFX1100: return {11, 0, 0};
273 case GK_GFX1101: return {11, 0, 1};
274 case GK_GFX1102: return {11, 0, 2};
275 case GK_GFX1103: return {11, 0, 3};
276 case GK_GFX1150: return {11, 5, 0};
277 case GK_GFX1151: return {11, 5, 1};
278 case GK_GFX1200: return {12, 0, 0};
279 case GK_GFX1201: return {12, 0, 1};
280
281 // Generic targets return the lowest common denominator
282 // within their family. That is, the ISA that is the most
283 // restricted in terms of features.
284 //
285 // gfx9-generic is tricky because there is no lowest
286 // common denominator, so we return gfx900 which has mad-mix
287 // but this family doesn't have it.
288 //
289 // This API should never be used to check for a particular
290 // feature anyway.
291 //
292 // TODO: Split up this API depending on its caller so
293 // generic target handling is more obvious and less risky.
294 case GK_GFX9_GENERIC: return {9, 0, 0};
295 case GK_GFX10_1_GENERIC: return {10, 1, 0};
296 case GK_GFX10_3_GENERIC: return {10, 3, 0};
297 case GK_GFX11_GENERIC: return {11, 0, 3};
298 case GK_GFX12_GENERIC: return {12, 0, 0};
299 default: return {0, 0, 0};
300 }
301 // clang-format on
302}
303
305 assert(T.isAMDGPU());
306 auto ProcKind = T.isAMDGCN() ? parseArchAMDGCN(Arch) : parseArchR600(Arch);
307 if (ProcKind == GK_NONE)
308 return StringRef();
309
310 return T.isAMDGCN() ? getArchNameAMDGCN(ProcKind) : getArchNameR600(ProcKind);
311}
312
314 StringMap<bool> &Features) {
315 // XXX - What does the member GPU mean if device name string passed here?
316 if (T.isAMDGCN()) {
317 switch (parseArchAMDGCN(GPU)) {
318 case GK_GFX1201:
319 case GK_GFX1200:
320 case GK_GFX12_GENERIC:
321 Features["ci-insts"] = true;
322 Features["dot7-insts"] = true;
323 Features["dot8-insts"] = true;
324 Features["dot9-insts"] = true;
325 Features["dot10-insts"] = true;
326 Features["dot11-insts"] = true;
327 Features["dl-insts"] = true;
328 Features["atomic-ds-pk-add-16-insts"] = true;
329 Features["atomic-flat-pk-add-16-insts"] = true;
330 Features["atomic-buffer-global-pk-add-f16-insts"] = true;
331 Features["atomic-global-pk-add-bf16-inst"] = true;
332 Features["16-bit-insts"] = true;
333 Features["dpp"] = true;
334 Features["gfx8-insts"] = true;
335 Features["gfx9-insts"] = true;
336 Features["gfx10-insts"] = true;
337 Features["gfx10-3-insts"] = true;
338 Features["gfx11-insts"] = true;
339 Features["gfx12-insts"] = true;
340 Features["atomic-fadd-rtn-insts"] = true;
341 Features["image-insts"] = true;
342 Features["fp8-conversion-insts"] = true;
343 break;
344 case GK_GFX1151:
345 case GK_GFX1150:
346 case GK_GFX1103:
347 case GK_GFX1102:
348 case GK_GFX1101:
349 case GK_GFX1100:
350 case GK_GFX11_GENERIC:
351 Features["ci-insts"] = true;
352 Features["dot5-insts"] = true;
353 Features["dot7-insts"] = true;
354 Features["dot8-insts"] = true;
355 Features["dot9-insts"] = true;
356 Features["dot10-insts"] = true;
357 Features["dl-insts"] = true;
358 Features["16-bit-insts"] = true;
359 Features["dpp"] = true;
360 Features["gfx8-insts"] = true;
361 Features["gfx9-insts"] = true;
362 Features["gfx10-insts"] = true;
363 Features["gfx10-3-insts"] = true;
364 Features["gfx11-insts"] = true;
365 Features["atomic-fadd-rtn-insts"] = true;
366 Features["image-insts"] = true;
367 Features["gws"] = true;
368 break;
369 case GK_GFX1036:
370 case GK_GFX1035:
371 case GK_GFX1034:
372 case GK_GFX1033:
373 case GK_GFX1032:
374 case GK_GFX1031:
375 case GK_GFX1030:
377 Features["ci-insts"] = true;
378 Features["dot1-insts"] = true;
379 Features["dot2-insts"] = true;
380 Features["dot5-insts"] = true;
381 Features["dot6-insts"] = true;
382 Features["dot7-insts"] = true;
383 Features["dot10-insts"] = true;
384 Features["dl-insts"] = true;
385 Features["16-bit-insts"] = true;
386 Features["dpp"] = true;
387 Features["gfx8-insts"] = true;
388 Features["gfx9-insts"] = true;
389 Features["gfx10-insts"] = true;
390 Features["gfx10-3-insts"] = true;
391 Features["image-insts"] = true;
392 Features["s-memrealtime"] = true;
393 Features["s-memtime-inst"] = true;
394 Features["gws"] = true;
395 break;
396 case GK_GFX1012:
397 case GK_GFX1011:
398 Features["dot1-insts"] = true;
399 Features["dot2-insts"] = true;
400 Features["dot5-insts"] = true;
401 Features["dot6-insts"] = true;
402 Features["dot7-insts"] = true;
403 Features["dot10-insts"] = true;
404 [[fallthrough]];
405 case GK_GFX1013:
406 case GK_GFX1010:
408 Features["dl-insts"] = true;
409 Features["ci-insts"] = true;
410 Features["16-bit-insts"] = true;
411 Features["dpp"] = true;
412 Features["gfx8-insts"] = true;
413 Features["gfx9-insts"] = true;
414 Features["gfx10-insts"] = true;
415 Features["image-insts"] = true;
416 Features["s-memrealtime"] = true;
417 Features["s-memtime-inst"] = true;
418 Features["gws"] = true;
419 break;
420 case GK_GFX942:
421 case GK_GFX941:
422 case GK_GFX940:
423 Features["gfx940-insts"] = true;
424 Features["fp8-insts"] = true;
425 Features["fp8-conversion-insts"] = true;
426 Features["atomic-ds-pk-add-16-insts"] = true;
427 Features["atomic-flat-pk-add-16-insts"] = true;
428 Features["atomic-global-pk-add-bf16-inst"] = true;
429 Features["gfx90a-insts"] = true;
430 Features["atomic-buffer-global-pk-add-f16-insts"] = true;
431 Features["atomic-fadd-rtn-insts"] = true;
432 Features["dot3-insts"] = true;
433 Features["dot4-insts"] = true;
434 Features["dot5-insts"] = true;
435 Features["dot6-insts"] = true;
436 Features["mai-insts"] = true;
437 Features["dl-insts"] = true;
438 Features["dot1-insts"] = true;
439 Features["dot2-insts"] = true;
440 Features["dot7-insts"] = true;
441 Features["dot10-insts"] = true;
442 Features["gfx9-insts"] = true;
443 Features["gfx8-insts"] = true;
444 Features["16-bit-insts"] = true;
445 Features["dpp"] = true;
446 Features["s-memrealtime"] = true;
447 Features["ci-insts"] = true;
448 Features["s-memtime-inst"] = true;
449 Features["gws"] = true;
450 break;
451 case GK_GFX90A:
452 Features["gfx90a-insts"] = true;
453 Features["atomic-buffer-global-pk-add-f16-insts"] = true;
454 Features["atomic-fadd-rtn-insts"] = true;
455 [[fallthrough]];
456 case GK_GFX908:
457 Features["dot3-insts"] = true;
458 Features["dot4-insts"] = true;
459 Features["dot5-insts"] = true;
460 Features["dot6-insts"] = true;
461 Features["mai-insts"] = true;
462 [[fallthrough]];
463 case GK_GFX906:
464 Features["dl-insts"] = true;
465 Features["dot1-insts"] = true;
466 Features["dot2-insts"] = true;
467 Features["dot7-insts"] = true;
468 Features["dot10-insts"] = true;
469 [[fallthrough]];
470 case GK_GFX90C:
471 case GK_GFX909:
472 case GK_GFX904:
473 case GK_GFX902:
474 case GK_GFX900:
475 case GK_GFX9_GENERIC:
476 Features["gfx9-insts"] = true;
477 [[fallthrough]];
478 case GK_GFX810:
479 case GK_GFX805:
480 case GK_GFX803:
481 case GK_GFX802:
482 case GK_GFX801:
483 Features["gfx8-insts"] = true;
484 Features["16-bit-insts"] = true;
485 Features["dpp"] = true;
486 Features["s-memrealtime"] = true;
487 [[fallthrough]];
488 case GK_GFX705:
489 case GK_GFX704:
490 case GK_GFX703:
491 case GK_GFX702:
492 case GK_GFX701:
493 case GK_GFX700:
494 Features["ci-insts"] = true;
495 [[fallthrough]];
496 case GK_GFX602:
497 case GK_GFX601:
498 case GK_GFX600:
499 Features["image-insts"] = true;
500 Features["s-memtime-inst"] = true;
501 Features["gws"] = true;
502 break;
503 case GK_NONE:
504 break;
505 default:
506 llvm_unreachable("Unhandled GPU!");
507 }
508 } else {
509 if (GPU.empty())
510 GPU = "r600";
511
512 switch (llvm::AMDGPU::parseArchR600(GPU)) {
513 case GK_CAYMAN:
514 case GK_CYPRESS:
515 case GK_RV770:
516 case GK_RV670:
517 // TODO: Add fp64 when implemented.
518 break;
519 case GK_TURKS:
520 case GK_CAICOS:
521 case GK_BARTS:
522 case GK_SUMO:
523 case GK_REDWOOD:
524 case GK_JUNIPER:
525 case GK_CEDAR:
526 case GK_RV730:
527 case GK_RV710:
528 case GK_RS880:
529 case GK_R630:
530 case GK_R600:
531 break;
532 default:
533 llvm_unreachable("Unhandled GPU!");
534 }
535 }
536}
537
538static bool isWave32Capable(StringRef GPU, const Triple &T) {
539 bool IsWave32Capable = false;
540 // XXX - What does the member GPU mean if device name string passed here?
541 if (T.isAMDGCN()) {
542 switch (parseArchAMDGCN(GPU)) {
543 case GK_GFX1201:
544 case GK_GFX1200:
545 case GK_GFX1151:
546 case GK_GFX1150:
547 case GK_GFX1103:
548 case GK_GFX1102:
549 case GK_GFX1101:
550 case GK_GFX1100:
551 case GK_GFX1036:
552 case GK_GFX1035:
553 case GK_GFX1034:
554 case GK_GFX1033:
555 case GK_GFX1032:
556 case GK_GFX1031:
557 case GK_GFX1030:
558 case GK_GFX1012:
559 case GK_GFX1011:
560 case GK_GFX1013:
561 case GK_GFX1010:
562 case GK_GFX12_GENERIC:
563 case GK_GFX11_GENERIC:
566 IsWave32Capable = true;
567 break;
568 default:
569 break;
570 }
571 }
572 return IsWave32Capable;
573}
574
576 StringMap<bool> &Features,
577 std::string &ErrorMsg) {
578 bool IsWave32Capable = isWave32Capable(GPU, T);
579 const bool IsNullGPU = GPU.empty();
580 // FIXME: Not diagnosing wavefrontsize32 on wave64 only targets.
581 const bool HaveWave32 =
582 (IsWave32Capable || IsNullGPU) && Features.count("wavefrontsize32");
583 const bool HaveWave64 = Features.count("wavefrontsize64");
584 if (HaveWave32 && HaveWave64) {
585 ErrorMsg = "'wavefrontsize32' and 'wavefrontsize64' are mutually exclusive";
586 return false;
587 }
588 // Don't assume any wavesize with an unknown subtarget.
589 if (!IsNullGPU) {
590 // Default to wave32 if available, or wave64 if not
591 if (!HaveWave32 && !HaveWave64) {
592 StringRef DefaultWaveSizeFeature =
593 IsWave32Capable ? "wavefrontsize32" : "wavefrontsize64";
594 Features.insert(std::make_pair(DefaultWaveSizeFeature, true));
595 }
596 }
597 return true;
598}
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
#define I(x, y, z)
Definition: MD5.cpp:58
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static bool isWave32Capable(StringRef GPU, const Triple &T)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: ArrayRef.h:41
iterator end() const
Definition: ArrayRef.h:154
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Definition: SmallVector.h:586
void push_back(const T &Elt)
Definition: SmallVector.h:426
A wrapper around a string literal that serves as a proxy for constructing global tables of StringRefs...
Definition: StringRef.h:846
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
Definition: StringMap.h:128
size_type count(StringRef Key) const
count - Return 1 if the element is in the map, 0 otherwise.
Definition: StringMap.h:276
bool insert(MapEntryTy *KeyValue)
insert - Insert the specified key/value pair into the map.
Definition: StringMap.h:308
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
constexpr bool empty() const
empty - Check if the string is empty.
Definition: StringRef.h:134
StringRef drop_back(size_t N=1) const
Return a StringRef equal to 'this' but with the last N elements dropped.
Definition: StringRef.h:609
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
StringRef getArchNameR600(GPUKind AK)
GPUKind
GPU kinds supported by the AMDGPU target.
Definition: TargetParser.h:35
StringRef getCanonicalArchName(const Triple &T, StringRef Arch)
void fillValidArchListR600(SmallVectorImpl< StringRef > &Values)
StringRef getArchFamilyNameAMDGCN(GPUKind AK)
IsaVersion getIsaVersion(StringRef GPU)
void fillAMDGPUFeatureMap(StringRef GPU, const Triple &T, StringMap< bool > &Features)
Fills Features map with default values for given target GPU.
void fillValidArchListAMDGCN(SmallVectorImpl< StringRef > &Values)
GPUKind parseArchAMDGCN(StringRef CPU)
bool insertWaveSizeFeature(StringRef GPU, const Triple &T, StringMap< bool > &Features, std::string &ErrorMsg)
Inserts wave size feature for given GPU into features map.
@ FEATURE_FAST_DENORMAL_F32
Definition: TargetParser.h:144
StringRef getArchNameAMDGCN(GPUKind AK)
unsigned getArchAttrAMDGCN(GPUKind AK)
unsigned getArchAttrR600(GPUKind AK)
GPUKind parseArchR600(StringRef CPU)
@ C
The default llvm calling convention, compatible with C.
Definition: CallingConv.h:34
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
auto lower_bound(R &&Range, T &&Value)
Provide wrappers to std::lower_bound which take ranges instead of having to pass begin/end explicitly...
Definition: STLExtras.h:1954
Instruction set architecture version.
Definition: TargetParser.h:126