Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
14 | pmbaty | 1 | #ifdef GEN_FLANG_DIRECTIVE_CLAUSE_SETS |
2 | #undef GEN_FLANG_DIRECTIVE_CLAUSE_SETS |
||
3 | |||
4 | namespace llvm { |
||
5 | namespace acc { |
||
6 | |||
7 | // Sets for atomic |
||
8 | |||
9 | static AccClauseSet allowedClauses_ACCD_atomic { |
||
10 | }; |
||
11 | |||
12 | static AccClauseSet allowedOnceClauses_ACCD_atomic { |
||
13 | }; |
||
14 | |||
15 | static AccClauseSet allowedExclusiveClauses_ACCD_atomic { |
||
16 | }; |
||
17 | |||
18 | static AccClauseSet requiredClauses_ACCD_atomic { |
||
19 | }; |
||
20 | |||
21 | // Sets for cache |
||
22 | |||
23 | static AccClauseSet allowedClauses_ACCD_cache { |
||
24 | }; |
||
25 | |||
26 | static AccClauseSet allowedOnceClauses_ACCD_cache { |
||
27 | }; |
||
28 | |||
29 | static AccClauseSet allowedExclusiveClauses_ACCD_cache { |
||
30 | }; |
||
31 | |||
32 | static AccClauseSet requiredClauses_ACCD_cache { |
||
33 | }; |
||
34 | |||
35 | // Sets for data |
||
36 | |||
37 | static AccClauseSet allowedClauses_ACCD_data { |
||
38 | }; |
||
39 | |||
40 | static AccClauseSet allowedOnceClauses_ACCD_data { |
||
41 | llvm::acc::Clause::ACCC_if, |
||
42 | llvm::acc::Clause::ACCC_default, |
||
43 | }; |
||
44 | |||
45 | static AccClauseSet allowedExclusiveClauses_ACCD_data { |
||
46 | }; |
||
47 | |||
48 | static AccClauseSet requiredClauses_ACCD_data { |
||
49 | llvm::acc::Clause::ACCC_attach, |
||
50 | llvm::acc::Clause::ACCC_copy, |
||
51 | llvm::acc::Clause::ACCC_copyin, |
||
52 | llvm::acc::Clause::ACCC_copyout, |
||
53 | llvm::acc::Clause::ACCC_create, |
||
54 | llvm::acc::Clause::ACCC_default, |
||
55 | llvm::acc::Clause::ACCC_deviceptr, |
||
56 | llvm::acc::Clause::ACCC_no_create, |
||
57 | llvm::acc::Clause::ACCC_present, |
||
58 | }; |
||
59 | |||
60 | // Sets for declare |
||
61 | |||
62 | static AccClauseSet allowedClauses_ACCD_declare { |
||
63 | llvm::acc::Clause::ACCC_copy, |
||
64 | llvm::acc::Clause::ACCC_copyin, |
||
65 | llvm::acc::Clause::ACCC_copyout, |
||
66 | llvm::acc::Clause::ACCC_create, |
||
67 | llvm::acc::Clause::ACCC_present, |
||
68 | llvm::acc::Clause::ACCC_deviceptr, |
||
69 | llvm::acc::Clause::ACCC_device_resident, |
||
70 | llvm::acc::Clause::ACCC_link, |
||
71 | }; |
||
72 | |||
73 | static AccClauseSet allowedOnceClauses_ACCD_declare { |
||
74 | }; |
||
75 | |||
76 | static AccClauseSet allowedExclusiveClauses_ACCD_declare { |
||
77 | }; |
||
78 | |||
79 | static AccClauseSet requiredClauses_ACCD_declare { |
||
80 | }; |
||
81 | |||
82 | // Sets for enter data |
||
83 | |||
84 | static AccClauseSet allowedClauses_ACCD_enter_data { |
||
85 | llvm::acc::Clause::ACCC_wait, |
||
86 | }; |
||
87 | |||
88 | static AccClauseSet allowedOnceClauses_ACCD_enter_data { |
||
89 | llvm::acc::Clause::ACCC_async, |
||
90 | llvm::acc::Clause::ACCC_if, |
||
91 | }; |
||
92 | |||
93 | static AccClauseSet allowedExclusiveClauses_ACCD_enter_data { |
||
94 | }; |
||
95 | |||
96 | static AccClauseSet requiredClauses_ACCD_enter_data { |
||
97 | llvm::acc::Clause::ACCC_attach, |
||
98 | llvm::acc::Clause::ACCC_create, |
||
99 | llvm::acc::Clause::ACCC_copyin, |
||
100 | }; |
||
101 | |||
102 | // Sets for exit data |
||
103 | |||
104 | static AccClauseSet allowedClauses_ACCD_exit_data { |
||
105 | llvm::acc::Clause::ACCC_wait, |
||
106 | }; |
||
107 | |||
108 | static AccClauseSet allowedOnceClauses_ACCD_exit_data { |
||
109 | llvm::acc::Clause::ACCC_async, |
||
110 | llvm::acc::Clause::ACCC_if, |
||
111 | llvm::acc::Clause::ACCC_finalize, |
||
112 | }; |
||
113 | |||
114 | static AccClauseSet allowedExclusiveClauses_ACCD_exit_data { |
||
115 | }; |
||
116 | |||
117 | static AccClauseSet requiredClauses_ACCD_exit_data { |
||
118 | llvm::acc::Clause::ACCC_copyout, |
||
119 | llvm::acc::Clause::ACCC_delete, |
||
120 | llvm::acc::Clause::ACCC_detach, |
||
121 | }; |
||
122 | |||
123 | // Sets for host_data |
||
124 | |||
125 | static AccClauseSet allowedClauses_ACCD_host_data { |
||
126 | }; |
||
127 | |||
128 | static AccClauseSet allowedOnceClauses_ACCD_host_data { |
||
129 | llvm::acc::Clause::ACCC_if, |
||
130 | llvm::acc::Clause::ACCC_if_present, |
||
131 | }; |
||
132 | |||
133 | static AccClauseSet allowedExclusiveClauses_ACCD_host_data { |
||
134 | }; |
||
135 | |||
136 | static AccClauseSet requiredClauses_ACCD_host_data { |
||
137 | llvm::acc::Clause::ACCC_use_device, |
||
138 | }; |
||
139 | |||
140 | // Sets for init |
||
141 | |||
142 | static AccClauseSet allowedClauses_ACCD_init { |
||
143 | }; |
||
144 | |||
145 | static AccClauseSet allowedOnceClauses_ACCD_init { |
||
146 | llvm::acc::Clause::ACCC_device_num, |
||
147 | llvm::acc::Clause::ACCC_device_type, |
||
148 | llvm::acc::Clause::ACCC_if, |
||
149 | }; |
||
150 | |||
151 | static AccClauseSet allowedExclusiveClauses_ACCD_init { |
||
152 | }; |
||
153 | |||
154 | static AccClauseSet requiredClauses_ACCD_init { |
||
155 | }; |
||
156 | |||
157 | // Sets for kernels |
||
158 | |||
159 | static AccClauseSet allowedClauses_ACCD_kernels { |
||
160 | llvm::acc::Clause::ACCC_attach, |
||
161 | llvm::acc::Clause::ACCC_copy, |
||
162 | llvm::acc::Clause::ACCC_copyin, |
||
163 | llvm::acc::Clause::ACCC_copyout, |
||
164 | llvm::acc::Clause::ACCC_create, |
||
165 | llvm::acc::Clause::ACCC_device_type, |
||
166 | llvm::acc::Clause::ACCC_no_create, |
||
167 | llvm::acc::Clause::ACCC_present, |
||
168 | llvm::acc::Clause::ACCC_deviceptr, |
||
169 | llvm::acc::Clause::ACCC_wait, |
||
170 | }; |
||
171 | |||
172 | static AccClauseSet allowedOnceClauses_ACCD_kernels { |
||
173 | llvm::acc::Clause::ACCC_async, |
||
174 | llvm::acc::Clause::ACCC_default, |
||
175 | llvm::acc::Clause::ACCC_if, |
||
176 | llvm::acc::Clause::ACCC_num_gangs, |
||
177 | llvm::acc::Clause::ACCC_num_workers, |
||
178 | llvm::acc::Clause::ACCC_self, |
||
179 | llvm::acc::Clause::ACCC_vector_length, |
||
180 | }; |
||
181 | |||
182 | static AccClauseSet allowedExclusiveClauses_ACCD_kernels { |
||
183 | }; |
||
184 | |||
185 | static AccClauseSet requiredClauses_ACCD_kernels { |
||
186 | }; |
||
187 | |||
188 | // Sets for kernels loop |
||
189 | |||
190 | static AccClauseSet allowedClauses_ACCD_kernels_loop { |
||
191 | llvm::acc::Clause::ACCC_copy, |
||
192 | llvm::acc::Clause::ACCC_copyin, |
||
193 | llvm::acc::Clause::ACCC_copyout, |
||
194 | llvm::acc::Clause::ACCC_create, |
||
195 | llvm::acc::Clause::ACCC_device_type, |
||
196 | llvm::acc::Clause::ACCC_no_create, |
||
197 | llvm::acc::Clause::ACCC_present, |
||
198 | llvm::acc::Clause::ACCC_private, |
||
199 | llvm::acc::Clause::ACCC_deviceptr, |
||
200 | llvm::acc::Clause::ACCC_attach, |
||
201 | llvm::acc::Clause::ACCC_wait, |
||
202 | }; |
||
203 | |||
204 | static AccClauseSet allowedOnceClauses_ACCD_kernels_loop { |
||
205 | llvm::acc::Clause::ACCC_async, |
||
206 | llvm::acc::Clause::ACCC_collapse, |
||
207 | llvm::acc::Clause::ACCC_default, |
||
208 | llvm::acc::Clause::ACCC_gang, |
||
209 | llvm::acc::Clause::ACCC_if, |
||
210 | llvm::acc::Clause::ACCC_num_gangs, |
||
211 | llvm::acc::Clause::ACCC_num_workers, |
||
212 | llvm::acc::Clause::ACCC_reduction, |
||
213 | llvm::acc::Clause::ACCC_self, |
||
214 | llvm::acc::Clause::ACCC_tile, |
||
215 | llvm::acc::Clause::ACCC_vector, |
||
216 | llvm::acc::Clause::ACCC_vector_length, |
||
217 | llvm::acc::Clause::ACCC_worker, |
||
218 | }; |
||
219 | |||
220 | static AccClauseSet allowedExclusiveClauses_ACCD_kernels_loop { |
||
221 | llvm::acc::Clause::ACCC_auto, |
||
222 | llvm::acc::Clause::ACCC_independent, |
||
223 | llvm::acc::Clause::ACCC_seq, |
||
224 | }; |
||
225 | |||
226 | static AccClauseSet requiredClauses_ACCD_kernels_loop { |
||
227 | }; |
||
228 | |||
229 | // Sets for loop |
||
230 | |||
231 | static AccClauseSet allowedClauses_ACCD_loop { |
||
232 | llvm::acc::Clause::ACCC_device_type, |
||
233 | llvm::acc::Clause::ACCC_private, |
||
234 | }; |
||
235 | |||
236 | static AccClauseSet allowedOnceClauses_ACCD_loop { |
||
237 | llvm::acc::Clause::ACCC_collapse, |
||
238 | llvm::acc::Clause::ACCC_gang, |
||
239 | llvm::acc::Clause::ACCC_reduction, |
||
240 | llvm::acc::Clause::ACCC_tile, |
||
241 | llvm::acc::Clause::ACCC_vector, |
||
242 | llvm::acc::Clause::ACCC_worker, |
||
243 | }; |
||
244 | |||
245 | static AccClauseSet allowedExclusiveClauses_ACCD_loop { |
||
246 | llvm::acc::Clause::ACCC_auto, |
||
247 | llvm::acc::Clause::ACCC_independent, |
||
248 | llvm::acc::Clause::ACCC_seq, |
||
249 | }; |
||
250 | |||
251 | static AccClauseSet requiredClauses_ACCD_loop { |
||
252 | }; |
||
253 | |||
254 | // Sets for parallel |
||
255 | |||
256 | static AccClauseSet allowedClauses_ACCD_parallel { |
||
257 | llvm::acc::Clause::ACCC_attach, |
||
258 | llvm::acc::Clause::ACCC_copy, |
||
259 | llvm::acc::Clause::ACCC_copyin, |
||
260 | llvm::acc::Clause::ACCC_copyout, |
||
261 | llvm::acc::Clause::ACCC_create, |
||
262 | llvm::acc::Clause::ACCC_deviceptr, |
||
263 | llvm::acc::Clause::ACCC_device_type, |
||
264 | llvm::acc::Clause::ACCC_no_create, |
||
265 | llvm::acc::Clause::ACCC_present, |
||
266 | llvm::acc::Clause::ACCC_private, |
||
267 | llvm::acc::Clause::ACCC_firstprivate, |
||
268 | llvm::acc::Clause::ACCC_wait, |
||
269 | }; |
||
270 | |||
271 | static AccClauseSet allowedOnceClauses_ACCD_parallel { |
||
272 | llvm::acc::Clause::ACCC_async, |
||
273 | llvm::acc::Clause::ACCC_default, |
||
274 | llvm::acc::Clause::ACCC_if, |
||
275 | llvm::acc::Clause::ACCC_num_gangs, |
||
276 | llvm::acc::Clause::ACCC_num_workers, |
||
277 | llvm::acc::Clause::ACCC_reduction, |
||
278 | llvm::acc::Clause::ACCC_self, |
||
279 | llvm::acc::Clause::ACCC_vector_length, |
||
280 | }; |
||
281 | |||
282 | static AccClauseSet allowedExclusiveClauses_ACCD_parallel { |
||
283 | }; |
||
284 | |||
285 | static AccClauseSet requiredClauses_ACCD_parallel { |
||
286 | }; |
||
287 | |||
288 | // Sets for parallel loop |
||
289 | |||
290 | static AccClauseSet allowedClauses_ACCD_parallel_loop { |
||
291 | llvm::acc::Clause::ACCC_attach, |
||
292 | llvm::acc::Clause::ACCC_copy, |
||
293 | llvm::acc::Clause::ACCC_copyin, |
||
294 | llvm::acc::Clause::ACCC_copyout, |
||
295 | llvm::acc::Clause::ACCC_create, |
||
296 | llvm::acc::Clause::ACCC_deviceptr, |
||
297 | llvm::acc::Clause::ACCC_device_type, |
||
298 | llvm::acc::Clause::ACCC_firstprivate, |
||
299 | llvm::acc::Clause::ACCC_no_create, |
||
300 | llvm::acc::Clause::ACCC_present, |
||
301 | llvm::acc::Clause::ACCC_private, |
||
302 | llvm::acc::Clause::ACCC_tile, |
||
303 | llvm::acc::Clause::ACCC_wait, |
||
304 | }; |
||
305 | |||
306 | static AccClauseSet allowedOnceClauses_ACCD_parallel_loop { |
||
307 | llvm::acc::Clause::ACCC_async, |
||
308 | llvm::acc::Clause::ACCC_collapse, |
||
309 | llvm::acc::Clause::ACCC_default, |
||
310 | llvm::acc::Clause::ACCC_gang, |
||
311 | llvm::acc::Clause::ACCC_if, |
||
312 | llvm::acc::Clause::ACCC_num_gangs, |
||
313 | llvm::acc::Clause::ACCC_num_workers, |
||
314 | llvm::acc::Clause::ACCC_reduction, |
||
315 | llvm::acc::Clause::ACCC_self, |
||
316 | llvm::acc::Clause::ACCC_vector, |
||
317 | llvm::acc::Clause::ACCC_vector_length, |
||
318 | llvm::acc::Clause::ACCC_worker, |
||
319 | }; |
||
320 | |||
321 | static AccClauseSet allowedExclusiveClauses_ACCD_parallel_loop { |
||
322 | llvm::acc::Clause::ACCC_auto, |
||
323 | llvm::acc::Clause::ACCC_independent, |
||
324 | llvm::acc::Clause::ACCC_seq, |
||
325 | }; |
||
326 | |||
327 | static AccClauseSet requiredClauses_ACCD_parallel_loop { |
||
328 | }; |
||
329 | |||
330 | // Sets for routine |
||
331 | |||
332 | static AccClauseSet allowedClauses_ACCD_routine { |
||
333 | }; |
||
334 | |||
335 | static AccClauseSet allowedOnceClauses_ACCD_routine { |
||
336 | llvm::acc::Clause::ACCC_bind, |
||
337 | llvm::acc::Clause::ACCC_device_type, |
||
338 | llvm::acc::Clause::ACCC_nohost, |
||
339 | }; |
||
340 | |||
341 | static AccClauseSet allowedExclusiveClauses_ACCD_routine { |
||
342 | }; |
||
343 | |||
344 | static AccClauseSet requiredClauses_ACCD_routine { |
||
345 | llvm::acc::Clause::ACCC_gang, |
||
346 | llvm::acc::Clause::ACCC_seq, |
||
347 | llvm::acc::Clause::ACCC_vector, |
||
348 | llvm::acc::Clause::ACCC_worker, |
||
349 | }; |
||
350 | |||
351 | // Sets for serial |
||
352 | |||
353 | static AccClauseSet allowedClauses_ACCD_serial { |
||
354 | llvm::acc::Clause::ACCC_attach, |
||
355 | llvm::acc::Clause::ACCC_copy, |
||
356 | llvm::acc::Clause::ACCC_copyin, |
||
357 | llvm::acc::Clause::ACCC_copyout, |
||
358 | llvm::acc::Clause::ACCC_create, |
||
359 | llvm::acc::Clause::ACCC_deviceptr, |
||
360 | llvm::acc::Clause::ACCC_device_type, |
||
361 | llvm::acc::Clause::ACCC_no_create, |
||
362 | llvm::acc::Clause::ACCC_present, |
||
363 | llvm::acc::Clause::ACCC_private, |
||
364 | llvm::acc::Clause::ACCC_firstprivate, |
||
365 | llvm::acc::Clause::ACCC_wait, |
||
366 | }; |
||
367 | |||
368 | static AccClauseSet allowedOnceClauses_ACCD_serial { |
||
369 | llvm::acc::Clause::ACCC_async, |
||
370 | llvm::acc::Clause::ACCC_default, |
||
371 | llvm::acc::Clause::ACCC_if, |
||
372 | llvm::acc::Clause::ACCC_reduction, |
||
373 | llvm::acc::Clause::ACCC_self, |
||
374 | }; |
||
375 | |||
376 | static AccClauseSet allowedExclusiveClauses_ACCD_serial { |
||
377 | }; |
||
378 | |||
379 | static AccClauseSet requiredClauses_ACCD_serial { |
||
380 | }; |
||
381 | |||
382 | // Sets for serial loop |
||
383 | |||
384 | static AccClauseSet allowedClauses_ACCD_serial_loop { |
||
385 | llvm::acc::Clause::ACCC_attach, |
||
386 | llvm::acc::Clause::ACCC_copy, |
||
387 | llvm::acc::Clause::ACCC_copyin, |
||
388 | llvm::acc::Clause::ACCC_copyout, |
||
389 | llvm::acc::Clause::ACCC_create, |
||
390 | llvm::acc::Clause::ACCC_deviceptr, |
||
391 | llvm::acc::Clause::ACCC_device_type, |
||
392 | llvm::acc::Clause::ACCC_firstprivate, |
||
393 | llvm::acc::Clause::ACCC_no_create, |
||
394 | llvm::acc::Clause::ACCC_present, |
||
395 | llvm::acc::Clause::ACCC_private, |
||
396 | llvm::acc::Clause::ACCC_wait, |
||
397 | }; |
||
398 | |||
399 | static AccClauseSet allowedOnceClauses_ACCD_serial_loop { |
||
400 | llvm::acc::Clause::ACCC_async, |
||
401 | llvm::acc::Clause::ACCC_collapse, |
||
402 | llvm::acc::Clause::ACCC_default, |
||
403 | llvm::acc::Clause::ACCC_gang, |
||
404 | llvm::acc::Clause::ACCC_if, |
||
405 | llvm::acc::Clause::ACCC_reduction, |
||
406 | llvm::acc::Clause::ACCC_self, |
||
407 | llvm::acc::Clause::ACCC_tile, |
||
408 | llvm::acc::Clause::ACCC_vector, |
||
409 | llvm::acc::Clause::ACCC_worker, |
||
410 | }; |
||
411 | |||
412 | static AccClauseSet allowedExclusiveClauses_ACCD_serial_loop { |
||
413 | llvm::acc::Clause::ACCC_auto, |
||
414 | llvm::acc::Clause::ACCC_independent, |
||
415 | llvm::acc::Clause::ACCC_seq, |
||
416 | }; |
||
417 | |||
418 | static AccClauseSet requiredClauses_ACCD_serial_loop { |
||
419 | }; |
||
420 | |||
421 | // Sets for set |
||
422 | |||
423 | static AccClauseSet allowedClauses_ACCD_set { |
||
424 | }; |
||
425 | |||
426 | static AccClauseSet allowedOnceClauses_ACCD_set { |
||
427 | llvm::acc::Clause::ACCC_default_async, |
||
428 | llvm::acc::Clause::ACCC_device_num, |
||
429 | llvm::acc::Clause::ACCC_device_type, |
||
430 | llvm::acc::Clause::ACCC_if, |
||
431 | }; |
||
432 | |||
433 | static AccClauseSet allowedExclusiveClauses_ACCD_set { |
||
434 | }; |
||
435 | |||
436 | static AccClauseSet requiredClauses_ACCD_set { |
||
437 | llvm::acc::Clause::ACCC_default_async, |
||
438 | llvm::acc::Clause::ACCC_device_num, |
||
439 | llvm::acc::Clause::ACCC_device_type, |
||
440 | }; |
||
441 | |||
442 | // Sets for shutdown |
||
443 | |||
444 | static AccClauseSet allowedClauses_ACCD_shutdown { |
||
445 | }; |
||
446 | |||
447 | static AccClauseSet allowedOnceClauses_ACCD_shutdown { |
||
448 | llvm::acc::Clause::ACCC_device_num, |
||
449 | llvm::acc::Clause::ACCC_device_type, |
||
450 | llvm::acc::Clause::ACCC_if, |
||
451 | }; |
||
452 | |||
453 | static AccClauseSet allowedExclusiveClauses_ACCD_shutdown { |
||
454 | }; |
||
455 | |||
456 | static AccClauseSet requiredClauses_ACCD_shutdown { |
||
457 | }; |
||
458 | |||
459 | // Sets for unknown |
||
460 | |||
461 | static AccClauseSet allowedClauses_ACCD_unknown { |
||
462 | }; |
||
463 | |||
464 | static AccClauseSet allowedOnceClauses_ACCD_unknown { |
||
465 | }; |
||
466 | |||
467 | static AccClauseSet allowedExclusiveClauses_ACCD_unknown { |
||
468 | }; |
||
469 | |||
470 | static AccClauseSet requiredClauses_ACCD_unknown { |
||
471 | }; |
||
472 | |||
473 | // Sets for update |
||
474 | |||
475 | static AccClauseSet allowedClauses_ACCD_update { |
||
476 | llvm::acc::Clause::ACCC_device_type, |
||
477 | llvm::acc::Clause::ACCC_wait, |
||
478 | }; |
||
479 | |||
480 | static AccClauseSet allowedOnceClauses_ACCD_update { |
||
481 | llvm::acc::Clause::ACCC_async, |
||
482 | llvm::acc::Clause::ACCC_if, |
||
483 | llvm::acc::Clause::ACCC_if_present, |
||
484 | }; |
||
485 | |||
486 | static AccClauseSet allowedExclusiveClauses_ACCD_update { |
||
487 | }; |
||
488 | |||
489 | static AccClauseSet requiredClauses_ACCD_update { |
||
490 | llvm::acc::Clause::ACCC_device, |
||
491 | llvm::acc::Clause::ACCC_host, |
||
492 | llvm::acc::Clause::ACCC_self, |
||
493 | }; |
||
494 | |||
495 | // Sets for wait |
||
496 | |||
497 | static AccClauseSet allowedClauses_ACCD_wait { |
||
498 | }; |
||
499 | |||
500 | static AccClauseSet allowedOnceClauses_ACCD_wait { |
||
501 | llvm::acc::Clause::ACCC_async, |
||
502 | llvm::acc::Clause::ACCC_if, |
||
503 | }; |
||
504 | |||
505 | static AccClauseSet allowedExclusiveClauses_ACCD_wait { |
||
506 | }; |
||
507 | |||
508 | static AccClauseSet requiredClauses_ACCD_wait { |
||
509 | }; |
||
510 | } // namespace acc |
||
511 | } // namespace llvm |
||
512 | |||
513 | #endif // GEN_FLANG_DIRECTIVE_CLAUSE_SETS |
||
514 | |||
515 | #ifdef GEN_FLANG_DIRECTIVE_CLAUSE_MAP |
||
516 | #undef GEN_FLANG_DIRECTIVE_CLAUSE_MAP |
||
517 | |||
518 | { |
||
519 | {llvm::acc::Directive::ACCD_atomic, |
||
520 | { |
||
521 | llvm::acc::allowedClauses_ACCD_atomic, |
||
522 | llvm::acc::allowedOnceClauses_ACCD_atomic, |
||
523 | llvm::acc::allowedExclusiveClauses_ACCD_atomic, |
||
524 | llvm::acc::requiredClauses_ACCD_atomic, |
||
525 | } |
||
526 | }, |
||
527 | {llvm::acc::Directive::ACCD_cache, |
||
528 | { |
||
529 | llvm::acc::allowedClauses_ACCD_cache, |
||
530 | llvm::acc::allowedOnceClauses_ACCD_cache, |
||
531 | llvm::acc::allowedExclusiveClauses_ACCD_cache, |
||
532 | llvm::acc::requiredClauses_ACCD_cache, |
||
533 | } |
||
534 | }, |
||
535 | {llvm::acc::Directive::ACCD_data, |
||
536 | { |
||
537 | llvm::acc::allowedClauses_ACCD_data, |
||
538 | llvm::acc::allowedOnceClauses_ACCD_data, |
||
539 | llvm::acc::allowedExclusiveClauses_ACCD_data, |
||
540 | llvm::acc::requiredClauses_ACCD_data, |
||
541 | } |
||
542 | }, |
||
543 | {llvm::acc::Directive::ACCD_declare, |
||
544 | { |
||
545 | llvm::acc::allowedClauses_ACCD_declare, |
||
546 | llvm::acc::allowedOnceClauses_ACCD_declare, |
||
547 | llvm::acc::allowedExclusiveClauses_ACCD_declare, |
||
548 | llvm::acc::requiredClauses_ACCD_declare, |
||
549 | } |
||
550 | }, |
||
551 | {llvm::acc::Directive::ACCD_enter_data, |
||
552 | { |
||
553 | llvm::acc::allowedClauses_ACCD_enter_data, |
||
554 | llvm::acc::allowedOnceClauses_ACCD_enter_data, |
||
555 | llvm::acc::allowedExclusiveClauses_ACCD_enter_data, |
||
556 | llvm::acc::requiredClauses_ACCD_enter_data, |
||
557 | } |
||
558 | }, |
||
559 | {llvm::acc::Directive::ACCD_exit_data, |
||
560 | { |
||
561 | llvm::acc::allowedClauses_ACCD_exit_data, |
||
562 | llvm::acc::allowedOnceClauses_ACCD_exit_data, |
||
563 | llvm::acc::allowedExclusiveClauses_ACCD_exit_data, |
||
564 | llvm::acc::requiredClauses_ACCD_exit_data, |
||
565 | } |
||
566 | }, |
||
567 | {llvm::acc::Directive::ACCD_host_data, |
||
568 | { |
||
569 | llvm::acc::allowedClauses_ACCD_host_data, |
||
570 | llvm::acc::allowedOnceClauses_ACCD_host_data, |
||
571 | llvm::acc::allowedExclusiveClauses_ACCD_host_data, |
||
572 | llvm::acc::requiredClauses_ACCD_host_data, |
||
573 | } |
||
574 | }, |
||
575 | {llvm::acc::Directive::ACCD_init, |
||
576 | { |
||
577 | llvm::acc::allowedClauses_ACCD_init, |
||
578 | llvm::acc::allowedOnceClauses_ACCD_init, |
||
579 | llvm::acc::allowedExclusiveClauses_ACCD_init, |
||
580 | llvm::acc::requiredClauses_ACCD_init, |
||
581 | } |
||
582 | }, |
||
583 | {llvm::acc::Directive::ACCD_kernels, |
||
584 | { |
||
585 | llvm::acc::allowedClauses_ACCD_kernels, |
||
586 | llvm::acc::allowedOnceClauses_ACCD_kernels, |
||
587 | llvm::acc::allowedExclusiveClauses_ACCD_kernels, |
||
588 | llvm::acc::requiredClauses_ACCD_kernels, |
||
589 | } |
||
590 | }, |
||
591 | {llvm::acc::Directive::ACCD_kernels_loop, |
||
592 | { |
||
593 | llvm::acc::allowedClauses_ACCD_kernels_loop, |
||
594 | llvm::acc::allowedOnceClauses_ACCD_kernels_loop, |
||
595 | llvm::acc::allowedExclusiveClauses_ACCD_kernels_loop, |
||
596 | llvm::acc::requiredClauses_ACCD_kernels_loop, |
||
597 | } |
||
598 | }, |
||
599 | {llvm::acc::Directive::ACCD_loop, |
||
600 | { |
||
601 | llvm::acc::allowedClauses_ACCD_loop, |
||
602 | llvm::acc::allowedOnceClauses_ACCD_loop, |
||
603 | llvm::acc::allowedExclusiveClauses_ACCD_loop, |
||
604 | llvm::acc::requiredClauses_ACCD_loop, |
||
605 | } |
||
606 | }, |
||
607 | {llvm::acc::Directive::ACCD_parallel, |
||
608 | { |
||
609 | llvm::acc::allowedClauses_ACCD_parallel, |
||
610 | llvm::acc::allowedOnceClauses_ACCD_parallel, |
||
611 | llvm::acc::allowedExclusiveClauses_ACCD_parallel, |
||
612 | llvm::acc::requiredClauses_ACCD_parallel, |
||
613 | } |
||
614 | }, |
||
615 | {llvm::acc::Directive::ACCD_parallel_loop, |
||
616 | { |
||
617 | llvm::acc::allowedClauses_ACCD_parallel_loop, |
||
618 | llvm::acc::allowedOnceClauses_ACCD_parallel_loop, |
||
619 | llvm::acc::allowedExclusiveClauses_ACCD_parallel_loop, |
||
620 | llvm::acc::requiredClauses_ACCD_parallel_loop, |
||
621 | } |
||
622 | }, |
||
623 | {llvm::acc::Directive::ACCD_routine, |
||
624 | { |
||
625 | llvm::acc::allowedClauses_ACCD_routine, |
||
626 | llvm::acc::allowedOnceClauses_ACCD_routine, |
||
627 | llvm::acc::allowedExclusiveClauses_ACCD_routine, |
||
628 | llvm::acc::requiredClauses_ACCD_routine, |
||
629 | } |
||
630 | }, |
||
631 | {llvm::acc::Directive::ACCD_serial, |
||
632 | { |
||
633 | llvm::acc::allowedClauses_ACCD_serial, |
||
634 | llvm::acc::allowedOnceClauses_ACCD_serial, |
||
635 | llvm::acc::allowedExclusiveClauses_ACCD_serial, |
||
636 | llvm::acc::requiredClauses_ACCD_serial, |
||
637 | } |
||
638 | }, |
||
639 | {llvm::acc::Directive::ACCD_serial_loop, |
||
640 | { |
||
641 | llvm::acc::allowedClauses_ACCD_serial_loop, |
||
642 | llvm::acc::allowedOnceClauses_ACCD_serial_loop, |
||
643 | llvm::acc::allowedExclusiveClauses_ACCD_serial_loop, |
||
644 | llvm::acc::requiredClauses_ACCD_serial_loop, |
||
645 | } |
||
646 | }, |
||
647 | {llvm::acc::Directive::ACCD_set, |
||
648 | { |
||
649 | llvm::acc::allowedClauses_ACCD_set, |
||
650 | llvm::acc::allowedOnceClauses_ACCD_set, |
||
651 | llvm::acc::allowedExclusiveClauses_ACCD_set, |
||
652 | llvm::acc::requiredClauses_ACCD_set, |
||
653 | } |
||
654 | }, |
||
655 | {llvm::acc::Directive::ACCD_shutdown, |
||
656 | { |
||
657 | llvm::acc::allowedClauses_ACCD_shutdown, |
||
658 | llvm::acc::allowedOnceClauses_ACCD_shutdown, |
||
659 | llvm::acc::allowedExclusiveClauses_ACCD_shutdown, |
||
660 | llvm::acc::requiredClauses_ACCD_shutdown, |
||
661 | } |
||
662 | }, |
||
663 | {llvm::acc::Directive::ACCD_unknown, |
||
664 | { |
||
665 | llvm::acc::allowedClauses_ACCD_unknown, |
||
666 | llvm::acc::allowedOnceClauses_ACCD_unknown, |
||
667 | llvm::acc::allowedExclusiveClauses_ACCD_unknown, |
||
668 | llvm::acc::requiredClauses_ACCD_unknown, |
||
669 | } |
||
670 | }, |
||
671 | {llvm::acc::Directive::ACCD_update, |
||
672 | { |
||
673 | llvm::acc::allowedClauses_ACCD_update, |
||
674 | llvm::acc::allowedOnceClauses_ACCD_update, |
||
675 | llvm::acc::allowedExclusiveClauses_ACCD_update, |
||
676 | llvm::acc::requiredClauses_ACCD_update, |
||
677 | } |
||
678 | }, |
||
679 | {llvm::acc::Directive::ACCD_wait, |
||
680 | { |
||
681 | llvm::acc::allowedClauses_ACCD_wait, |
||
682 | llvm::acc::allowedOnceClauses_ACCD_wait, |
||
683 | llvm::acc::allowedExclusiveClauses_ACCD_wait, |
||
684 | llvm::acc::requiredClauses_ACCD_wait, |
||
685 | } |
||
686 | }, |
||
687 | } |
||
688 | |||
689 | #endif // GEN_FLANG_DIRECTIVE_CLAUSE_MAP |
||
690 | |||
691 | #ifdef GEN_FLANG_CLAUSE_PARSER_CLASSES |
||
692 | #undef GEN_FLANG_CLAUSE_PARSER_CLASSES |
||
693 | |||
694 | WRAPPER_CLASS(Async, std::optional<ScalarIntExpr>); |
||
695 | WRAPPER_CLASS(Attach, AccObjectList); |
||
696 | EMPTY_CLASS(Auto); |
||
697 | WRAPPER_CLASS(Bind, AccBindClause); |
||
698 | EMPTY_CLASS(Capture); |
||
699 | WRAPPER_CLASS(Collapse, ScalarIntConstantExpr); |
||
700 | WRAPPER_CLASS(Copy, AccObjectList); |
||
701 | WRAPPER_CLASS(Copyin, AccObjectListWithModifier); |
||
702 | WRAPPER_CLASS(Copyout, AccObjectListWithModifier); |
||
703 | WRAPPER_CLASS(Create, AccObjectListWithModifier); |
||
704 | WRAPPER_CLASS(Default, AccDefaultClause); |
||
705 | WRAPPER_CLASS(DefaultAsync, ScalarIntExpr); |
||
706 | WRAPPER_CLASS(Delete, AccObjectList); |
||
707 | WRAPPER_CLASS(Detach, AccObjectList); |
||
708 | WRAPPER_CLASS(Device, AccObjectList); |
||
709 | WRAPPER_CLASS(DeviceNum, ScalarIntExpr); |
||
710 | WRAPPER_CLASS(Deviceptr, AccObjectList); |
||
711 | WRAPPER_CLASS(DeviceResident, AccObjectList); |
||
712 | WRAPPER_CLASS(DeviceType, AccDeviceTypeExprList); |
||
713 | EMPTY_CLASS(Finalize); |
||
714 | WRAPPER_CLASS(Firstprivate, AccObjectList); |
||
715 | WRAPPER_CLASS(Gang, std::optional<AccGangArgument>); |
||
716 | WRAPPER_CLASS(Host, AccObjectList); |
||
717 | WRAPPER_CLASS(If, ScalarLogicalExpr); |
||
718 | EMPTY_CLASS(IfPresent); |
||
719 | EMPTY_CLASS(Independent); |
||
720 | WRAPPER_CLASS(Link, AccObjectList); |
||
721 | WRAPPER_CLASS(NoCreate, AccObjectList); |
||
722 | EMPTY_CLASS(Nohost); |
||
723 | WRAPPER_CLASS(NumGangs, ScalarIntExpr); |
||
724 | WRAPPER_CLASS(NumWorkers, ScalarIntExpr); |
||
725 | WRAPPER_CLASS(Present, AccObjectList); |
||
726 | WRAPPER_CLASS(Private, AccObjectList); |
||
727 | EMPTY_CLASS(Read); |
||
728 | WRAPPER_CLASS(Reduction, AccObjectListWithReduction); |
||
729 | WRAPPER_CLASS(Self, std::optional<AccSelfClause>); |
||
730 | EMPTY_CLASS(Seq); |
||
731 | WRAPPER_CLASS(Tile, AccTileExprList); |
||
732 | EMPTY_CLASS(Unknown); |
||
733 | WRAPPER_CLASS(UseDevice, AccObjectList); |
||
734 | WRAPPER_CLASS(Vector, std::optional<ScalarIntExpr>); |
||
735 | WRAPPER_CLASS(VectorLength, ScalarIntExpr); |
||
736 | WRAPPER_CLASS(Wait, std::optional<AccWaitArgument>); |
||
737 | WRAPPER_CLASS(Worker, std::optional<ScalarIntExpr>); |
||
738 | EMPTY_CLASS(Write); |
||
739 | |||
740 | #endif // GEN_FLANG_CLAUSE_PARSER_CLASSES |
||
741 | |||
742 | #ifdef GEN_FLANG_CLAUSE_PARSER_CLASSES_LIST |
||
743 | #undef GEN_FLANG_CLAUSE_PARSER_CLASSES_LIST |
||
744 | |||
745 | Async |
||
746 | , Attach |
||
747 | , Auto |
||
748 | , Bind |
||
749 | , Capture |
||
750 | , Collapse |
||
751 | , Copy |
||
752 | , Copyin |
||
753 | , Copyout |
||
754 | , Create |
||
755 | , Default |
||
756 | , DefaultAsync |
||
757 | , Delete |
||
758 | , Detach |
||
759 | , Device |
||
760 | , DeviceNum |
||
761 | , Deviceptr |
||
762 | , DeviceResident |
||
763 | , DeviceType |
||
764 | , Finalize |
||
765 | , Firstprivate |
||
766 | , Gang |
||
767 | , Host |
||
768 | , If |
||
769 | , IfPresent |
||
770 | , Independent |
||
771 | , Link |
||
772 | , NoCreate |
||
773 | , Nohost |
||
774 | , NumGangs |
||
775 | , NumWorkers |
||
776 | , Present |
||
777 | , Private |
||
778 | , Read |
||
779 | , Reduction |
||
780 | , Self |
||
781 | , Seq |
||
782 | , Tile |
||
783 | , Unknown |
||
784 | , UseDevice |
||
785 | , Vector |
||
786 | , VectorLength |
||
787 | , Wait |
||
788 | , Worker |
||
789 | , Write |
||
790 | |||
791 | #endif // GEN_FLANG_CLAUSE_PARSER_CLASSES_LIST |
||
792 | |||
793 | #ifdef GEN_FLANG_DUMP_PARSE_TREE_CLAUSES |
||
794 | #undef GEN_FLANG_DUMP_PARSE_TREE_CLAUSES |
||
795 | |||
796 | NODE(AccClause, Async) |
||
797 | NODE(AccClause, Attach) |
||
798 | NODE(AccClause, Auto) |
||
799 | NODE(AccClause, Bind) |
||
800 | NODE(AccClause, Capture) |
||
801 | NODE(AccClause, Collapse) |
||
802 | NODE(AccClause, Copy) |
||
803 | NODE(AccClause, Copyin) |
||
804 | NODE(AccClause, Copyout) |
||
805 | NODE(AccClause, Create) |
||
806 | NODE(AccClause, Default) |
||
807 | NODE(AccClause, DefaultAsync) |
||
808 | NODE(AccClause, Delete) |
||
809 | NODE(AccClause, Detach) |
||
810 | NODE(AccClause, Device) |
||
811 | NODE(AccClause, DeviceNum) |
||
812 | NODE(AccClause, Deviceptr) |
||
813 | NODE(AccClause, DeviceResident) |
||
814 | NODE(AccClause, DeviceType) |
||
815 | NODE(AccClause, Finalize) |
||
816 | NODE(AccClause, Firstprivate) |
||
817 | NODE(AccClause, Gang) |
||
818 | NODE(AccClause, Host) |
||
819 | NODE(AccClause, If) |
||
820 | NODE(AccClause, IfPresent) |
||
821 | NODE(AccClause, Independent) |
||
822 | NODE(AccClause, Link) |
||
823 | NODE(AccClause, NoCreate) |
||
824 | NODE(AccClause, Nohost) |
||
825 | NODE(AccClause, NumGangs) |
||
826 | NODE(AccClause, NumWorkers) |
||
827 | NODE(AccClause, Present) |
||
828 | NODE(AccClause, Private) |
||
829 | NODE(AccClause, Read) |
||
830 | NODE(AccClause, Reduction) |
||
831 | NODE(AccClause, Self) |
||
832 | NODE(AccClause, Seq) |
||
833 | NODE(AccClause, Tile) |
||
834 | NODE(AccClause, Unknown) |
||
835 | NODE(AccClause, UseDevice) |
||
836 | NODE(AccClause, Vector) |
||
837 | NODE(AccClause, VectorLength) |
||
838 | NODE(AccClause, Wait) |
||
839 | NODE(AccClause, Worker) |
||
840 | NODE(AccClause, Write) |
||
841 | |||
842 | #endif // GEN_FLANG_DUMP_PARSE_TREE_CLAUSES |
||
843 | |||
844 | #ifdef GEN_FLANG_CLAUSE_UNPARSE |
||
845 | #undef GEN_FLANG_CLAUSE_UNPARSE |
||
846 | |||
847 | void Unparse(const AccClause::Async &x) { |
||
848 | Word("ASYNC"); |
||
849 | Walk("(", x.v, ")"); |
||
850 | } |
||
851 | void Unparse(const AccClause::Attach &x) { |
||
852 | Word("ATTACH"); |
||
853 | Put("("); |
||
854 | Walk(x.v); |
||
855 | Put(")"); |
||
856 | } |
||
857 | void Before(const AccClause::Auto &) { Word("AUTO"); } |
||
858 | void Unparse(const AccClause::Bind &x) { |
||
859 | Word("BIND"); |
||
860 | Put("("); |
||
861 | Walk(x.v); |
||
862 | Put(")"); |
||
863 | } |
||
864 | void Before(const AccClause::Capture &) { Word("CAPTURE"); } |
||
865 | void Unparse(const AccClause::Collapse &x) { |
||
866 | Word("COLLAPSE"); |
||
867 | Put("("); |
||
868 | Walk(x.v); |
||
869 | Put(")"); |
||
870 | } |
||
871 | void Unparse(const AccClause::Copy &x) { |
||
872 | Word("COPY"); |
||
873 | Put("("); |
||
874 | Walk(x.v); |
||
875 | Put(")"); |
||
876 | } |
||
877 | void Unparse(const AccClause::Copyin &x) { |
||
878 | Word("COPYIN"); |
||
879 | Put("("); |
||
880 | Walk(x.v); |
||
881 | Put(")"); |
||
882 | } |
||
883 | void Unparse(const AccClause::Copyout &x) { |
||
884 | Word("COPYOUT"); |
||
885 | Put("("); |
||
886 | Walk(x.v); |
||
887 | Put(")"); |
||
888 | } |
||
889 | void Unparse(const AccClause::Create &x) { |
||
890 | Word("CREATE"); |
||
891 | Put("("); |
||
892 | Walk(x.v); |
||
893 | Put(")"); |
||
894 | } |
||
895 | void Unparse(const AccClause::Default &x) { |
||
896 | Word("DEFAULT"); |
||
897 | Put("("); |
||
898 | Walk(x.v); |
||
899 | Put(")"); |
||
900 | } |
||
901 | void Unparse(const AccClause::DefaultAsync &x) { |
||
902 | Word("DEFAULT_ASYNC"); |
||
903 | Put("("); |
||
904 | Walk(x.v); |
||
905 | Put(")"); |
||
906 | } |
||
907 | void Unparse(const AccClause::Delete &x) { |
||
908 | Word("DELETE"); |
||
909 | Put("("); |
||
910 | Walk(x.v); |
||
911 | Put(")"); |
||
912 | } |
||
913 | void Unparse(const AccClause::Detach &x) { |
||
914 | Word("DETACH"); |
||
915 | Put("("); |
||
916 | Walk(x.v); |
||
917 | Put(")"); |
||
918 | } |
||
919 | void Unparse(const AccClause::Device &x) { |
||
920 | Word("DEVICE"); |
||
921 | Put("("); |
||
922 | Walk(x.v); |
||
923 | Put(")"); |
||
924 | } |
||
925 | void Unparse(const AccClause::DeviceNum &x) { |
||
926 | Word("DEVICE_NUM"); |
||
927 | Put("("); |
||
928 | Walk(x.v); |
||
929 | Put(")"); |
||
930 | } |
||
931 | void Unparse(const AccClause::Deviceptr &x) { |
||
932 | Word("DEVICEPTR"); |
||
933 | Put("("); |
||
934 | Walk(x.v); |
||
935 | Put(")"); |
||
936 | } |
||
937 | void Unparse(const AccClause::DeviceResident &x) { |
||
938 | Word("DEVICE_RESIDENT"); |
||
939 | Put("("); |
||
940 | Walk(x.v); |
||
941 | Put(")"); |
||
942 | } |
||
943 | void Unparse(const AccClause::DeviceType &x) { |
||
944 | Word("DEVICE_TYPE"); |
||
945 | Put("("); |
||
946 | Walk(x.v); |
||
947 | Put(")"); |
||
948 | } |
||
949 | void Before(const AccClause::Finalize &) { Word("FINALIZE"); } |
||
950 | void Unparse(const AccClause::Firstprivate &x) { |
||
951 | Word("FIRSTPRIVATE"); |
||
952 | Put("("); |
||
953 | Walk(x.v); |
||
954 | Put(")"); |
||
955 | } |
||
956 | void Unparse(const AccClause::Gang &x) { |
||
957 | Word("GANG"); |
||
958 | Walk("(", x.v, ")"); |
||
959 | } |
||
960 | void Unparse(const AccClause::Host &x) { |
||
961 | Word("HOST"); |
||
962 | Put("("); |
||
963 | Walk(x.v); |
||
964 | Put(")"); |
||
965 | } |
||
966 | void Unparse(const AccClause::If &x) { |
||
967 | Word("IF"); |
||
968 | Put("("); |
||
969 | Walk(x.v); |
||
970 | Put(")"); |
||
971 | } |
||
972 | void Before(const AccClause::IfPresent &) { Word("IF_PRESENT"); } |
||
973 | void Before(const AccClause::Independent &) { Word("INDEPENDENT"); } |
||
974 | void Unparse(const AccClause::Link &x) { |
||
975 | Word("LINK"); |
||
976 | Put("("); |
||
977 | Walk(x.v); |
||
978 | Put(")"); |
||
979 | } |
||
980 | void Unparse(const AccClause::NoCreate &x) { |
||
981 | Word("NO_CREATE"); |
||
982 | Put("("); |
||
983 | Walk(x.v); |
||
984 | Put(")"); |
||
985 | } |
||
986 | void Before(const AccClause::Nohost &) { Word("NOHOST"); } |
||
987 | void Unparse(const AccClause::NumGangs &x) { |
||
988 | Word("NUM_GANGS"); |
||
989 | Put("("); |
||
990 | Walk(x.v); |
||
991 | Put(")"); |
||
992 | } |
||
993 | void Unparse(const AccClause::NumWorkers &x) { |
||
994 | Word("NUM_WORKERS"); |
||
995 | Put("("); |
||
996 | Walk(x.v); |
||
997 | Put(")"); |
||
998 | } |
||
999 | void Unparse(const AccClause::Present &x) { |
||
1000 | Word("PRESENT"); |
||
1001 | Put("("); |
||
1002 | Walk(x.v); |
||
1003 | Put(")"); |
||
1004 | } |
||
1005 | void Unparse(const AccClause::Private &x) { |
||
1006 | Word("PRIVATE"); |
||
1007 | Put("("); |
||
1008 | Walk(x.v); |
||
1009 | Put(")"); |
||
1010 | } |
||
1011 | void Before(const AccClause::Read &) { Word("READ"); } |
||
1012 | void Unparse(const AccClause::Reduction &x) { |
||
1013 | Word("REDUCTION"); |
||
1014 | Put("("); |
||
1015 | Walk(x.v); |
||
1016 | Put(")"); |
||
1017 | } |
||
1018 | void Unparse(const AccClause::Self &x) { |
||
1019 | Word("SELF"); |
||
1020 | Walk("(", x.v, ")"); |
||
1021 | } |
||
1022 | void Before(const AccClause::Seq &) { Word("SEQ"); } |
||
1023 | void Unparse(const AccClause::Tile &x) { |
||
1024 | Word("TILE"); |
||
1025 | Put("("); |
||
1026 | Walk(x.v); |
||
1027 | Put(")"); |
||
1028 | } |
||
1029 | void Before(const AccClause::Unknown &) { Word("UNKNOWN"); } |
||
1030 | void Unparse(const AccClause::UseDevice &x) { |
||
1031 | Word("USE_DEVICE"); |
||
1032 | Put("("); |
||
1033 | Walk(x.v); |
||
1034 | Put(")"); |
||
1035 | } |
||
1036 | void Unparse(const AccClause::Vector &x) { |
||
1037 | Word("VECTOR"); |
||
1038 | Walk("(", x.v, ")"); |
||
1039 | } |
||
1040 | void Unparse(const AccClause::VectorLength &x) { |
||
1041 | Word("VECTOR_LENGTH"); |
||
1042 | Put("("); |
||
1043 | Walk(x.v); |
||
1044 | Put(")"); |
||
1045 | } |
||
1046 | void Unparse(const AccClause::Wait &x) { |
||
1047 | Word("WAIT"); |
||
1048 | Walk("(", x.v, ")"); |
||
1049 | } |
||
1050 | void Unparse(const AccClause::Worker &x) { |
||
1051 | Word("WORKER"); |
||
1052 | Walk("(", x.v, ")"); |
||
1053 | } |
||
1054 | void Before(const AccClause::Write &) { Word("WRITE"); } |
||
1055 | |||
1056 | #endif // GEN_FLANG_CLAUSE_UNPARSE |
||
1057 | |||
1058 | #ifdef GEN_FLANG_CLAUSE_CHECK_ENTER |
||
1059 | #undef GEN_FLANG_CLAUSE_CHECK_ENTER |
||
1060 | |||
1061 | void Enter(const parser::AccClause::Async &); |
||
1062 | void Enter(const parser::AccClause::Attach &); |
||
1063 | void Enter(const parser::AccClause::Auto &); |
||
1064 | void Enter(const parser::AccClause::Bind &); |
||
1065 | void Enter(const parser::AccClause::Capture &); |
||
1066 | void Enter(const parser::AccClause::Collapse &); |
||
1067 | void Enter(const parser::AccClause::Copy &); |
||
1068 | void Enter(const parser::AccClause::Copyin &); |
||
1069 | void Enter(const parser::AccClause::Copyout &); |
||
1070 | void Enter(const parser::AccClause::Create &); |
||
1071 | void Enter(const parser::AccClause::Default &); |
||
1072 | void Enter(const parser::AccClause::DefaultAsync &); |
||
1073 | void Enter(const parser::AccClause::Delete &); |
||
1074 | void Enter(const parser::AccClause::Detach &); |
||
1075 | void Enter(const parser::AccClause::Device &); |
||
1076 | void Enter(const parser::AccClause::DeviceNum &); |
||
1077 | void Enter(const parser::AccClause::Deviceptr &); |
||
1078 | void Enter(const parser::AccClause::DeviceResident &); |
||
1079 | void Enter(const parser::AccClause::DeviceType &); |
||
1080 | void Enter(const parser::AccClause::Finalize &); |
||
1081 | void Enter(const parser::AccClause::Firstprivate &); |
||
1082 | void Enter(const parser::AccClause::Gang &); |
||
1083 | void Enter(const parser::AccClause::Host &); |
||
1084 | void Enter(const parser::AccClause::If &); |
||
1085 | void Enter(const parser::AccClause::IfPresent &); |
||
1086 | void Enter(const parser::AccClause::Independent &); |
||
1087 | void Enter(const parser::AccClause::Link &); |
||
1088 | void Enter(const parser::AccClause::NoCreate &); |
||
1089 | void Enter(const parser::AccClause::Nohost &); |
||
1090 | void Enter(const parser::AccClause::NumGangs &); |
||
1091 | void Enter(const parser::AccClause::NumWorkers &); |
||
1092 | void Enter(const parser::AccClause::Present &); |
||
1093 | void Enter(const parser::AccClause::Private &); |
||
1094 | void Enter(const parser::AccClause::Read &); |
||
1095 | void Enter(const parser::AccClause::Reduction &); |
||
1096 | void Enter(const parser::AccClause::Self &); |
||
1097 | void Enter(const parser::AccClause::Seq &); |
||
1098 | void Enter(const parser::AccClause::Tile &); |
||
1099 | void Enter(const parser::AccClause::Unknown &); |
||
1100 | void Enter(const parser::AccClause::UseDevice &); |
||
1101 | void Enter(const parser::AccClause::Vector &); |
||
1102 | void Enter(const parser::AccClause::VectorLength &); |
||
1103 | void Enter(const parser::AccClause::Wait &); |
||
1104 | void Enter(const parser::AccClause::Worker &); |
||
1105 | void Enter(const parser::AccClause::Write &); |
||
1106 | |||
1107 | #endif // GEN_FLANG_CLAUSE_CHECK_ENTER |
||
1108 | |||
1109 | #ifdef GEN_FLANG_CLAUSE_PARSER_KIND_MAP |
||
1110 | #undef GEN_FLANG_CLAUSE_PARSER_KIND_MAP |
||
1111 | |||
1112 | if constexpr (std::is_same_v<A, parser::AccClause::Async>) |
||
1113 | return llvm::acc::Clause::ACCC_async; |
||
1114 | if constexpr (std::is_same_v<A, parser::AccClause::Attach>) |
||
1115 | return llvm::acc::Clause::ACCC_attach; |
||
1116 | if constexpr (std::is_same_v<A, parser::AccClause::Auto>) |
||
1117 | return llvm::acc::Clause::ACCC_auto; |
||
1118 | if constexpr (std::is_same_v<A, parser::AccClause::Bind>) |
||
1119 | return llvm::acc::Clause::ACCC_bind; |
||
1120 | if constexpr (std::is_same_v<A, parser::AccClause::Capture>) |
||
1121 | return llvm::acc::Clause::ACCC_capture; |
||
1122 | if constexpr (std::is_same_v<A, parser::AccClause::Collapse>) |
||
1123 | return llvm::acc::Clause::ACCC_collapse; |
||
1124 | if constexpr (std::is_same_v<A, parser::AccClause::Copy>) |
||
1125 | return llvm::acc::Clause::ACCC_copy; |
||
1126 | if constexpr (std::is_same_v<A, parser::AccClause::Copyin>) |
||
1127 | return llvm::acc::Clause::ACCC_copyin; |
||
1128 | if constexpr (std::is_same_v<A, parser::AccClause::Copyout>) |
||
1129 | return llvm::acc::Clause::ACCC_copyout; |
||
1130 | if constexpr (std::is_same_v<A, parser::AccClause::Create>) |
||
1131 | return llvm::acc::Clause::ACCC_create; |
||
1132 | if constexpr (std::is_same_v<A, parser::AccClause::Default>) |
||
1133 | return llvm::acc::Clause::ACCC_default; |
||
1134 | if constexpr (std::is_same_v<A, parser::AccClause::DefaultAsync>) |
||
1135 | return llvm::acc::Clause::ACCC_default_async; |
||
1136 | if constexpr (std::is_same_v<A, parser::AccClause::Delete>) |
||
1137 | return llvm::acc::Clause::ACCC_delete; |
||
1138 | if constexpr (std::is_same_v<A, parser::AccClause::Detach>) |
||
1139 | return llvm::acc::Clause::ACCC_detach; |
||
1140 | if constexpr (std::is_same_v<A, parser::AccClause::Device>) |
||
1141 | return llvm::acc::Clause::ACCC_device; |
||
1142 | if constexpr (std::is_same_v<A, parser::AccClause::DeviceNum>) |
||
1143 | return llvm::acc::Clause::ACCC_device_num; |
||
1144 | if constexpr (std::is_same_v<A, parser::AccClause::Deviceptr>) |
||
1145 | return llvm::acc::Clause::ACCC_deviceptr; |
||
1146 | if constexpr (std::is_same_v<A, parser::AccClause::DeviceResident>) |
||
1147 | return llvm::acc::Clause::ACCC_device_resident; |
||
1148 | if constexpr (std::is_same_v<A, parser::AccClause::DeviceType>) |
||
1149 | return llvm::acc::Clause::ACCC_device_type; |
||
1150 | if constexpr (std::is_same_v<A, parser::AccClause::Finalize>) |
||
1151 | return llvm::acc::Clause::ACCC_finalize; |
||
1152 | if constexpr (std::is_same_v<A, parser::AccClause::Firstprivate>) |
||
1153 | return llvm::acc::Clause::ACCC_firstprivate; |
||
1154 | if constexpr (std::is_same_v<A, parser::AccClause::Gang>) |
||
1155 | return llvm::acc::Clause::ACCC_gang; |
||
1156 | if constexpr (std::is_same_v<A, parser::AccClause::Host>) |
||
1157 | return llvm::acc::Clause::ACCC_host; |
||
1158 | if constexpr (std::is_same_v<A, parser::AccClause::If>) |
||
1159 | return llvm::acc::Clause::ACCC_if; |
||
1160 | if constexpr (std::is_same_v<A, parser::AccClause::IfPresent>) |
||
1161 | return llvm::acc::Clause::ACCC_if_present; |
||
1162 | if constexpr (std::is_same_v<A, parser::AccClause::Independent>) |
||
1163 | return llvm::acc::Clause::ACCC_independent; |
||
1164 | if constexpr (std::is_same_v<A, parser::AccClause::Link>) |
||
1165 | return llvm::acc::Clause::ACCC_link; |
||
1166 | if constexpr (std::is_same_v<A, parser::AccClause::NoCreate>) |
||
1167 | return llvm::acc::Clause::ACCC_no_create; |
||
1168 | if constexpr (std::is_same_v<A, parser::AccClause::Nohost>) |
||
1169 | return llvm::acc::Clause::ACCC_nohost; |
||
1170 | if constexpr (std::is_same_v<A, parser::AccClause::NumGangs>) |
||
1171 | return llvm::acc::Clause::ACCC_num_gangs; |
||
1172 | if constexpr (std::is_same_v<A, parser::AccClause::NumWorkers>) |
||
1173 | return llvm::acc::Clause::ACCC_num_workers; |
||
1174 | if constexpr (std::is_same_v<A, parser::AccClause::Present>) |
||
1175 | return llvm::acc::Clause::ACCC_present; |
||
1176 | if constexpr (std::is_same_v<A, parser::AccClause::Private>) |
||
1177 | return llvm::acc::Clause::ACCC_private; |
||
1178 | if constexpr (std::is_same_v<A, parser::AccClause::Read>) |
||
1179 | return llvm::acc::Clause::ACCC_read; |
||
1180 | if constexpr (std::is_same_v<A, parser::AccClause::Reduction>) |
||
1181 | return llvm::acc::Clause::ACCC_reduction; |
||
1182 | if constexpr (std::is_same_v<A, parser::AccClause::Self>) |
||
1183 | return llvm::acc::Clause::ACCC_self; |
||
1184 | if constexpr (std::is_same_v<A, parser::AccClause::Seq>) |
||
1185 | return llvm::acc::Clause::ACCC_seq; |
||
1186 | if constexpr (std::is_same_v<A, parser::AccClause::Tile>) |
||
1187 | return llvm::acc::Clause::ACCC_tile; |
||
1188 | if constexpr (std::is_same_v<A, parser::AccClause::Unknown>) |
||
1189 | return llvm::acc::Clause::ACCC_unknown; |
||
1190 | if constexpr (std::is_same_v<A, parser::AccClause::UseDevice>) |
||
1191 | return llvm::acc::Clause::ACCC_use_device; |
||
1192 | if constexpr (std::is_same_v<A, parser::AccClause::Vector>) |
||
1193 | return llvm::acc::Clause::ACCC_vector; |
||
1194 | if constexpr (std::is_same_v<A, parser::AccClause::VectorLength>) |
||
1195 | return llvm::acc::Clause::ACCC_vector_length; |
||
1196 | if constexpr (std::is_same_v<A, parser::AccClause::Wait>) |
||
1197 | return llvm::acc::Clause::ACCC_wait; |
||
1198 | if constexpr (std::is_same_v<A, parser::AccClause::Worker>) |
||
1199 | return llvm::acc::Clause::ACCC_worker; |
||
1200 | if constexpr (std::is_same_v<A, parser::AccClause::Write>) |
||
1201 | return llvm::acc::Clause::ACCC_write; |
||
1202 | llvm_unreachable("Invalid OpenACC Parser clause"); |
||
1203 | |||
1204 | #endif // GEN_FLANG_CLAUSE_PARSER_KIND_MAP |
||
1205 | |||
1206 | #ifdef GEN_FLANG_CLAUSES_PARSER |
||
1207 | #undef GEN_FLANG_CLAUSES_PARSER |
||
1208 | |||
1209 | TYPE_PARSER( |
||
1210 | "write" >> construct<AccClause>(construct<AccClause::Write>()) || |
||
1211 | "worker" >> construct<AccClause>(construct<AccClause::Worker>(maybe(parenthesized("num:" >> scalarIntExpr || scalarIntExpr)))) || |
||
1212 | "wait" >> construct<AccClause>(construct<AccClause::Wait>(maybe(parenthesized(Parser<AccWaitArgument>{})))) || |
||
1213 | "vector_length" >> construct<AccClause>(construct<AccClause::VectorLength>(parenthesized(scalarIntExpr))) || |
||
1214 | "vector" >> construct<AccClause>(construct<AccClause::Vector>(maybe(parenthesized("length:" >> scalarIntExpr || scalarIntExpr)))) || |
||
1215 | "use_device" >> construct<AccClause>(construct<AccClause::UseDevice>(parenthesized(Parser<AccObjectList>{}))) || |
||
1216 | "unknown" >> construct<AccClause>(construct<AccClause::Unknown>()) || |
||
1217 | "tile" >> construct<AccClause>(construct<AccClause::Tile>(parenthesized(Parser<AccTileExprList>{}))) || |
||
1218 | "seq" >> construct<AccClause>(construct<AccClause::Seq>()) || |
||
1219 | "self" >> construct<AccClause>(construct<AccClause::Self>(maybe(parenthesized(Parser<AccSelfClause>{})))) || |
||
1220 | "reduction" >> construct<AccClause>(construct<AccClause::Reduction>(parenthesized(Parser<AccObjectListWithReduction>{}))) || |
||
1221 | "read" >> construct<AccClause>(construct<AccClause::Read>()) || |
||
1222 | "private" >> construct<AccClause>(construct<AccClause::Private>(parenthesized(Parser<AccObjectList>{}))) || |
||
1223 | "present" >> construct<AccClause>(construct<AccClause::Present>(parenthesized(Parser<AccObjectList>{}))) || |
||
1224 | "num_workers" >> construct<AccClause>(construct<AccClause::NumWorkers>(parenthesized(scalarIntExpr))) || |
||
1225 | "num_gangs" >> construct<AccClause>(construct<AccClause::NumGangs>(parenthesized(scalarIntExpr))) || |
||
1226 | "nohost" >> construct<AccClause>(construct<AccClause::Nohost>()) || |
||
1227 | "no_create" >> construct<AccClause>(construct<AccClause::NoCreate>(parenthesized(Parser<AccObjectList>{}))) || |
||
1228 | "link" >> construct<AccClause>(construct<AccClause::Link>(parenthesized(Parser<AccObjectList>{}))) || |
||
1229 | "independent" >> construct<AccClause>(construct<AccClause::Independent>()) || |
||
1230 | "if_present" >> construct<AccClause>(construct<AccClause::IfPresent>()) || |
||
1231 | "if" >> construct<AccClause>(construct<AccClause::If>(parenthesized(scalarLogicalExpr))) || |
||
1232 | "host" >> construct<AccClause>(construct<AccClause::Host>(parenthesized(Parser<AccObjectList>{}))) || |
||
1233 | "gang" >> construct<AccClause>(construct<AccClause::Gang>(maybe(parenthesized(Parser<AccGangArgument>{})))) || |
||
1234 | "firstprivate" >> construct<AccClause>(construct<AccClause::Firstprivate>(parenthesized(Parser<AccObjectList>{}))) || |
||
1235 | "finalize" >> construct<AccClause>(construct<AccClause::Finalize>()) || |
||
1236 | "deviceptr" >> construct<AccClause>(construct<AccClause::Deviceptr>(parenthesized(Parser<AccObjectList>{}))) || |
||
1237 | ("device_type"_tok || "dtype"_tok) >> construct<AccClause>(construct<AccClause::DeviceType>(parenthesized(Parser<AccDeviceTypeExprList>{}))) || |
||
1238 | "device_resident" >> construct<AccClause>(construct<AccClause::DeviceResident>(parenthesized(Parser<AccObjectList>{}))) || |
||
1239 | "device_num" >> construct<AccClause>(construct<AccClause::DeviceNum>(parenthesized(scalarIntExpr))) || |
||
1240 | "device" >> construct<AccClause>(construct<AccClause::Device>(parenthesized(Parser<AccObjectList>{}))) || |
||
1241 | "detach" >> construct<AccClause>(construct<AccClause::Detach>(parenthesized(Parser<AccObjectList>{}))) || |
||
1242 | "delete" >> construct<AccClause>(construct<AccClause::Delete>(parenthesized(Parser<AccObjectList>{}))) || |
||
1243 | "default_async" >> construct<AccClause>(construct<AccClause::DefaultAsync>(parenthesized(scalarIntExpr))) || |
||
1244 | "default" >> construct<AccClause>(construct<AccClause::Default>(parenthesized(Parser<AccDefaultClause>{}))) || |
||
1245 | ("create"_tok || "present_or_create"_tok || "pcreate"_tok) >> construct<AccClause>(construct<AccClause::Create>(parenthesized(Parser<AccObjectListWithModifier>{}))) || |
||
1246 | ("copyout"_tok || "present_or_copyout"_tok || "pcopyout"_tok) >> construct<AccClause>(construct<AccClause::Copyout>(parenthesized(Parser<AccObjectListWithModifier>{}))) || |
||
1247 | ("copyin"_tok || "present_or_copyin"_tok || "pcopyin"_tok) >> construct<AccClause>(construct<AccClause::Copyin>(parenthesized(Parser<AccObjectListWithModifier>{}))) || |
||
1248 | ("copy"_tok || "present_or_copy"_tok || "pcopy"_tok) >> construct<AccClause>(construct<AccClause::Copy>(parenthesized(Parser<AccObjectList>{}))) || |
||
1249 | "collapse" >> construct<AccClause>(construct<AccClause::Collapse>(parenthesized(scalarIntConstantExpr))) || |
||
1250 | "capture" >> construct<AccClause>(construct<AccClause::Capture>()) || |
||
1251 | "bind" >> construct<AccClause>(construct<AccClause::Bind>(parenthesized(Parser<AccBindClause>{}))) || |
||
1252 | "auto" >> construct<AccClause>(construct<AccClause::Auto>()) || |
||
1253 | "attach" >> construct<AccClause>(construct<AccClause::Attach>(parenthesized(Parser<AccObjectList>{}))) || |
||
1254 | "async" >> construct<AccClause>(construct<AccClause::Async>(maybe(parenthesized(scalarIntExpr)))) |
||
1255 | ) |
||
1256 | |||
1257 | #endif // GEN_FLANG_CLAUSES_PARSER |
||
1258 | |||
1259 | #ifdef GEN_CLANG_CLAUSE_CLASS |
||
1260 | #undef GEN_CLANG_CLAUSE_CLASS |
||
1261 | |||
1262 | #ifndef CLAUSE |
||
1263 | #define CLAUSE(Enum, Str, Implicit) |
||
1264 | #endif |
||
1265 | #ifndef CLAUSE_CLASS |
||
1266 | #define CLAUSE_CLASS(Enum, Str, Class) |
||
1267 | #endif |
||
1268 | #ifndef CLAUSE_NO_CLASS |
||
1269 | #define CLAUSE_NO_CLASS(Enum, Str) |
||
1270 | #endif |
||
1271 | |||
1272 | #define __CLAUSE(Name, Class) \ |
||
1273 | CLAUSE(ACCC_##Name, #Name, /* Implicit */ false) \ |
||
1274 | CLAUSE_CLASS(ACCC_##Name, #Name, Class) |
||
1275 | #define __CLAUSE_NO_CLASS(Name) \ |
||
1276 | CLAUSE(ACCC_##Name, #Name, /* Implicit */ false) \ |
||
1277 | CLAUSE_NO_CLASS(ACCC_##Name, #Name) |
||
1278 | #define __IMPLICIT_CLAUSE_CLASS(Name, Str, Class) \ |
||
1279 | CLAUSE(ACCC_##Name, Str, /* Implicit */ true) \ |
||
1280 | CLAUSE_CLASS(ACCC_##Name, Str, Class) |
||
1281 | #define __IMPLICIT_CLAUSE_NO_CLASS(Name, Str) \ |
||
1282 | CLAUSE(ACCC_##Name, Str, /* Implicit */ true) \ |
||
1283 | CLAUSE_NO_CLASS(ACCC_##Name, Str) |
||
1284 | |||
1285 | __CLAUSE_NO_CLASS(async) |
||
1286 | __CLAUSE_NO_CLASS(attach) |
||
1287 | __CLAUSE_NO_CLASS(auto) |
||
1288 | __CLAUSE_NO_CLASS(bind) |
||
1289 | __CLAUSE_NO_CLASS(capture) |
||
1290 | __CLAUSE_NO_CLASS(collapse) |
||
1291 | __CLAUSE_NO_CLASS(copy) |
||
1292 | __CLAUSE_NO_CLASS(copyin) |
||
1293 | __CLAUSE_NO_CLASS(copyout) |
||
1294 | __CLAUSE_NO_CLASS(create) |
||
1295 | __CLAUSE_NO_CLASS(default) |
||
1296 | __CLAUSE_NO_CLASS(default_async) |
||
1297 | __CLAUSE_NO_CLASS(delete) |
||
1298 | __CLAUSE_NO_CLASS(detach) |
||
1299 | __CLAUSE_NO_CLASS(device) |
||
1300 | __CLAUSE_NO_CLASS(device_num) |
||
1301 | __CLAUSE_NO_CLASS(deviceptr) |
||
1302 | __CLAUSE_NO_CLASS(device_resident) |
||
1303 | __CLAUSE_NO_CLASS(device_type) |
||
1304 | __CLAUSE_NO_CLASS(finalize) |
||
1305 | __CLAUSE_NO_CLASS(firstprivate) |
||
1306 | __CLAUSE_NO_CLASS(gang) |
||
1307 | __CLAUSE_NO_CLASS(host) |
||
1308 | __CLAUSE_NO_CLASS(if) |
||
1309 | __CLAUSE_NO_CLASS(if_present) |
||
1310 | __CLAUSE_NO_CLASS(independent) |
||
1311 | __CLAUSE_NO_CLASS(link) |
||
1312 | __CLAUSE_NO_CLASS(no_create) |
||
1313 | __CLAUSE_NO_CLASS(nohost) |
||
1314 | __CLAUSE_NO_CLASS(num_gangs) |
||
1315 | __CLAUSE_NO_CLASS(num_workers) |
||
1316 | __CLAUSE_NO_CLASS(present) |
||
1317 | __CLAUSE_NO_CLASS(private) |
||
1318 | __CLAUSE_NO_CLASS(read) |
||
1319 | __CLAUSE_NO_CLASS(reduction) |
||
1320 | __CLAUSE_NO_CLASS(self) |
||
1321 | __CLAUSE_NO_CLASS(seq) |
||
1322 | __CLAUSE_NO_CLASS(tile) |
||
1323 | __CLAUSE_NO_CLASS(unknown) |
||
1324 | __CLAUSE_NO_CLASS(use_device) |
||
1325 | __CLAUSE_NO_CLASS(vector) |
||
1326 | __CLAUSE_NO_CLASS(vector_length) |
||
1327 | __CLAUSE_NO_CLASS(wait) |
||
1328 | __CLAUSE_NO_CLASS(worker) |
||
1329 | __CLAUSE_NO_CLASS(write) |
||
1330 | |||
1331 | #undef __IMPLICIT_CLAUSE_NO_CLASS |
||
1332 | #undef __IMPLICIT_CLAUSE_CLASS |
||
1333 | #undef __CLAUSE |
||
1334 | #undef CLAUSE_NO_CLASS |
||
1335 | #undef CLAUSE_CLASS |
||
1336 | #undef CLAUSE |
||
1337 | |||
1338 | #endif // GEN_CLANG_CLAUSE_CLASS |
||
1339 | |||
1340 | #ifdef GEN_DIRECTIVES_IMPL |
||
1341 | #undef GEN_DIRECTIVES_IMPL |
||
1342 | |||
1343 | Directive llvm::acc::getOpenACCDirectiveKind(llvm::StringRef Str) { |
||
1344 | return llvm::StringSwitch<Directive>(Str) |
||
1345 | .Case("atomic",ACCD_atomic) |
||
1346 | .Case("cache",ACCD_cache) |
||
1347 | .Case("data",ACCD_data) |
||
1348 | .Case("declare",ACCD_declare) |
||
1349 | .Case("enter data",ACCD_enter_data) |
||
1350 | .Case("exit data",ACCD_exit_data) |
||
1351 | .Case("host_data",ACCD_host_data) |
||
1352 | .Case("init",ACCD_init) |
||
1353 | .Case("kernels",ACCD_kernels) |
||
1354 | .Case("kernels loop",ACCD_kernels_loop) |
||
1355 | .Case("loop",ACCD_loop) |
||
1356 | .Case("parallel",ACCD_parallel) |
||
1357 | .Case("parallel loop",ACCD_parallel_loop) |
||
1358 | .Case("routine",ACCD_routine) |
||
1359 | .Case("serial",ACCD_serial) |
||
1360 | .Case("serial loop",ACCD_serial_loop) |
||
1361 | .Case("set",ACCD_set) |
||
1362 | .Case("shutdown",ACCD_shutdown) |
||
1363 | .Case("unknown",ACCD_unknown) |
||
1364 | .Case("update",ACCD_update) |
||
1365 | .Case("wait",ACCD_wait) |
||
1366 | .Default(ACCD_unknown); |
||
1367 | } |
||
1368 | |||
1369 | llvm::StringRef llvm::acc::getOpenACCDirectiveName(Directive Kind) { |
||
1370 | switch (Kind) { |
||
1371 | case ACCD_atomic: |
||
1372 | return "atomic"; |
||
1373 | case ACCD_cache: |
||
1374 | return "cache"; |
||
1375 | case ACCD_data: |
||
1376 | return "data"; |
||
1377 | case ACCD_declare: |
||
1378 | return "declare"; |
||
1379 | case ACCD_enter_data: |
||
1380 | return "enter data"; |
||
1381 | case ACCD_exit_data: |
||
1382 | return "exit data"; |
||
1383 | case ACCD_host_data: |
||
1384 | return "host_data"; |
||
1385 | case ACCD_init: |
||
1386 | return "init"; |
||
1387 | case ACCD_kernels: |
||
1388 | return "kernels"; |
||
1389 | case ACCD_kernels_loop: |
||
1390 | return "kernels loop"; |
||
1391 | case ACCD_loop: |
||
1392 | return "loop"; |
||
1393 | case ACCD_parallel: |
||
1394 | return "parallel"; |
||
1395 | case ACCD_parallel_loop: |
||
1396 | return "parallel loop"; |
||
1397 | case ACCD_routine: |
||
1398 | return "routine"; |
||
1399 | case ACCD_serial: |
||
1400 | return "serial"; |
||
1401 | case ACCD_serial_loop: |
||
1402 | return "serial loop"; |
||
1403 | case ACCD_set: |
||
1404 | return "set"; |
||
1405 | case ACCD_shutdown: |
||
1406 | return "shutdown"; |
||
1407 | case ACCD_unknown: |
||
1408 | return "unknown"; |
||
1409 | case ACCD_update: |
||
1410 | return "update"; |
||
1411 | case ACCD_wait: |
||
1412 | return "wait"; |
||
1413 | } |
||
1414 | llvm_unreachable("Invalid OpenACC Directive kind"); |
||
1415 | } |
||
1416 | |||
1417 | Clause llvm::acc::getOpenACCClauseKind(llvm::StringRef Str) { |
||
1418 | return llvm::StringSwitch<Clause>(Str) |
||
1419 | .Case("async",ACCC_async) |
||
1420 | .Case("attach",ACCC_attach) |
||
1421 | .Case("auto",ACCC_auto) |
||
1422 | .Case("bind",ACCC_bind) |
||
1423 | .Case("capture",ACCC_capture) |
||
1424 | .Case("collapse",ACCC_collapse) |
||
1425 | .Case("copy",ACCC_copy) |
||
1426 | .Case("copyin",ACCC_copyin) |
||
1427 | .Case("copyout",ACCC_copyout) |
||
1428 | .Case("create",ACCC_create) |
||
1429 | .Case("default",ACCC_default) |
||
1430 | .Case("default_async",ACCC_default_async) |
||
1431 | .Case("delete",ACCC_delete) |
||
1432 | .Case("detach",ACCC_detach) |
||
1433 | .Case("device",ACCC_device) |
||
1434 | .Case("device_num",ACCC_device_num) |
||
1435 | .Case("deviceptr",ACCC_deviceptr) |
||
1436 | .Case("device_resident",ACCC_device_resident) |
||
1437 | .Case("device_type",ACCC_device_type) |
||
1438 | .Case("finalize",ACCC_finalize) |
||
1439 | .Case("firstprivate",ACCC_firstprivate) |
||
1440 | .Case("gang",ACCC_gang) |
||
1441 | .Case("host",ACCC_host) |
||
1442 | .Case("if",ACCC_if) |
||
1443 | .Case("if_present",ACCC_if_present) |
||
1444 | .Case("independent",ACCC_independent) |
||
1445 | .Case("link",ACCC_link) |
||
1446 | .Case("no_create",ACCC_no_create) |
||
1447 | .Case("nohost",ACCC_nohost) |
||
1448 | .Case("num_gangs",ACCC_num_gangs) |
||
1449 | .Case("num_workers",ACCC_num_workers) |
||
1450 | .Case("present",ACCC_present) |
||
1451 | .Case("private",ACCC_private) |
||
1452 | .Case("read",ACCC_read) |
||
1453 | .Case("reduction",ACCC_reduction) |
||
1454 | .Case("self",ACCC_self) |
||
1455 | .Case("seq",ACCC_seq) |
||
1456 | .Case("tile",ACCC_tile) |
||
1457 | .Case("unknown",ACCC_unknown) |
||
1458 | .Case("use_device",ACCC_use_device) |
||
1459 | .Case("vector",ACCC_vector) |
||
1460 | .Case("vector_length",ACCC_vector_length) |
||
1461 | .Case("wait",ACCC_wait) |
||
1462 | .Case("worker",ACCC_worker) |
||
1463 | .Case("write",ACCC_write) |
||
1464 | .Default(ACCC_unknown); |
||
1465 | } |
||
1466 | |||
1467 | llvm::StringRef llvm::acc::getOpenACCClauseName(Clause Kind) { |
||
1468 | switch (Kind) { |
||
1469 | case ACCC_async: |
||
1470 | return "async"; |
||
1471 | case ACCC_attach: |
||
1472 | return "attach"; |
||
1473 | case ACCC_auto: |
||
1474 | return "auto"; |
||
1475 | case ACCC_bind: |
||
1476 | return "bind"; |
||
1477 | case ACCC_capture: |
||
1478 | return "capture"; |
||
1479 | case ACCC_collapse: |
||
1480 | return "collapse"; |
||
1481 | case ACCC_copy: |
||
1482 | return "copy"; |
||
1483 | case ACCC_copyin: |
||
1484 | return "copyin"; |
||
1485 | case ACCC_copyout: |
||
1486 | return "copyout"; |
||
1487 | case ACCC_create: |
||
1488 | return "create"; |
||
1489 | case ACCC_default: |
||
1490 | return "default"; |
||
1491 | case ACCC_default_async: |
||
1492 | return "default_async"; |
||
1493 | case ACCC_delete: |
||
1494 | return "delete"; |
||
1495 | case ACCC_detach: |
||
1496 | return "detach"; |
||
1497 | case ACCC_device: |
||
1498 | return "device"; |
||
1499 | case ACCC_device_num: |
||
1500 | return "device_num"; |
||
1501 | case ACCC_deviceptr: |
||
1502 | return "deviceptr"; |
||
1503 | case ACCC_device_resident: |
||
1504 | return "device_resident"; |
||
1505 | case ACCC_device_type: |
||
1506 | return "device_type"; |
||
1507 | case ACCC_finalize: |
||
1508 | return "finalize"; |
||
1509 | case ACCC_firstprivate: |
||
1510 | return "firstprivate"; |
||
1511 | case ACCC_gang: |
||
1512 | return "gang"; |
||
1513 | case ACCC_host: |
||
1514 | return "host"; |
||
1515 | case ACCC_if: |
||
1516 | return "if"; |
||
1517 | case ACCC_if_present: |
||
1518 | return "if_present"; |
||
1519 | case ACCC_independent: |
||
1520 | return "independent"; |
||
1521 | case ACCC_link: |
||
1522 | return "link"; |
||
1523 | case ACCC_no_create: |
||
1524 | return "no_create"; |
||
1525 | case ACCC_nohost: |
||
1526 | return "nohost"; |
||
1527 | case ACCC_num_gangs: |
||
1528 | return "num_gangs"; |
||
1529 | case ACCC_num_workers: |
||
1530 | return "num_workers"; |
||
1531 | case ACCC_present: |
||
1532 | return "present"; |
||
1533 | case ACCC_private: |
||
1534 | return "private"; |
||
1535 | case ACCC_read: |
||
1536 | return "read"; |
||
1537 | case ACCC_reduction: |
||
1538 | return "reduction"; |
||
1539 | case ACCC_self: |
||
1540 | return "self"; |
||
1541 | case ACCC_seq: |
||
1542 | return "seq"; |
||
1543 | case ACCC_tile: |
||
1544 | return "tile"; |
||
1545 | case ACCC_unknown: |
||
1546 | return "unknown"; |
||
1547 | case ACCC_use_device: |
||
1548 | return "use_device"; |
||
1549 | case ACCC_vector: |
||
1550 | return "vector"; |
||
1551 | case ACCC_vector_length: |
||
1552 | return "vector_length"; |
||
1553 | case ACCC_wait: |
||
1554 | return "wait"; |
||
1555 | case ACCC_worker: |
||
1556 | return "worker"; |
||
1557 | case ACCC_write: |
||
1558 | return "write"; |
||
1559 | } |
||
1560 | llvm_unreachable("Invalid OpenACC Clause kind"); |
||
1561 | } |
||
1562 | |||
1563 | DefaultValue llvm::acc::getDefaultValue(llvm::StringRef Str) { |
||
1564 | return llvm::StringSwitch<DefaultValue>(Str) |
||
1565 | .Case("present",ACC_Default_present) |
||
1566 | .Case("none",ACC_Default_none) |
||
1567 | .Default(ACC_Default_none); |
||
1568 | } |
||
1569 | |||
1570 | llvm::StringRef llvm::acc::getOpenACCDefaultValueName(llvm::acc::DefaultValue x) { |
||
1571 | switch (x) { |
||
1572 | case ACC_Default_present: |
||
1573 | return "present"; |
||
1574 | case ACC_Default_none: |
||
1575 | return "none"; |
||
1576 | } |
||
1577 | llvm_unreachable("Invalid OpenACC DefaultValue kind"); |
||
1578 | } |
||
1579 | |||
1580 | bool llvm::acc::isAllowedClauseForDirective(Directive D, Clause C, unsigned Version) { |
||
1581 | assert(unsigned(D) <= llvm::acc::Directive_enumSize); |
||
1582 | assert(unsigned(C) <= llvm::acc::Clause_enumSize); |
||
1583 | switch (D) { |
||
1584 | case ACCD_atomic: |
||
1585 | return false; |
||
1586 | break; |
||
1587 | case ACCD_cache: |
||
1588 | return false; |
||
1589 | break; |
||
1590 | case ACCD_data: |
||
1591 | switch (C) { |
||
1592 | case ACCC_if: |
||
1593 | return 1 <= Version && 2147483647 >= Version; |
||
1594 | case ACCC_default: |
||
1595 | return 1 <= Version && 2147483647 >= Version; |
||
1596 | case ACCC_attach: |
||
1597 | return 1 <= Version && 2147483647 >= Version; |
||
1598 | case ACCC_copy: |
||
1599 | return 1 <= Version && 2147483647 >= Version; |
||
1600 | case ACCC_copyin: |
||
1601 | return 1 <= Version && 2147483647 >= Version; |
||
1602 | case ACCC_copyout: |
||
1603 | return 1 <= Version && 2147483647 >= Version; |
||
1604 | case ACCC_create: |
||
1605 | return 1 <= Version && 2147483647 >= Version; |
||
1606 | case ACCC_deviceptr: |
||
1607 | return 1 <= Version && 2147483647 >= Version; |
||
1608 | case ACCC_no_create: |
||
1609 | return 1 <= Version && 2147483647 >= Version; |
||
1610 | case ACCC_present: |
||
1611 | return 1 <= Version && 2147483647 >= Version; |
||
1612 | default: |
||
1613 | return false; |
||
1614 | } |
||
1615 | break; |
||
1616 | case ACCD_declare: |
||
1617 | switch (C) { |
||
1618 | case ACCC_copy: |
||
1619 | return 1 <= Version && 2147483647 >= Version; |
||
1620 | case ACCC_copyin: |
||
1621 | return 1 <= Version && 2147483647 >= Version; |
||
1622 | case ACCC_copyout: |
||
1623 | return 1 <= Version && 2147483647 >= Version; |
||
1624 | case ACCC_create: |
||
1625 | return 1 <= Version && 2147483647 >= Version; |
||
1626 | case ACCC_present: |
||
1627 | return 1 <= Version && 2147483647 >= Version; |
||
1628 | case ACCC_deviceptr: |
||
1629 | return 1 <= Version && 2147483647 >= Version; |
||
1630 | case ACCC_device_resident: |
||
1631 | return 1 <= Version && 2147483647 >= Version; |
||
1632 | case ACCC_link: |
||
1633 | return 1 <= Version && 2147483647 >= Version; |
||
1634 | default: |
||
1635 | return false; |
||
1636 | } |
||
1637 | break; |
||
1638 | case ACCD_enter_data: |
||
1639 | switch (C) { |
||
1640 | case ACCC_wait: |
||
1641 | return 1 <= Version && 2147483647 >= Version; |
||
1642 | case ACCC_async: |
||
1643 | return 1 <= Version && 2147483647 >= Version; |
||
1644 | case ACCC_if: |
||
1645 | return 1 <= Version && 2147483647 >= Version; |
||
1646 | case ACCC_attach: |
||
1647 | return 1 <= Version && 2147483647 >= Version; |
||
1648 | case ACCC_create: |
||
1649 | return 1 <= Version && 2147483647 >= Version; |
||
1650 | case ACCC_copyin: |
||
1651 | return 1 <= Version && 2147483647 >= Version; |
||
1652 | default: |
||
1653 | return false; |
||
1654 | } |
||
1655 | break; |
||
1656 | case ACCD_exit_data: |
||
1657 | switch (C) { |
||
1658 | case ACCC_wait: |
||
1659 | return 1 <= Version && 2147483647 >= Version; |
||
1660 | case ACCC_async: |
||
1661 | return 1 <= Version && 2147483647 >= Version; |
||
1662 | case ACCC_if: |
||
1663 | return 1 <= Version && 2147483647 >= Version; |
||
1664 | case ACCC_finalize: |
||
1665 | return 1 <= Version && 2147483647 >= Version; |
||
1666 | case ACCC_copyout: |
||
1667 | return 1 <= Version && 2147483647 >= Version; |
||
1668 | case ACCC_delete: |
||
1669 | return 1 <= Version && 2147483647 >= Version; |
||
1670 | case ACCC_detach: |
||
1671 | return 1 <= Version && 2147483647 >= Version; |
||
1672 | default: |
||
1673 | return false; |
||
1674 | } |
||
1675 | break; |
||
1676 | case ACCD_host_data: |
||
1677 | switch (C) { |
||
1678 | case ACCC_if: |
||
1679 | return 1 <= Version && 2147483647 >= Version; |
||
1680 | case ACCC_if_present: |
||
1681 | return 1 <= Version && 2147483647 >= Version; |
||
1682 | case ACCC_use_device: |
||
1683 | return 1 <= Version && 2147483647 >= Version; |
||
1684 | default: |
||
1685 | return false; |
||
1686 | } |
||
1687 | break; |
||
1688 | case ACCD_init: |
||
1689 | switch (C) { |
||
1690 | case ACCC_device_num: |
||
1691 | return 1 <= Version && 2147483647 >= Version; |
||
1692 | case ACCC_device_type: |
||
1693 | return 1 <= Version && 2147483647 >= Version; |
||
1694 | case ACCC_if: |
||
1695 | return 1 <= Version && 2147483647 >= Version; |
||
1696 | default: |
||
1697 | return false; |
||
1698 | } |
||
1699 | break; |
||
1700 | case ACCD_kernels: |
||
1701 | switch (C) { |
||
1702 | case ACCC_attach: |
||
1703 | return 1 <= Version && 2147483647 >= Version; |
||
1704 | case ACCC_copy: |
||
1705 | return 1 <= Version && 2147483647 >= Version; |
||
1706 | case ACCC_copyin: |
||
1707 | return 1 <= Version && 2147483647 >= Version; |
||
1708 | case ACCC_copyout: |
||
1709 | return 1 <= Version && 2147483647 >= Version; |
||
1710 | case ACCC_create: |
||
1711 | return 1 <= Version && 2147483647 >= Version; |
||
1712 | case ACCC_device_type: |
||
1713 | return 1 <= Version && 2147483647 >= Version; |
||
1714 | case ACCC_no_create: |
||
1715 | return 1 <= Version && 2147483647 >= Version; |
||
1716 | case ACCC_present: |
||
1717 | return 1 <= Version && 2147483647 >= Version; |
||
1718 | case ACCC_deviceptr: |
||
1719 | return 1 <= Version && 2147483647 >= Version; |
||
1720 | case ACCC_wait: |
||
1721 | return 1 <= Version && 2147483647 >= Version; |
||
1722 | case ACCC_async: |
||
1723 | return 1 <= Version && 2147483647 >= Version; |
||
1724 | case ACCC_default: |
||
1725 | return 1 <= Version && 2147483647 >= Version; |
||
1726 | case ACCC_if: |
||
1727 | return 1 <= Version && 2147483647 >= Version; |
||
1728 | case ACCC_num_gangs: |
||
1729 | return 1 <= Version && 2147483647 >= Version; |
||
1730 | case ACCC_num_workers: |
||
1731 | return 1 <= Version && 2147483647 >= Version; |
||
1732 | case ACCC_self: |
||
1733 | return 1 <= Version && 2147483647 >= Version; |
||
1734 | case ACCC_vector_length: |
||
1735 | return 1 <= Version && 2147483647 >= Version; |
||
1736 | default: |
||
1737 | return false; |
||
1738 | } |
||
1739 | break; |
||
1740 | case ACCD_kernels_loop: |
||
1741 | switch (C) { |
||
1742 | case ACCC_copy: |
||
1743 | return 1 <= Version && 2147483647 >= Version; |
||
1744 | case ACCC_copyin: |
||
1745 | return 1 <= Version && 2147483647 >= Version; |
||
1746 | case ACCC_copyout: |
||
1747 | return 1 <= Version && 2147483647 >= Version; |
||
1748 | case ACCC_create: |
||
1749 | return 1 <= Version && 2147483647 >= Version; |
||
1750 | case ACCC_device_type: |
||
1751 | return 1 <= Version && 2147483647 >= Version; |
||
1752 | case ACCC_no_create: |
||
1753 | return 1 <= Version && 2147483647 >= Version; |
||
1754 | case ACCC_present: |
||
1755 | return 1 <= Version && 2147483647 >= Version; |
||
1756 | case ACCC_private: |
||
1757 | return 1 <= Version && 2147483647 >= Version; |
||
1758 | case ACCC_deviceptr: |
||
1759 | return 1 <= Version && 2147483647 >= Version; |
||
1760 | case ACCC_attach: |
||
1761 | return 1 <= Version && 2147483647 >= Version; |
||
1762 | case ACCC_wait: |
||
1763 | return 1 <= Version && 2147483647 >= Version; |
||
1764 | case ACCC_async: |
||
1765 | return 1 <= Version && 2147483647 >= Version; |
||
1766 | case ACCC_collapse: |
||
1767 | return 1 <= Version && 2147483647 >= Version; |
||
1768 | case ACCC_default: |
||
1769 | return 1 <= Version && 2147483647 >= Version; |
||
1770 | case ACCC_gang: |
||
1771 | return 1 <= Version && 2147483647 >= Version; |
||
1772 | case ACCC_if: |
||
1773 | return 1 <= Version && 2147483647 >= Version; |
||
1774 | case ACCC_num_gangs: |
||
1775 | return 1 <= Version && 2147483647 >= Version; |
||
1776 | case ACCC_num_workers: |
||
1777 | return 1 <= Version && 2147483647 >= Version; |
||
1778 | case ACCC_reduction: |
||
1779 | return 1 <= Version && 2147483647 >= Version; |
||
1780 | case ACCC_self: |
||
1781 | return 1 <= Version && 2147483647 >= Version; |
||
1782 | case ACCC_tile: |
||
1783 | return 1 <= Version && 2147483647 >= Version; |
||
1784 | case ACCC_vector: |
||
1785 | return 1 <= Version && 2147483647 >= Version; |
||
1786 | case ACCC_vector_length: |
||
1787 | return 1 <= Version && 2147483647 >= Version; |
||
1788 | case ACCC_worker: |
||
1789 | return 1 <= Version && 2147483647 >= Version; |
||
1790 | case ACCC_auto: |
||
1791 | return 1 <= Version && 2147483647 >= Version; |
||
1792 | case ACCC_independent: |
||
1793 | return 1 <= Version && 2147483647 >= Version; |
||
1794 | case ACCC_seq: |
||
1795 | return 1 <= Version && 2147483647 >= Version; |
||
1796 | default: |
||
1797 | return false; |
||
1798 | } |
||
1799 | break; |
||
1800 | case ACCD_loop: |
||
1801 | switch (C) { |
||
1802 | case ACCC_device_type: |
||
1803 | return 1 <= Version && 2147483647 >= Version; |
||
1804 | case ACCC_private: |
||
1805 | return 1 <= Version && 2147483647 >= Version; |
||
1806 | case ACCC_collapse: |
||
1807 | return 1 <= Version && 2147483647 >= Version; |
||
1808 | case ACCC_gang: |
||
1809 | return 1 <= Version && 2147483647 >= Version; |
||
1810 | case ACCC_reduction: |
||
1811 | return 1 <= Version && 2147483647 >= Version; |
||
1812 | case ACCC_tile: |
||
1813 | return 1 <= Version && 2147483647 >= Version; |
||
1814 | case ACCC_vector: |
||
1815 | return 1 <= Version && 2147483647 >= Version; |
||
1816 | case ACCC_worker: |
||
1817 | return 1 <= Version && 2147483647 >= Version; |
||
1818 | case ACCC_auto: |
||
1819 | return 1 <= Version && 2147483647 >= Version; |
||
1820 | case ACCC_independent: |
||
1821 | return 1 <= Version && 2147483647 >= Version; |
||
1822 | case ACCC_seq: |
||
1823 | return 1 <= Version && 2147483647 >= Version; |
||
1824 | default: |
||
1825 | return false; |
||
1826 | } |
||
1827 | break; |
||
1828 | case ACCD_parallel: |
||
1829 | switch (C) { |
||
1830 | case ACCC_attach: |
||
1831 | return 1 <= Version && 2147483647 >= Version; |
||
1832 | case ACCC_copy: |
||
1833 | return 1 <= Version && 2147483647 >= Version; |
||
1834 | case ACCC_copyin: |
||
1835 | return 1 <= Version && 2147483647 >= Version; |
||
1836 | case ACCC_copyout: |
||
1837 | return 1 <= Version && 2147483647 >= Version; |
||
1838 | case ACCC_create: |
||
1839 | return 1 <= Version && 2147483647 >= Version; |
||
1840 | case ACCC_deviceptr: |
||
1841 | return 1 <= Version && 2147483647 >= Version; |
||
1842 | case ACCC_device_type: |
||
1843 | return 1 <= Version && 2147483647 >= Version; |
||
1844 | case ACCC_no_create: |
||
1845 | return 1 <= Version && 2147483647 >= Version; |
||
1846 | case ACCC_present: |
||
1847 | return 1 <= Version && 2147483647 >= Version; |
||
1848 | case ACCC_private: |
||
1849 | return 1 <= Version && 2147483647 >= Version; |
||
1850 | case ACCC_firstprivate: |
||
1851 | return 1 <= Version && 2147483647 >= Version; |
||
1852 | case ACCC_wait: |
||
1853 | return 1 <= Version && 2147483647 >= Version; |
||
1854 | case ACCC_async: |
||
1855 | return 1 <= Version && 2147483647 >= Version; |
||
1856 | case ACCC_default: |
||
1857 | return 1 <= Version && 2147483647 >= Version; |
||
1858 | case ACCC_if: |
||
1859 | return 1 <= Version && 2147483647 >= Version; |
||
1860 | case ACCC_num_gangs: |
||
1861 | return 1 <= Version && 2147483647 >= Version; |
||
1862 | case ACCC_num_workers: |
||
1863 | return 1 <= Version && 2147483647 >= Version; |
||
1864 | case ACCC_reduction: |
||
1865 | return 1 <= Version && 2147483647 >= Version; |
||
1866 | case ACCC_self: |
||
1867 | return 1 <= Version && 2147483647 >= Version; |
||
1868 | case ACCC_vector_length: |
||
1869 | return 1 <= Version && 2147483647 >= Version; |
||
1870 | default: |
||
1871 | return false; |
||
1872 | } |
||
1873 | break; |
||
1874 | case ACCD_parallel_loop: |
||
1875 | switch (C) { |
||
1876 | case ACCC_attach: |
||
1877 | return 1 <= Version && 2147483647 >= Version; |
||
1878 | case ACCC_copy: |
||
1879 | return 1 <= Version && 2147483647 >= Version; |
||
1880 | case ACCC_copyin: |
||
1881 | return 1 <= Version && 2147483647 >= Version; |
||
1882 | case ACCC_copyout: |
||
1883 | return 1 <= Version && 2147483647 >= Version; |
||
1884 | case ACCC_create: |
||
1885 | return 1 <= Version && 2147483647 >= Version; |
||
1886 | case ACCC_deviceptr: |
||
1887 | return 1 <= Version && 2147483647 >= Version; |
||
1888 | case ACCC_device_type: |
||
1889 | return 1 <= Version && 2147483647 >= Version; |
||
1890 | case ACCC_firstprivate: |
||
1891 | return 1 <= Version && 2147483647 >= Version; |
||
1892 | case ACCC_no_create: |
||
1893 | return 1 <= Version && 2147483647 >= Version; |
||
1894 | case ACCC_present: |
||
1895 | return 1 <= Version && 2147483647 >= Version; |
||
1896 | case ACCC_private: |
||
1897 | return 1 <= Version && 2147483647 >= Version; |
||
1898 | case ACCC_tile: |
||
1899 | return 1 <= Version && 2147483647 >= Version; |
||
1900 | case ACCC_wait: |
||
1901 | return 1 <= Version && 2147483647 >= Version; |
||
1902 | case ACCC_async: |
||
1903 | return 1 <= Version && 2147483647 >= Version; |
||
1904 | case ACCC_collapse: |
||
1905 | return 1 <= Version && 2147483647 >= Version; |
||
1906 | case ACCC_default: |
||
1907 | return 1 <= Version && 2147483647 >= Version; |
||
1908 | case ACCC_gang: |
||
1909 | return 1 <= Version && 2147483647 >= Version; |
||
1910 | case ACCC_if: |
||
1911 | return 1 <= Version && 2147483647 >= Version; |
||
1912 | case ACCC_num_gangs: |
||
1913 | return 1 <= Version && 2147483647 >= Version; |
||
1914 | case ACCC_num_workers: |
||
1915 | return 1 <= Version && 2147483647 >= Version; |
||
1916 | case ACCC_reduction: |
||
1917 | return 1 <= Version && 2147483647 >= Version; |
||
1918 | case ACCC_self: |
||
1919 | return 1 <= Version && 2147483647 >= Version; |
||
1920 | case ACCC_vector: |
||
1921 | return 1 <= Version && 2147483647 >= Version; |
||
1922 | case ACCC_vector_length: |
||
1923 | return 1 <= Version && 2147483647 >= Version; |
||
1924 | case ACCC_worker: |
||
1925 | return 1 <= Version && 2147483647 >= Version; |
||
1926 | case ACCC_auto: |
||
1927 | return 1 <= Version && 2147483647 >= Version; |
||
1928 | case ACCC_independent: |
||
1929 | return 1 <= Version && 2147483647 >= Version; |
||
1930 | case ACCC_seq: |
||
1931 | return 1 <= Version && 2147483647 >= Version; |
||
1932 | default: |
||
1933 | return false; |
||
1934 | } |
||
1935 | break; |
||
1936 | case ACCD_routine: |
||
1937 | switch (C) { |
||
1938 | case ACCC_bind: |
||
1939 | return 1 <= Version && 2147483647 >= Version; |
||
1940 | case ACCC_device_type: |
||
1941 | return 1 <= Version && 2147483647 >= Version; |
||
1942 | case ACCC_nohost: |
||
1943 | return 1 <= Version && 2147483647 >= Version; |
||
1944 | case ACCC_gang: |
||
1945 | return 1 <= Version && 2147483647 >= Version; |
||
1946 | case ACCC_seq: |
||
1947 | return 1 <= Version && 2147483647 >= Version; |
||
1948 | case ACCC_vector: |
||
1949 | return 1 <= Version && 2147483647 >= Version; |
||
1950 | case ACCC_worker: |
||
1951 | return 1 <= Version && 2147483647 >= Version; |
||
1952 | default: |
||
1953 | return false; |
||
1954 | } |
||
1955 | break; |
||
1956 | case ACCD_serial: |
||
1957 | switch (C) { |
||
1958 | case ACCC_attach: |
||
1959 | return 1 <= Version && 2147483647 >= Version; |
||
1960 | case ACCC_copy: |
||
1961 | return 1 <= Version && 2147483647 >= Version; |
||
1962 | case ACCC_copyin: |
||
1963 | return 1 <= Version && 2147483647 >= Version; |
||
1964 | case ACCC_copyout: |
||
1965 | return 1 <= Version && 2147483647 >= Version; |
||
1966 | case ACCC_create: |
||
1967 | return 1 <= Version && 2147483647 >= Version; |
||
1968 | case ACCC_deviceptr: |
||
1969 | return 1 <= Version && 2147483647 >= Version; |
||
1970 | case ACCC_device_type: |
||
1971 | return 1 <= Version && 2147483647 >= Version; |
||
1972 | case ACCC_no_create: |
||
1973 | return 1 <= Version && 2147483647 >= Version; |
||
1974 | case ACCC_present: |
||
1975 | return 1 <= Version && 2147483647 >= Version; |
||
1976 | case ACCC_private: |
||
1977 | return 1 <= Version && 2147483647 >= Version; |
||
1978 | case ACCC_firstprivate: |
||
1979 | return 1 <= Version && 2147483647 >= Version; |
||
1980 | case ACCC_wait: |
||
1981 | return 1 <= Version && 2147483647 >= Version; |
||
1982 | case ACCC_async: |
||
1983 | return 1 <= Version && 2147483647 >= Version; |
||
1984 | case ACCC_default: |
||
1985 | return 1 <= Version && 2147483647 >= Version; |
||
1986 | case ACCC_if: |
||
1987 | return 1 <= Version && 2147483647 >= Version; |
||
1988 | case ACCC_reduction: |
||
1989 | return 1 <= Version && 2147483647 >= Version; |
||
1990 | case ACCC_self: |
||
1991 | return 1 <= Version && 2147483647 >= Version; |
||
1992 | default: |
||
1993 | return false; |
||
1994 | } |
||
1995 | break; |
||
1996 | case ACCD_serial_loop: |
||
1997 | switch (C) { |
||
1998 | case ACCC_attach: |
||
1999 | return 1 <= Version && 2147483647 >= Version; |
||
2000 | case ACCC_copy: |
||
2001 | return 1 <= Version && 2147483647 >= Version; |
||
2002 | case ACCC_copyin: |
||
2003 | return 1 <= Version && 2147483647 >= Version; |
||
2004 | case ACCC_copyout: |
||
2005 | return 1 <= Version && 2147483647 >= Version; |
||
2006 | case ACCC_create: |
||
2007 | return 1 <= Version && 2147483647 >= Version; |
||
2008 | case ACCC_deviceptr: |
||
2009 | return 1 <= Version && 2147483647 >= Version; |
||
2010 | case ACCC_device_type: |
||
2011 | return 1 <= Version && 2147483647 >= Version; |
||
2012 | case ACCC_firstprivate: |
||
2013 | return 1 <= Version && 2147483647 >= Version; |
||
2014 | case ACCC_no_create: |
||
2015 | return 1 <= Version && 2147483647 >= Version; |
||
2016 | case ACCC_present: |
||
2017 | return 1 <= Version && 2147483647 >= Version; |
||
2018 | case ACCC_private: |
||
2019 | return 1 <= Version && 2147483647 >= Version; |
||
2020 | case ACCC_wait: |
||
2021 | return 1 <= Version && 2147483647 >= Version; |
||
2022 | case ACCC_async: |
||
2023 | return 1 <= Version && 2147483647 >= Version; |
||
2024 | case ACCC_collapse: |
||
2025 | return 1 <= Version && 2147483647 >= Version; |
||
2026 | case ACCC_default: |
||
2027 | return 1 <= Version && 2147483647 >= Version; |
||
2028 | case ACCC_gang: |
||
2029 | return 1 <= Version && 2147483647 >= Version; |
||
2030 | case ACCC_if: |
||
2031 | return 1 <= Version && 2147483647 >= Version; |
||
2032 | case ACCC_reduction: |
||
2033 | return 1 <= Version && 2147483647 >= Version; |
||
2034 | case ACCC_self: |
||
2035 | return 1 <= Version && 2147483647 >= Version; |
||
2036 | case ACCC_tile: |
||
2037 | return 1 <= Version && 2147483647 >= Version; |
||
2038 | case ACCC_vector: |
||
2039 | return 1 <= Version && 2147483647 >= Version; |
||
2040 | case ACCC_worker: |
||
2041 | return 1 <= Version && 2147483647 >= Version; |
||
2042 | case ACCC_auto: |
||
2043 | return 1 <= Version && 2147483647 >= Version; |
||
2044 | case ACCC_independent: |
||
2045 | return 1 <= Version && 2147483647 >= Version; |
||
2046 | case ACCC_seq: |
||
2047 | return 1 <= Version && 2147483647 >= Version; |
||
2048 | default: |
||
2049 | return false; |
||
2050 | } |
||
2051 | break; |
||
2052 | case ACCD_set: |
||
2053 | switch (C) { |
||
2054 | case ACCC_default_async: |
||
2055 | return 1 <= Version && 2147483647 >= Version; |
||
2056 | case ACCC_device_num: |
||
2057 | return 1 <= Version && 2147483647 >= Version; |
||
2058 | case ACCC_device_type: |
||
2059 | return 1 <= Version && 2147483647 >= Version; |
||
2060 | case ACCC_if: |
||
2061 | return 1 <= Version && 2147483647 >= Version; |
||
2062 | default: |
||
2063 | return false; |
||
2064 | } |
||
2065 | break; |
||
2066 | case ACCD_shutdown: |
||
2067 | switch (C) { |
||
2068 | case ACCC_device_num: |
||
2069 | return 1 <= Version && 2147483647 >= Version; |
||
2070 | case ACCC_device_type: |
||
2071 | return 1 <= Version && 2147483647 >= Version; |
||
2072 | case ACCC_if: |
||
2073 | return 1 <= Version && 2147483647 >= Version; |
||
2074 | default: |
||
2075 | return false; |
||
2076 | } |
||
2077 | break; |
||
2078 | case ACCD_unknown: |
||
2079 | return false; |
||
2080 | break; |
||
2081 | case ACCD_update: |
||
2082 | switch (C) { |
||
2083 | case ACCC_device_type: |
||
2084 | return 1 <= Version && 2147483647 >= Version; |
||
2085 | case ACCC_wait: |
||
2086 | return 1 <= Version && 2147483647 >= Version; |
||
2087 | case ACCC_async: |
||
2088 | return 1 <= Version && 2147483647 >= Version; |
||
2089 | case ACCC_if: |
||
2090 | return 1 <= Version && 2147483647 >= Version; |
||
2091 | case ACCC_if_present: |
||
2092 | return 1 <= Version && 2147483647 >= Version; |
||
2093 | case ACCC_device: |
||
2094 | return 1 <= Version && 2147483647 >= Version; |
||
2095 | case ACCC_host: |
||
2096 | return 1 <= Version && 2147483647 >= Version; |
||
2097 | case ACCC_self: |
||
2098 | return 1 <= Version && 2147483647 >= Version; |
||
2099 | default: |
||
2100 | return false; |
||
2101 | } |
||
2102 | break; |
||
2103 | case ACCD_wait: |
||
2104 | switch (C) { |
||
2105 | case ACCC_async: |
||
2106 | return 1 <= Version && 2147483647 >= Version; |
||
2107 | case ACCC_if: |
||
2108 | return 1 <= Version && 2147483647 >= Version; |
||
2109 | default: |
||
2110 | return false; |
||
2111 | } |
||
2112 | break; |
||
2113 | } |
||
2114 | llvm_unreachable("Invalid OpenACC Directive kind"); |
||
2115 | } |
||
2116 | |||
2117 | #endif // GEN_DIRECTIVES_IMPL |
||
2118 |