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
134 // clang-format on
135};
136
137const GPUInfo *getArchEntry(AMDGPU::GPUKind AK, ArrayRef<GPUInfo> Table) {
138 GPUInfo Search = { {""}, {""}, AK, AMDGPU::FEATURE_NONE };
139
140 auto I =
141 llvm::lower_bound(Table, Search, [](const GPUInfo &A, const GPUInfo &B) {
142 return A.Kind < B.Kind;
143 });
144
145 if (I == Table.end() || I->Kind != Search.Kind)
146 return nullptr;
147 return I;
148}
149
150} // namespace
151
153 switch (AK) {
155 return "gfx9";
158 return "gfx10";
160 return "gfx11";
161 default: {
162 StringRef ArchName = getArchNameAMDGCN(AK);
163 return ArchName.empty() ? "" : ArchName.drop_back(2);
164 }
165 }
166}
167
169 if (const auto *Entry = getArchEntry(AK, AMDGCNGPUs))
170 return Entry->CanonicalName;
171 return "";
172}
173
175 if (const auto *Entry = getArchEntry(AK, R600GPUs))
176 return Entry->CanonicalName;
177 return "";
178}
179
181 for (const auto &C : AMDGCNGPUs) {
182 if (CPU == C.Name)
183 return C.Kind;
184 }
185
186 return AMDGPU::GPUKind::GK_NONE;
187}
188
190 for (const auto &C : R600GPUs) {
191 if (CPU == C.Name)
192 return C.Kind;
193 }
194
195 return AMDGPU::GPUKind::GK_NONE;
196}
197
199 if (const auto *Entry = getArchEntry(AK, AMDGCNGPUs))
200 return Entry->Features;
201 return FEATURE_NONE;
202}
203
205 if (const auto *Entry = getArchEntry(AK, R600GPUs))
206 return Entry->Features;
207 return FEATURE_NONE;
208}
209
211 // XXX: Should this only report unique canonical names?
212 for (const auto &C : AMDGCNGPUs)
213 Values.push_back(C.Name);
214}
215
217 for (const auto &C : R600GPUs)
218 Values.push_back(C.Name);
219}
220
223 if (AK == AMDGPU::GPUKind::GK_NONE) {
224 if (GPU == "generic-hsa")
225 return {7, 0, 0};
226 if (GPU == "generic")
227 return {6, 0, 0};
228 return {0, 0, 0};
229 }
230
231 // clang-format off
232 switch (AK) {
233 case GK_GFX600: return {6, 0, 0};
234 case GK_GFX601: return {6, 0, 1};
235 case GK_GFX602: return {6, 0, 2};
236 case GK_GFX700: return {7, 0, 0};
237 case GK_GFX701: return {7, 0, 1};
238 case GK_GFX702: return {7, 0, 2};
239 case GK_GFX703: return {7, 0, 3};
240 case GK_GFX704: return {7, 0, 4};
241 case GK_GFX705: return {7, 0, 5};
242 case GK_GFX801: return {8, 0, 1};
243 case GK_GFX802: return {8, 0, 2};
244 case GK_GFX803: return {8, 0, 3};
245 case GK_GFX805: return {8, 0, 5};
246 case GK_GFX810: return {8, 1, 0};
247 case GK_GFX900: return {9, 0, 0};
248 case GK_GFX902: return {9, 0, 2};
249 case GK_GFX904: return {9, 0, 4};
250 case GK_GFX906: return {9, 0, 6};
251 case GK_GFX908: return {9, 0, 8};
252 case GK_GFX909: return {9, 0, 9};
253 case GK_GFX90A: return {9, 0, 10};
254 case GK_GFX90C: return {9, 0, 12};
255 case GK_GFX940: return {9, 4, 0};
256 case GK_GFX941: return {9, 4, 1};
257 case GK_GFX942: return {9, 4, 2};
258 case GK_GFX1010: return {10, 1, 0};
259 case GK_GFX1011: return {10, 1, 1};
260 case GK_GFX1012: return {10, 1, 2};
261 case GK_GFX1013: return {10, 1, 3};
262 case GK_GFX1030: return {10, 3, 0};
263 case GK_GFX1031: return {10, 3, 1};
264 case GK_GFX1032: return {10, 3, 2};
265 case GK_GFX1033: return {10, 3, 3};
266 case GK_GFX1034: return {10, 3, 4};
267 case GK_GFX1035: return {10, 3, 5};
268 case GK_GFX1036: return {10, 3, 6};
269 case GK_GFX1100: return {11, 0, 0};
270 case GK_GFX1101: return {11, 0, 1};
271 case GK_GFX1102: return {11, 0, 2};
272 case GK_GFX1103: return {11, 0, 3};
273 case GK_GFX1150: return {11, 5, 0};
274 case GK_GFX1151: return {11, 5, 1};
275 case GK_GFX1200: return {12, 0, 0};
276 case GK_GFX1201: return {12, 0, 1};
277
278 // Generic targets return the lowest common denominator
279 // within their family. That is, the ISA that is the most
280 // restricted in terms of features.
281 //
282 // gfx9-generic is tricky because there is no lowest
283 // common denominator, so we return gfx900 which has mad-mix
284 // but this family doesn't have it.
285 //
286 // This API should never be used to check for a particular
287 // feature anyway.
288 //
289 // TODO: Split up this API depending on its caller so
290 // generic target handling is more obvious and less risky.
291 case GK_GFX9_GENERIC: return {9, 0, 0};
292 case GK_GFX10_1_GENERIC: return {10, 1, 0};
293 case GK_GFX10_3_GENERIC: return {10, 3, 0};
294 case GK_GFX11_GENERIC: return {11, 0, 3};
295 default: return {0, 0, 0};
296 }
297 // clang-format on
298}
299
301 assert(T.isAMDGPU());
302 auto ProcKind = T.isAMDGCN() ? parseArchAMDGCN(Arch) : parseArchR600(Arch);
303 if (ProcKind == GK_NONE)
304 return StringRef();
305
306 return T.isAMDGCN() ? getArchNameAMDGCN(ProcKind) : getArchNameR600(ProcKind);
307}
308
310 StringMap<bool> &Features) {
311 // XXX - What does the member GPU mean if device name string passed here?
312 if (T.isAMDGCN()) {
313 switch (parseArchAMDGCN(GPU)) {
314 case GK_GFX1201:
315 case GK_GFX1200:
316 Features["ci-insts"] = true;
317 Features["dot7-insts"] = true;
318 Features["dot8-insts"] = true;
319 Features["dot9-insts"] = true;
320 Features["dot10-insts"] = true;
321 Features["dot11-insts"] = true;
322 Features["dl-insts"] = true;
323 Features["atomic-ds-pk-add-16-insts"] = true;
324 Features["atomic-flat-pk-add-16-insts"] = true;
325 Features["atomic-buffer-global-pk-add-f16-insts"] = true;
326 Features["atomic-global-pk-add-bf16-inst"] = true;
327 Features["16-bit-insts"] = true;
328 Features["dpp"] = true;
329 Features["gfx8-insts"] = true;
330 Features["gfx9-insts"] = true;
331 Features["gfx10-insts"] = true;
332 Features["gfx10-3-insts"] = true;
333 Features["gfx11-insts"] = true;
334 Features["gfx12-insts"] = true;
335 Features["atomic-fadd-rtn-insts"] = true;
336 Features["image-insts"] = true;
337 Features["fp8-conversion-insts"] = true;
338 break;
339 case GK_GFX1151:
340 case GK_GFX1150:
341 case GK_GFX1103:
342 case GK_GFX1102:
343 case GK_GFX1101:
344 case GK_GFX1100:
345 case GK_GFX11_GENERIC:
346 Features["ci-insts"] = true;
347 Features["dot5-insts"] = true;
348 Features["dot7-insts"] = true;
349 Features["dot8-insts"] = true;
350 Features["dot9-insts"] = true;
351 Features["dot10-insts"] = true;
352 Features["dl-insts"] = true;
353 Features["16-bit-insts"] = true;
354 Features["dpp"] = true;
355 Features["gfx8-insts"] = true;
356 Features["gfx9-insts"] = true;
357 Features["gfx10-insts"] = true;
358 Features["gfx10-3-insts"] = true;
359 Features["gfx11-insts"] = true;
360 Features["atomic-fadd-rtn-insts"] = true;
361 Features["image-insts"] = true;
362 Features["gws"] = true;
363 break;
364 case GK_GFX1036:
365 case GK_GFX1035:
366 case GK_GFX1034:
367 case GK_GFX1033:
368 case GK_GFX1032:
369 case GK_GFX1031:
370 case GK_GFX1030:
372 Features["ci-insts"] = true;
373 Features["dot1-insts"] = true;
374 Features["dot2-insts"] = true;
375 Features["dot5-insts"] = true;
376 Features["dot6-insts"] = true;
377 Features["dot7-insts"] = true;
378 Features["dot10-insts"] = true;
379 Features["dl-insts"] = true;
380 Features["16-bit-insts"] = true;
381 Features["dpp"] = true;
382 Features["gfx8-insts"] = true;
383 Features["gfx9-insts"] = true;
384 Features["gfx10-insts"] = true;
385 Features["gfx10-3-insts"] = true;
386 Features["image-insts"] = true;
387 Features["s-memrealtime"] = true;
388 Features["s-memtime-inst"] = true;
389 Features["gws"] = true;
390 break;
391 case GK_GFX1012:
392 case GK_GFX1011:
393 Features["dot1-insts"] = true;
394 Features["dot2-insts"] = true;
395 Features["dot5-insts"] = true;
396 Features["dot6-insts"] = true;
397 Features["dot7-insts"] = true;
398 Features["dot10-insts"] = true;
399 [[fallthrough]];
400 case GK_GFX1013:
401 case GK_GFX1010:
403 Features["dl-insts"] = true;
404 Features["ci-insts"] = true;
405 Features["16-bit-insts"] = true;
406 Features["dpp"] = true;
407 Features["gfx8-insts"] = true;
408 Features["gfx9-insts"] = true;
409 Features["gfx10-insts"] = true;
410 Features["image-insts"] = true;
411 Features["s-memrealtime"] = true;
412 Features["s-memtime-inst"] = true;
413 Features["gws"] = true;
414 break;
415 case GK_GFX942:
416 case GK_GFX941:
417 case GK_GFX940:
418 Features["gfx940-insts"] = true;
419 Features["fp8-insts"] = true;
420 Features["fp8-conversion-insts"] = true;
421 Features["atomic-ds-pk-add-16-insts"] = true;
422 Features["atomic-flat-pk-add-16-insts"] = true;
423 Features["atomic-global-pk-add-bf16-inst"] = true;
424 Features["gfx90a-insts"] = true;
425 Features["atomic-buffer-global-pk-add-f16-insts"] = true;
426 Features["atomic-fadd-rtn-insts"] = true;
427 Features["dot3-insts"] = true;
428 Features["dot4-insts"] = true;
429 Features["dot5-insts"] = true;
430 Features["dot6-insts"] = true;
431 Features["mai-insts"] = true;
432 Features["dl-insts"] = true;
433 Features["dot1-insts"] = true;
434 Features["dot2-insts"] = true;
435 Features["dot7-insts"] = true;
436 Features["dot10-insts"] = true;
437 Features["gfx9-insts"] = true;
438 Features["gfx8-insts"] = true;
439 Features["16-bit-insts"] = true;
440 Features["dpp"] = true;
441 Features["s-memrealtime"] = true;
442 Features["ci-insts"] = true;
443 Features["s-memtime-inst"] = true;
444 Features["gws"] = true;
445 break;
446 case GK_GFX90A:
447 Features["gfx90a-insts"] = true;
448 Features["atomic-buffer-global-pk-add-f16-insts"] = true;
449 Features["atomic-fadd-rtn-insts"] = true;
450 [[fallthrough]];
451 case GK_GFX908:
452 Features["dot3-insts"] = true;
453 Features["dot4-insts"] = true;
454 Features["dot5-insts"] = true;
455 Features["dot6-insts"] = true;
456 Features["mai-insts"] = true;
457 [[fallthrough]];
458 case GK_GFX906:
459 Features["dl-insts"] = true;
460 Features["dot1-insts"] = true;
461 Features["dot2-insts"] = true;
462 Features["dot7-insts"] = true;
463 Features["dot10-insts"] = true;
464 [[fallthrough]];
465 case GK_GFX90C:
466 case GK_GFX909:
467 case GK_GFX904:
468 case GK_GFX902:
469 case GK_GFX900:
470 case GK_GFX9_GENERIC:
471 Features["gfx9-insts"] = true;
472 [[fallthrough]];
473 case GK_GFX810:
474 case GK_GFX805:
475 case GK_GFX803:
476 case GK_GFX802:
477 case GK_GFX801:
478 Features["gfx8-insts"] = true;
479 Features["16-bit-insts"] = true;
480 Features["dpp"] = true;
481 Features["s-memrealtime"] = true;
482 [[fallthrough]];
483 case GK_GFX705:
484 case GK_GFX704:
485 case GK_GFX703:
486 case GK_GFX702:
487 case GK_GFX701:
488 case GK_GFX700:
489 Features["ci-insts"] = true;
490 [[fallthrough]];
491 case GK_GFX602:
492 case GK_GFX601:
493 case GK_GFX600:
494 Features["image-insts"] = true;
495 Features["s-memtime-inst"] = true;
496 Features["gws"] = true;
497 break;
498 case GK_NONE:
499 break;
500 default:
501 llvm_unreachable("Unhandled GPU!");
502 }
503 } else {
504 if (GPU.empty())
505 GPU = "r600";
506
507 switch (llvm::AMDGPU::parseArchR600(GPU)) {
508 case GK_CAYMAN:
509 case GK_CYPRESS:
510 case GK_RV770:
511 case GK_RV670:
512 // TODO: Add fp64 when implemented.
513 break;
514 case GK_TURKS:
515 case GK_CAICOS:
516 case GK_BARTS:
517 case GK_SUMO:
518 case GK_REDWOOD:
519 case GK_JUNIPER:
520 case GK_CEDAR:
521 case GK_RV730:
522 case GK_RV710:
523 case GK_RS880:
524 case GK_R630:
525 case GK_R600:
526 break;
527 default:
528 llvm_unreachable("Unhandled GPU!");
529 }
530 }
531}
532
533static bool isWave32Capable(StringRef GPU, const Triple &T) {
534 bool IsWave32Capable = false;
535 // XXX - What does the member GPU mean if device name string passed here?
536 if (T.isAMDGCN()) {
537 switch (parseArchAMDGCN(GPU)) {
538 case GK_GFX1201:
539 case GK_GFX1200:
540 case GK_GFX1151:
541 case GK_GFX1150:
542 case GK_GFX1103:
543 case GK_GFX1102:
544 case GK_GFX1101:
545 case GK_GFX1100:
546 case GK_GFX1036:
547 case GK_GFX1035:
548 case GK_GFX1034:
549 case GK_GFX1033:
550 case GK_GFX1032:
551 case GK_GFX1031:
552 case GK_GFX1030:
553 case GK_GFX1012:
554 case GK_GFX1011:
555 case GK_GFX1013:
556 case GK_GFX1010:
557 case GK_GFX11_GENERIC:
560 IsWave32Capable = true;
561 break;
562 default:
563 break;
564 }
565 }
566 return IsWave32Capable;
567}
568
570 StringMap<bool> &Features,
571 std::string &ErrorMsg) {
572 bool IsWave32Capable = isWave32Capable(GPU, T);
573 const bool IsNullGPU = GPU.empty();
574 // FIXME: Not diagnosing wavefrontsize32 on wave64 only targets.
575 const bool HaveWave32 =
576 (IsWave32Capable || IsNullGPU) && Features.count("wavefrontsize32");
577 const bool HaveWave64 = Features.count("wavefrontsize64");
578 if (HaveWave32 && HaveWave64) {
579 ErrorMsg = "'wavefrontsize32' and 'wavefrontsize64' are mutually exclusive";
580 return false;
581 }
582 // Don't assume any wavesize with an unknown subtarget.
583 if (!IsNullGPU) {
584 // Default to wave32 if available, or wave64 if not
585 if (!HaveWave32 && !HaveWave64) {
586 StringRef DefaultWaveSizeFeature =
587 IsWave32Capable ? "wavefrontsize32" : "wavefrontsize64";
588 Features.insert(std::make_pair(DefaultWaveSizeFeature, true));
589 }
590 }
591 return true;
592}
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:849
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
Definition: StringMap.h:127
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:306
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:612
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:143
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:125