LLVM  14.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"
16 #include "llvm/ADT/SmallString.h"
17 #include "llvm/ADT/StringSwitch.h"
18 #include "llvm/ADT/Twine.h"
20 
21 using namespace llvm;
22 using namespace AMDGPU;
23 
24 namespace {
25 
26 struct GPUInfo {
28  StringLiteral CanonicalName;
30  unsigned Features;
31 };
32 
33 constexpr GPUInfo R600GPUs[] = {
34  // Name Canonical Kind Features
35  // Name
36  {{"r600"}, {"r600"}, GK_R600, FEATURE_NONE },
37  {{"rv630"}, {"r600"}, GK_R600, FEATURE_NONE },
38  {{"rv635"}, {"r600"}, GK_R600, FEATURE_NONE },
39  {{"r630"}, {"r630"}, GK_R630, FEATURE_NONE },
40  {{"rs780"}, {"rs880"}, GK_RS880, FEATURE_NONE },
41  {{"rs880"}, {"rs880"}, GK_RS880, FEATURE_NONE },
42  {{"rv610"}, {"rs880"}, GK_RS880, FEATURE_NONE },
43  {{"rv620"}, {"rs880"}, GK_RS880, FEATURE_NONE },
44  {{"rv670"}, {"rv670"}, GK_RV670, FEATURE_NONE },
45  {{"rv710"}, {"rv710"}, GK_RV710, FEATURE_NONE },
46  {{"rv730"}, {"rv730"}, GK_RV730, FEATURE_NONE },
47  {{"rv740"}, {"rv770"}, GK_RV770, FEATURE_NONE },
48  {{"rv770"}, {"rv770"}, GK_RV770, FEATURE_NONE },
49  {{"cedar"}, {"cedar"}, GK_CEDAR, FEATURE_NONE },
50  {{"palm"}, {"cedar"}, GK_CEDAR, FEATURE_NONE },
51  {{"cypress"}, {"cypress"}, GK_CYPRESS, FEATURE_FMA },
52  {{"hemlock"}, {"cypress"}, GK_CYPRESS, FEATURE_FMA },
53  {{"juniper"}, {"juniper"}, GK_JUNIPER, FEATURE_NONE },
54  {{"redwood"}, {"redwood"}, GK_REDWOOD, FEATURE_NONE },
55  {{"sumo"}, {"sumo"}, GK_SUMO, FEATURE_NONE },
56  {{"sumo2"}, {"sumo"}, GK_SUMO, FEATURE_NONE },
57  {{"barts"}, {"barts"}, GK_BARTS, FEATURE_NONE },
58  {{"caicos"}, {"caicos"}, GK_CAICOS, FEATURE_NONE },
59  {{"aruba"}, {"cayman"}, GK_CAYMAN, FEATURE_FMA },
60  {{"cayman"}, {"cayman"}, GK_CAYMAN, FEATURE_FMA },
61  {{"turks"}, {"turks"}, GK_TURKS, FEATURE_NONE }
62 };
63 
64 // This table should be sorted by the value of GPUKind
65 // Don't bother listing the implicitly true features
66 constexpr GPUInfo AMDGCNGPUs[] = {
67  // Name Canonical Kind Features
68  // Name
69  {{"gfx600"}, {"gfx600"}, GK_GFX600, FEATURE_FAST_FMA_F32},
70  {{"tahiti"}, {"gfx600"}, GK_GFX600, FEATURE_FAST_FMA_F32},
71  {{"gfx601"}, {"gfx601"}, GK_GFX601, FEATURE_NONE},
72  {{"pitcairn"}, {"gfx601"}, GK_GFX601, FEATURE_NONE},
73  {{"verde"}, {"gfx601"}, GK_GFX601, FEATURE_NONE},
74  {{"gfx602"}, {"gfx602"}, GK_GFX602, FEATURE_NONE},
75  {{"hainan"}, {"gfx602"}, GK_GFX602, FEATURE_NONE},
76  {{"oland"}, {"gfx602"}, GK_GFX602, FEATURE_NONE},
77  {{"gfx700"}, {"gfx700"}, GK_GFX700, FEATURE_NONE},
78  {{"kaveri"}, {"gfx700"}, GK_GFX700, FEATURE_NONE},
79  {{"gfx701"}, {"gfx701"}, GK_GFX701, FEATURE_FAST_FMA_F32},
80  {{"hawaii"}, {"gfx701"}, GK_GFX701, FEATURE_FAST_FMA_F32},
81  {{"gfx702"}, {"gfx702"}, GK_GFX702, FEATURE_FAST_FMA_F32},
82  {{"gfx703"}, {"gfx703"}, GK_GFX703, FEATURE_NONE},
83  {{"kabini"}, {"gfx703"}, GK_GFX703, FEATURE_NONE},
84  {{"mullins"}, {"gfx703"}, GK_GFX703, FEATURE_NONE},
85  {{"gfx704"}, {"gfx704"}, GK_GFX704, FEATURE_NONE},
86  {{"bonaire"}, {"gfx704"}, GK_GFX704, FEATURE_NONE},
87  {{"gfx705"}, {"gfx705"}, GK_GFX705, FEATURE_NONE},
90  {{"gfx802"}, {"gfx802"}, GK_GFX802, FEATURE_FAST_DENORMAL_F32},
91  {{"iceland"}, {"gfx802"}, GK_GFX802, FEATURE_FAST_DENORMAL_F32},
92  {{"tonga"}, {"gfx802"}, GK_GFX802, FEATURE_FAST_DENORMAL_F32},
93  {{"gfx803"}, {"gfx803"}, GK_GFX803, FEATURE_FAST_DENORMAL_F32},
94  {{"fiji"}, {"gfx803"}, GK_GFX803, FEATURE_FAST_DENORMAL_F32},
95  {{"polaris10"}, {"gfx803"}, GK_GFX803, FEATURE_FAST_DENORMAL_F32},
96  {{"polaris11"}, {"gfx803"}, GK_GFX803, FEATURE_FAST_DENORMAL_F32},
97  {{"gfx805"}, {"gfx805"}, GK_GFX805, FEATURE_FAST_DENORMAL_F32},
98  {{"tongapro"}, {"gfx805"}, GK_GFX805, FEATURE_FAST_DENORMAL_F32},
99  {{"gfx810"}, {"gfx810"}, GK_GFX810, FEATURE_FAST_DENORMAL_F32|FEATURE_XNACK},
100  {{"stoney"}, {"gfx810"}, GK_GFX810, FEATURE_FAST_DENORMAL_F32|FEATURE_XNACK},
119 };
120 
121 const GPUInfo *getArchEntry(AMDGPU::GPUKind AK, ArrayRef<GPUInfo> Table) {
122  GPUInfo Search = { {""}, {""}, AK, AMDGPU::FEATURE_NONE };
123 
124  auto I =
125  llvm::lower_bound(Table, Search, [](const GPUInfo &A, const GPUInfo &B) {
126  return A.Kind < B.Kind;
127  });
128 
129  if (I == Table.end())
130  return nullptr;
131  return I;
132 }
133 
134 } // namespace
135 
137  if (const auto *Entry = getArchEntry(AK, AMDGCNGPUs))
138  return Entry->CanonicalName;
139  return "";
140 }
141 
143  if (const auto *Entry = getArchEntry(AK, R600GPUs))
144  return Entry->CanonicalName;
145  return "";
146 }
147 
149  for (const auto &C : AMDGCNGPUs) {
150  if (CPU == C.Name)
151  return C.Kind;
152  }
153 
155 }
156 
158  for (const auto &C : R600GPUs) {
159  if (CPU == C.Name)
160  return C.Kind;
161  }
162 
164 }
165 
167  if (const auto *Entry = getArchEntry(AK, AMDGCNGPUs))
168  return Entry->Features;
169  return FEATURE_NONE;
170 }
171 
173  if (const auto *Entry = getArchEntry(AK, R600GPUs))
174  return Entry->Features;
175  return FEATURE_NONE;
176 }
177 
179  // XXX: Should this only report unique canonical names?
180  for (const auto &C : AMDGCNGPUs)
181  Values.push_back(C.Name);
182 }
183 
185  for (const auto &C : R600GPUs)
186  Values.push_back(C.Name);
187 }
188 
191  if (AK == AMDGPU::GPUKind::GK_NONE) {
192  if (GPU == "generic-hsa")
193  return {7, 0, 0};
194  if (GPU == "generic")
195  return {6, 0, 0};
196  return {0, 0, 0};
197  }
198 
199  switch (AK) {
200  case GK_GFX600: return {6, 0, 0};
201  case GK_GFX601: return {6, 0, 1};
202  case GK_GFX602: return {6, 0, 2};
203  case GK_GFX700: return {7, 0, 0};
204  case GK_GFX701: return {7, 0, 1};
205  case GK_GFX702: return {7, 0, 2};
206  case GK_GFX703: return {7, 0, 3};
207  case GK_GFX704: return {7, 0, 4};
208  case GK_GFX705: return {7, 0, 5};
209  case GK_GFX801: return {8, 0, 1};
210  case GK_GFX802: return {8, 0, 2};
211  case GK_GFX803: return {8, 0, 3};
212  case GK_GFX805: return {8, 0, 5};
213  case GK_GFX810: return {8, 1, 0};
214  case GK_GFX900: return {9, 0, 0};
215  case GK_GFX902: return {9, 0, 2};
216  case GK_GFX904: return {9, 0, 4};
217  case GK_GFX906: return {9, 0, 6};
218  case GK_GFX908: return {9, 0, 8};
219  case GK_GFX909: return {9, 0, 9};
220  case GK_GFX90A: return {9, 0, 10};
221  case GK_GFX90C: return {9, 0, 12};
222  case GK_GFX1010: return {10, 1, 0};
223  case GK_GFX1011: return {10, 1, 1};
224  case GK_GFX1012: return {10, 1, 2};
225  case GK_GFX1013: return {10, 1, 3};
226  case GK_GFX1030: return {10, 3, 0};
227  case GK_GFX1031: return {10, 3, 1};
228  case GK_GFX1032: return {10, 3, 2};
229  case GK_GFX1033: return {10, 3, 3};
230  case GK_GFX1034: return {10, 3, 4};
231  case GK_GFX1035: return {10, 3, 5};
232  default: return {0, 0, 0};
233  }
234 }
235 
237  assert(T.isAMDGPU());
238  auto ProcKind = T.isAMDGCN() ? parseArchAMDGCN(Arch) : parseArchR600(Arch);
239  if (ProcKind == GK_NONE)
240  return StringRef();
241 
242  return T.isAMDGCN() ? getArchNameAMDGCN(ProcKind) : getArchNameR600(ProcKind);
243 }
244 
245 namespace llvm {
246 namespace RISCV {
247 
248 struct CPUInfo {
251  unsigned Features;
253  bool is64Bit() const { return (Features & FK_64BIT); }
254 };
255 
256 constexpr CPUInfo RISCVCPUInfo[] = {
257 #define PROC(ENUM, NAME, FEATURES, DEFAULT_MARCH) \
258  {NAME, CK_##ENUM, FEATURES, DEFAULT_MARCH},
259 #include "llvm/Support/RISCVTargetParser.def"
260 };
261 
262 bool checkCPUKind(CPUKind Kind, bool IsRV64) {
263  if (Kind == CK_INVALID)
264  return false;
265  return RISCVCPUInfo[static_cast<unsigned>(Kind)].is64Bit() == IsRV64;
266 }
267 
268 bool checkTuneCPUKind(CPUKind Kind, bool IsRV64) {
269  if (Kind == CK_INVALID)
270  return false;
271  return RISCVCPUInfo[static_cast<unsigned>(Kind)].is64Bit() == IsRV64;
272 }
273 
275  return llvm::StringSwitch<CPUKind>(CPU)
276 #define PROC(ENUM, NAME, FEATURES, DEFAULT_MARCH) .Case(NAME, CK_##ENUM)
277 #include "llvm/Support/RISCVTargetParser.def"
278  .Default(CK_INVALID);
279 }
280 
281 StringRef resolveTuneCPUAlias(StringRef TuneCPU, bool IsRV64) {
282  return llvm::StringSwitch<StringRef>(TuneCPU)
283 #define PROC_ALIAS(NAME, RV32, RV64) .Case(NAME, IsRV64 ? StringRef(RV64) : StringRef(RV32))
284 #include "llvm/Support/RISCVTargetParser.def"
285  .Default(TuneCPU);
286 }
287 
288 CPUKind parseTuneCPUKind(StringRef TuneCPU, bool IsRV64) {
289  TuneCPU = resolveTuneCPUAlias(TuneCPU, IsRV64);
290 
291  return llvm::StringSwitch<CPUKind>(TuneCPU)
292 #define PROC(ENUM, NAME, FEATURES, DEFAULT_MARCH) .Case(NAME, CK_##ENUM)
293 #include "llvm/Support/RISCVTargetParser.def"
294  .Default(CK_INVALID);
295 }
296 
298  CPUKind Kind = parseCPUKind(CPU);
299  return RISCVCPUInfo[static_cast<unsigned>(Kind)].DefaultMarch;
300 }
301 
303  for (const auto &C : RISCVCPUInfo) {
304  if (C.Kind != CK_INVALID && IsRV64 == C.is64Bit())
305  Values.emplace_back(C.Name);
306  }
307 }
308 
310  for (const auto &C : RISCVCPUInfo) {
311  if (C.Kind != CK_INVALID && IsRV64 == C.is64Bit())
312  Values.emplace_back(C.Name);
313  }
314 #define PROC_ALIAS(NAME, RV32, RV64) Values.emplace_back(StringRef(NAME));
315 #include "llvm/Support/RISCVTargetParser.def"
316 }
317 
318 // Get all features except standard extension feature
320  std::vector<StringRef> &Features) {
321  unsigned CPUFeatures = RISCVCPUInfo[static_cast<unsigned>(Kind)].Features;
322 
323  if (CPUFeatures == FK_INVALID)
324  return false;
325 
326  if (CPUFeatures & FK_64BIT)
327  Features.push_back("+64bit");
328  else
329  Features.push_back("-64bit");
330 
331  return true;
332 }
333 
334 } // namespace RISCV
335 } // namespace llvm
llvm::AMDGPU::GK_GFX802
@ GK_GFX802
Definition: TargetParser.h:75
llvm::AMDGPU::GK_GFX703
@ GK_GFX703
Definition: TargetParser.h:70
llvm::AMDGPU::GK_GFX1034
@ GK_GFX1034
Definition: TargetParser.h:97
llvm
---------------------— PointerInfo ------------------------------------—
Definition: AllocatorList.h:23
llvm::AMDGPU::GK_GFX801
@ GK_GFX801
Definition: TargetParser.h:74
llvm::AMDGPU::GPUKind
GPUKind
GPU kinds supported by the AMDGPU target.
Definition: TargetParser.h:37
llvm::AMDGPU::GK_CAYMAN
@ GK_CAYMAN
Definition: TargetParser.h:56
llvm::AMDGPU::GK_RV670
@ GK_RV670
Definition: TargetParser.h:45
llvm::AMDGPU::GK_RV730
@ GK_RV730
Definition: TargetParser.h:47
llvm::AMDGPU::getArchAttrR600
unsigned getArchAttrR600(GPUKind AK)
Definition: TargetParser.cpp:172
llvm::AMDGPU::getIsaVersion
IsaVersion getIsaVersion(StringRef GPU)
Definition: TargetParser.cpp:189
llvm::AMDGPU::GK_GFX900
@ GK_GFX900
Definition: TargetParser.h:80
llvm::RISCV::CPUKind
CPUKind
Definition: TargetParser.h:152
T
llvm::lower_bound
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:1661
llvm::StringSwitch::Default
LLVM_NODISCARD R Default(T Value)
Definition: StringSwitch.h:181
is64Bit
static bool is64Bit(const char *name)
Definition: X86Disassembler.cpp:1023
llvm::AMDGPU::GK_R600
@ GK_R600
Definition: TargetParser.h:42
llvm::AMDGPU::parseArchR600
GPUKind parseArchR600(StringRef CPU)
Definition: TargetParser.cpp:157
llvm::AMDGPU::GK_GFX1013
@ GK_GFX1013
Definition: TargetParser.h:92
llvm::AMDGPU::GK_GFX810
@ GK_GFX810
Definition: TargetParser.h:78
llvm::Triple
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:45
llvm::AMDGPU::GK_GFX700
@ GK_GFX700
Definition: TargetParser.h:67
llvm::AMDGPU::GK_GFX803
@ GK_GFX803
Definition: TargetParser.h:76
llvm::RISCV::resolveTuneCPUAlias
StringRef resolveTuneCPUAlias(StringRef TuneCPU, bool IsRV64)
Definition: TargetParser.cpp:281
llvm::AMDGPU::GK_CEDAR
@ GK_CEDAR
Definition: TargetParser.h:49
llvm::AMDGPU::GK_GFX90C
@ GK_GFX90C
Definition: TargetParser.h:87
llvm::AMDGPU::GK_GFX602
@ GK_GFX602
Definition: TargetParser.h:65
TargetParser.h
llvm::AMDGPU::GK_CAICOS
@ GK_CAICOS
Definition: TargetParser.h:55
llvm::AMDGPU::GK_RV770
@ GK_RV770
Definition: TargetParser.h:48
llvm::AMDGPU::GK_RS880
@ GK_RS880
Definition: TargetParser.h:44
llvm::AMDGPU::GK_GFX702
@ GK_GFX702
Definition: TargetParser.h:69
llvm::AMDGPU::IsaVersion
Instruction set architecture version.
Definition: TargetParser.h:105
llvm::AMDGPU::getCanonicalArchName
StringRef getCanonicalArchName(const Triple &T, StringRef Arch)
Definition: TargetParser.cpp:236
llvm::RISCV::checkTuneCPUKind
bool checkTuneCPUKind(CPUKind Kind, bool IsRV64)
Definition: TargetParser.cpp:268
llvm::StringLiteral
A wrapper around a string literal that serves as a proxy for constructing global tables of StringRefs...
Definition: StringRef.h:891
SmallString.h
llvm::AMDGPU::GK_CYPRESS
@ GK_CYPRESS
Definition: TargetParser.h:50
C
(vector float) vec_cmpeq(*A, *B) C
Definition: README_ALTIVEC.txt:86
llvm::AMDGPU::GK_GFX1012
@ GK_GFX1012
Definition: TargetParser.h:91
llvm::ARM_PROC::A
@ A
Definition: ARMBaseInfo.h:34
Twine.h
llvm::AMDGPU::GK_GFX1032
@ GK_GFX1032
Definition: TargetParser.h:95
llvm::RISCV::getMArchFromMcpu
StringRef getMArchFromMcpu(StringRef CPU)
Definition: TargetParser.cpp:297
B
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
llvm::AMDGPU::FEATURE_XNACK
@ FEATURE_XNACK
Definition: TargetParser.h:129
llvm::AMDGPU::GK_GFX909
@ GK_GFX909
Definition: TargetParser.h:85
llvm::AMDGPU::GK_GFX805
@ GK_GFX805
Definition: TargetParser.h:77
llvm::AMDGPU::GK_GFX906
@ GK_GFX906
Definition: TargetParser.h:83
llvm::lltok::Kind
Kind
Definition: LLToken.h:18
llvm::AMDGPU::GK_BARTS
@ GK_BARTS
Definition: TargetParser.h:54
llvm::RISCV::CPUInfo::DefaultMarch
StringLiteral DefaultMarch
Definition: TargetParser.cpp:252
llvm::AMDGPU::FEATURE_FMA
@ FEATURE_FMA
Definition: TargetParser.h:117
llvm::RISCV::parseCPUKind
CPUKind parseCPUKind(StringRef CPU)
Definition: TargetParser.cpp:274
llvm::AMDGPU::FEATURE_WAVE32
@ FEATURE_WAVE32
Definition: TargetParser.h:126
llvm::AMDGPU::GK_GFX1035
@ GK_GFX1035
Definition: TargetParser.h:98
llvm::AMDGPU::GK_GFX904
@ GK_GFX904
Definition: TargetParser.h:82
llvm::AMDGPU::GK_GFX704
@ GK_GFX704
Definition: TargetParser.h:71
llvm::RISCV::CPUInfo::Name
StringLiteral Name
Definition: TargetParser.cpp:249
I
#define I(x, y, z)
Definition: MD5.cpp:59
llvm::RISCV::RISCVCPUInfo
constexpr CPUInfo RISCVCPUInfo[]
Definition: TargetParser.cpp:256
llvm::AMDGPU::GK_GFX701
@ GK_GFX701
Definition: TargetParser.h:68
ArrayRef.h
llvm::AMDGPU::GK_TURKS
@ GK_TURKS
Definition: TargetParser.h:57
llvm::AMDGPU::getArchNameAMDGCN
StringRef getArchNameAMDGCN(GPUKind AK)
Definition: TargetParser.cpp:136
assert
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
llvm::AMDGPU::GK_GFX705
@ GK_GFX705
Definition: TargetParser.h:72
llvm::AArch64::fillValidCPUArchList
void fillValidCPUArchList(SmallVectorImpl< StringRef > &Values)
Definition: AArch64TargetParser.cpp:193
llvm::AMDGPU::FEATURE_SRAMECC
@ FEATURE_SRAMECC
Definition: TargetParser.h:132
llvm::AMDGPU::GK_GFX1030
@ GK_GFX1030
Definition: TargetParser.h:93
llvm::RISCV::CPUInfo
Definition: TargetParser.cpp:248
llvm::ArrayRef
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: APInt.h:32
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:58
llvm::AMDGPU::GK_GFX908
@ GK_GFX908
Definition: TargetParser.h:84
llvm::AMDGPU::FEATURE_FAST_FMA_F32
@ FEATURE_FAST_FMA_F32
Definition: TargetParser.h:122
llvm::RISCV::CPUInfo::is64Bit
bool is64Bit() const
Definition: TargetParser.cpp:253
llvm::AMDGPU::getArchNameR600
StringRef getArchNameR600(GPUKind AK)
Definition: TargetParser.cpp:142
llvm::AMDGPU::fillValidArchListR600
void fillValidArchListR600(SmallVectorImpl< StringRef > &Values)
Definition: TargetParser.cpp:184
llvm::AMDGPU::GK_R630
@ GK_R630
Definition: TargetParser.h:43
llvm::RISCV::fillValidTuneCPUArchList
void fillValidTuneCPUArchList(SmallVectorImpl< StringRef > &Values, bool IsRV64)
Definition: TargetParser.cpp:309
llvm::AMDGPU::GK_GFX1031
@ GK_GFX1031
Definition: TargetParser.h:94
llvm::GraphProgram::Name
Name
Definition: GraphWriter.h:52
llvm::AMDGPU::FEATURE_NONE
@ FEATURE_NONE
Definition: TargetParser.h:114
llvm::RISCV::FK_64BIT
@ FK_64BIT
Definition: TargetParser.h:165
llvm::AMDGPU::GK_GFX1010
@ GK_GFX1010
Definition: TargetParser.h:89
llvm::RISCV::FK_INVALID
@ FK_INVALID
Definition: TargetParser.h:158
llvm::RISCV::CPUInfo::Features
unsigned Features
Definition: TargetParser.cpp:251
llvm::AMDGPU::GK_JUNIPER
@ GK_JUNIPER
Definition: TargetParser.h:51
StringSwitch.h
llvm::AMDGPU::GK_GFX1011
@ GK_GFX1011
Definition: TargetParser.h:90
llvm::AMDGPU::GK_RV710
@ GK_RV710
Definition: TargetParser.h:46
llvm::AMDGPU::GK_GFX600
@ GK_GFX600
Definition: TargetParser.h:63
llvm::AMDGPU::parseArchAMDGCN
GPUKind parseArchAMDGCN(StringRef CPU)
Definition: TargetParser.cpp:148
ARMBuildAttributes.h
llvm::AMDGPU::getArchAttrAMDGCN
unsigned getArchAttrAMDGCN(GPUKind AK)
Definition: TargetParser.cpp:166
llvm::RISCV::checkCPUKind
bool checkCPUKind(CPUKind Kind, bool IsRV64)
Definition: TargetParser.cpp:262
llvm::AMDGPU::GK_REDWOOD
@ GK_REDWOOD
Definition: TargetParser.h:52
llvm::AMDGPU::GK_NONE
@ GK_NONE
Definition: TargetParser.h:39
llvm::AMDGPU::GK_GFX902
@ GK_GFX902
Definition: TargetParser.h:81
llvm::RISCV::CPUInfo::Kind
CPUKind Kind
Definition: TargetParser.cpp:250
llvm::AMDGPU::GK_SUMO
@ GK_SUMO
Definition: TargetParser.h:53
llvm::SmallVectorImpl< StringRef >
llvm::StringSwitch
A switch()-like statement whose cases are string literals.
Definition: StringSwitch.h:42
llvm::AMDGPU::GK_GFX601
@ GK_GFX601
Definition: TargetParser.h:64
llvm::AMDGPU::FEATURE_FAST_DENORMAL_F32
@ FEATURE_FAST_DENORMAL_F32
Definition: TargetParser.h:123
llvm::AMDGPU::GK_GFX1033
@ GK_GFX1033
Definition: TargetParser.h:96
llvm::RISCV::getCPUFeaturesExceptStdExt
bool getCPUFeaturesExceptStdExt(CPUKind Kind, std::vector< StringRef > &Features)
Definition: TargetParser.cpp:319
llvm::AMDGPU::GK_GFX90A
@ GK_GFX90A
Definition: TargetParser.h:86
llvm::ArrayRef::end
iterator end() const
Definition: ArrayRef.h:154
llvm::AMDGPU::fillValidArchListAMDGCN
void fillValidArchListAMDGCN(SmallVectorImpl< StringRef > &Values)
Definition: TargetParser.cpp:178
llvm::RISCV::parseTuneCPUKind
CPUKind parseTuneCPUKind(StringRef CPU, bool IsRV64)
Definition: TargetParser.cpp:288
llvm::SmallVectorImpl::emplace_back
reference emplace_back(ArgTypes &&... Args)
Definition: SmallVector.h:908