1 | #ifndef LLVM_OpenMP_INC |
2 | #define LLVM_OpenMP_INC |
3 | |
4 | #include "llvm/ADT/ArrayRef.h" |
5 | #include "llvm/ADT/BitmaskEnum.h" |
6 | #include <cstddef> |
7 | |
8 | namespace llvm { |
9 | class StringRef; |
10 | namespace omp { |
11 | |
12 | LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE(); |
13 | |
14 | enum class Association { |
15 | Block, |
16 | Declaration, |
17 | Delimited, |
18 | Loop, |
19 | None, |
20 | Separating, |
21 | }; |
22 | |
23 | static constexpr std::size_t Association_enumSize = 6; |
24 | |
25 | enum class Category { |
26 | Declarative, |
27 | Executable, |
28 | Informational, |
29 | Meta, |
30 | Subsidiary, |
31 | Utility, |
32 | }; |
33 | |
34 | static constexpr std::size_t Category_enumSize = 6; |
35 | |
36 | enum class Directive { |
37 | OMPD_allocate, |
38 | OMPD_allocators, |
39 | OMPD_assumes, |
40 | OMPD_atomic, |
41 | OMPD_barrier, |
42 | OMPD_begin_assumes, |
43 | OMPD_begin_declare_target, |
44 | OMPD_begin_declare_variant, |
45 | OMPD_cancel, |
46 | OMPD_cancellation_point, |
47 | OMPD_critical, |
48 | OMPD_declare_mapper, |
49 | OMPD_declare_reduction, |
50 | OMPD_declare_simd, |
51 | OMPD_declare_target, |
52 | OMPD_declare_variant, |
53 | OMPD_depobj, |
54 | OMPD_distribute, |
55 | OMPD_distribute_parallel_do, |
56 | OMPD_distribute_parallel_do_simd, |
57 | OMPD_distribute_parallel_for, |
58 | OMPD_distribute_parallel_for_simd, |
59 | OMPD_distribute_simd, |
60 | OMPD_do, |
61 | OMPD_do_simd, |
62 | OMPD_end_assumes, |
63 | OMPD_end_declare_target, |
64 | OMPD_end_declare_variant, |
65 | OMPD_end_do, |
66 | OMPD_end_do_simd, |
67 | OMPD_end_sections, |
68 | OMPD_end_single, |
69 | OMPD_end_workshare, |
70 | OMPD_error, |
71 | OMPD_flush, |
72 | OMPD_for, |
73 | OMPD_for_simd, |
74 | OMPD_interchange, |
75 | OMPD_masked_taskloop, |
76 | OMPD_masked_taskloop_simd, |
77 | OMPD_master, |
78 | OMPD_master_taskloop, |
79 | OMPD_master_taskloop_simd, |
80 | OMPD_metadirective, |
81 | OMPD_nothing, |
82 | OMPD_ordered, |
83 | OMPD_parallel, |
84 | OMPD_parallel_do, |
85 | OMPD_parallel_do_simd, |
86 | OMPD_parallel_for, |
87 | OMPD_parallel_for_simd, |
88 | OMPD_parallel_masked, |
89 | OMPD_parallel_masked_taskloop, |
90 | OMPD_parallel_masked_taskloop_simd, |
91 | OMPD_parallel_master, |
92 | OMPD_parallel_master_taskloop, |
93 | OMPD_parallel_master_taskloop_simd, |
94 | OMPD_parallel_sections, |
95 | OMPD_parallel_workshare, |
96 | OMPD_requires, |
97 | OMPD_reverse, |
98 | OMPD_scan, |
99 | OMPD_section, |
100 | OMPD_sections, |
101 | OMPD_simd, |
102 | OMPD_single, |
103 | OMPD_target, |
104 | OMPD_target_data, |
105 | OMPD_target_enter_data, |
106 | OMPD_target_exit_data, |
107 | OMPD_target_parallel, |
108 | OMPD_target_parallel_do, |
109 | OMPD_target_parallel_do_simd, |
110 | OMPD_target_parallel_for, |
111 | OMPD_target_parallel_for_simd, |
112 | OMPD_target_simd, |
113 | OMPD_target_teams, |
114 | OMPD_target_teams_distribute, |
115 | OMPD_target_teams_distribute_parallel_do, |
116 | OMPD_target_teams_distribute_parallel_do_simd, |
117 | OMPD_target_teams_distribute_parallel_for, |
118 | OMPD_target_teams_distribute_parallel_for_simd, |
119 | OMPD_target_teams_distribute_simd, |
120 | OMPD_target_update, |
121 | OMPD_task, |
122 | OMPD_taskgroup, |
123 | OMPD_taskloop, |
124 | OMPD_taskloop_simd, |
125 | OMPD_taskwait, |
126 | OMPD_taskyield, |
127 | OMPD_teams, |
128 | OMPD_teams_distribute, |
129 | OMPD_teams_distribute_parallel_do, |
130 | OMPD_teams_distribute_parallel_do_simd, |
131 | OMPD_teams_distribute_parallel_for, |
132 | OMPD_teams_distribute_parallel_for_simd, |
133 | OMPD_teams_distribute_simd, |
134 | OMPD_threadprivate, |
135 | OMPD_tile, |
136 | OMPD_unknown, |
137 | OMPD_unroll, |
138 | OMPD_workshare, |
139 | OMPD_dispatch, |
140 | OMPD_interop, |
141 | OMPD_loop, |
142 | OMPD_masked, |
143 | OMPD_parallel_loop, |
144 | OMPD_scope, |
145 | OMPD_target_loop, |
146 | OMPD_target_parallel_loop, |
147 | OMPD_target_teams_loop, |
148 | OMPD_teams_loop, |
149 | }; |
150 | |
151 | static constexpr std::size_t Directive_enumSize = 112; |
152 | |
153 | constexpr auto OMPD_allocate = llvm::omp::Directive::OMPD_allocate; |
154 | constexpr auto OMPD_allocators = llvm::omp::Directive::OMPD_allocators; |
155 | constexpr auto OMPD_assumes = llvm::omp::Directive::OMPD_assumes; |
156 | constexpr auto OMPD_atomic = llvm::omp::Directive::OMPD_atomic; |
157 | constexpr auto OMPD_barrier = llvm::omp::Directive::OMPD_barrier; |
158 | constexpr auto OMPD_begin_assumes = llvm::omp::Directive::OMPD_begin_assumes; |
159 | constexpr auto OMPD_begin_declare_target = llvm::omp::Directive::OMPD_begin_declare_target; |
160 | constexpr auto OMPD_begin_declare_variant = llvm::omp::Directive::OMPD_begin_declare_variant; |
161 | constexpr auto OMPD_cancel = llvm::omp::Directive::OMPD_cancel; |
162 | constexpr auto OMPD_cancellation_point = llvm::omp::Directive::OMPD_cancellation_point; |
163 | constexpr auto OMPD_critical = llvm::omp::Directive::OMPD_critical; |
164 | constexpr auto OMPD_declare_mapper = llvm::omp::Directive::OMPD_declare_mapper; |
165 | constexpr auto OMPD_declare_reduction = llvm::omp::Directive::OMPD_declare_reduction; |
166 | constexpr auto OMPD_declare_simd = llvm::omp::Directive::OMPD_declare_simd; |
167 | constexpr auto OMPD_declare_target = llvm::omp::Directive::OMPD_declare_target; |
168 | constexpr auto OMPD_declare_variant = llvm::omp::Directive::OMPD_declare_variant; |
169 | constexpr auto OMPD_depobj = llvm::omp::Directive::OMPD_depobj; |
170 | constexpr auto OMPD_distribute = llvm::omp::Directive::OMPD_distribute; |
171 | constexpr auto OMPD_distribute_parallel_do = llvm::omp::Directive::OMPD_distribute_parallel_do; |
172 | constexpr auto OMPD_distribute_parallel_do_simd = llvm::omp::Directive::OMPD_distribute_parallel_do_simd; |
173 | constexpr auto OMPD_distribute_parallel_for = llvm::omp::Directive::OMPD_distribute_parallel_for; |
174 | constexpr auto OMPD_distribute_parallel_for_simd = llvm::omp::Directive::OMPD_distribute_parallel_for_simd; |
175 | constexpr auto OMPD_distribute_simd = llvm::omp::Directive::OMPD_distribute_simd; |
176 | constexpr auto OMPD_do = llvm::omp::Directive::OMPD_do; |
177 | constexpr auto OMPD_do_simd = llvm::omp::Directive::OMPD_do_simd; |
178 | constexpr auto OMPD_end_assumes = llvm::omp::Directive::OMPD_end_assumes; |
179 | constexpr auto OMPD_end_declare_target = llvm::omp::Directive::OMPD_end_declare_target; |
180 | constexpr auto OMPD_end_declare_variant = llvm::omp::Directive::OMPD_end_declare_variant; |
181 | constexpr auto OMPD_end_do = llvm::omp::Directive::OMPD_end_do; |
182 | constexpr auto OMPD_end_do_simd = llvm::omp::Directive::OMPD_end_do_simd; |
183 | constexpr auto OMPD_end_sections = llvm::omp::Directive::OMPD_end_sections; |
184 | constexpr auto OMPD_end_single = llvm::omp::Directive::OMPD_end_single; |
185 | constexpr auto OMPD_end_workshare = llvm::omp::Directive::OMPD_end_workshare; |
186 | constexpr auto OMPD_error = llvm::omp::Directive::OMPD_error; |
187 | constexpr auto OMPD_flush = llvm::omp::Directive::OMPD_flush; |
188 | constexpr auto OMPD_for = llvm::omp::Directive::OMPD_for; |
189 | constexpr auto OMPD_for_simd = llvm::omp::Directive::OMPD_for_simd; |
190 | constexpr auto OMPD_interchange = llvm::omp::Directive::OMPD_interchange; |
191 | constexpr auto OMPD_masked_taskloop = llvm::omp::Directive::OMPD_masked_taskloop; |
192 | constexpr auto OMPD_masked_taskloop_simd = llvm::omp::Directive::OMPD_masked_taskloop_simd; |
193 | constexpr auto OMPD_master = llvm::omp::Directive::OMPD_master; |
194 | constexpr auto OMPD_master_taskloop = llvm::omp::Directive::OMPD_master_taskloop; |
195 | constexpr auto OMPD_master_taskloop_simd = llvm::omp::Directive::OMPD_master_taskloop_simd; |
196 | constexpr auto OMPD_metadirective = llvm::omp::Directive::OMPD_metadirective; |
197 | constexpr auto OMPD_nothing = llvm::omp::Directive::OMPD_nothing; |
198 | constexpr auto OMPD_ordered = llvm::omp::Directive::OMPD_ordered; |
199 | constexpr auto OMPD_parallel = llvm::omp::Directive::OMPD_parallel; |
200 | constexpr auto OMPD_parallel_do = llvm::omp::Directive::OMPD_parallel_do; |
201 | constexpr auto OMPD_parallel_do_simd = llvm::omp::Directive::OMPD_parallel_do_simd; |
202 | constexpr auto OMPD_parallel_for = llvm::omp::Directive::OMPD_parallel_for; |
203 | constexpr auto OMPD_parallel_for_simd = llvm::omp::Directive::OMPD_parallel_for_simd; |
204 | constexpr auto OMPD_parallel_masked = llvm::omp::Directive::OMPD_parallel_masked; |
205 | constexpr auto OMPD_parallel_masked_taskloop = llvm::omp::Directive::OMPD_parallel_masked_taskloop; |
206 | constexpr auto OMPD_parallel_masked_taskloop_simd = llvm::omp::Directive::OMPD_parallel_masked_taskloop_simd; |
207 | constexpr auto OMPD_parallel_master = llvm::omp::Directive::OMPD_parallel_master; |
208 | constexpr auto OMPD_parallel_master_taskloop = llvm::omp::Directive::OMPD_parallel_master_taskloop; |
209 | constexpr auto OMPD_parallel_master_taskloop_simd = llvm::omp::Directive::OMPD_parallel_master_taskloop_simd; |
210 | constexpr auto OMPD_parallel_sections = llvm::omp::Directive::OMPD_parallel_sections; |
211 | constexpr auto OMPD_parallel_workshare = llvm::omp::Directive::OMPD_parallel_workshare; |
212 | constexpr auto OMPD_requires = llvm::omp::Directive::OMPD_requires; |
213 | constexpr auto OMPD_reverse = llvm::omp::Directive::OMPD_reverse; |
214 | constexpr auto OMPD_scan = llvm::omp::Directive::OMPD_scan; |
215 | constexpr auto OMPD_section = llvm::omp::Directive::OMPD_section; |
216 | constexpr auto OMPD_sections = llvm::omp::Directive::OMPD_sections; |
217 | constexpr auto OMPD_simd = llvm::omp::Directive::OMPD_simd; |
218 | constexpr auto OMPD_single = llvm::omp::Directive::OMPD_single; |
219 | constexpr auto OMPD_target = llvm::omp::Directive::OMPD_target; |
220 | constexpr auto OMPD_target_data = llvm::omp::Directive::OMPD_target_data; |
221 | constexpr auto OMPD_target_enter_data = llvm::omp::Directive::OMPD_target_enter_data; |
222 | constexpr auto OMPD_target_exit_data = llvm::omp::Directive::OMPD_target_exit_data; |
223 | constexpr auto OMPD_target_parallel = llvm::omp::Directive::OMPD_target_parallel; |
224 | constexpr auto OMPD_target_parallel_do = llvm::omp::Directive::OMPD_target_parallel_do; |
225 | constexpr auto OMPD_target_parallel_do_simd = llvm::omp::Directive::OMPD_target_parallel_do_simd; |
226 | constexpr auto OMPD_target_parallel_for = llvm::omp::Directive::OMPD_target_parallel_for; |
227 | constexpr auto OMPD_target_parallel_for_simd = llvm::omp::Directive::OMPD_target_parallel_for_simd; |
228 | constexpr auto OMPD_target_simd = llvm::omp::Directive::OMPD_target_simd; |
229 | constexpr auto OMPD_target_teams = llvm::omp::Directive::OMPD_target_teams; |
230 | constexpr auto OMPD_target_teams_distribute = llvm::omp::Directive::OMPD_target_teams_distribute; |
231 | constexpr auto OMPD_target_teams_distribute_parallel_do = llvm::omp::Directive::OMPD_target_teams_distribute_parallel_do; |
232 | constexpr auto OMPD_target_teams_distribute_parallel_do_simd = llvm::omp::Directive::OMPD_target_teams_distribute_parallel_do_simd; |
233 | constexpr auto OMPD_target_teams_distribute_parallel_for = llvm::omp::Directive::OMPD_target_teams_distribute_parallel_for; |
234 | constexpr auto OMPD_target_teams_distribute_parallel_for_simd = llvm::omp::Directive::OMPD_target_teams_distribute_parallel_for_simd; |
235 | constexpr auto OMPD_target_teams_distribute_simd = llvm::omp::Directive::OMPD_target_teams_distribute_simd; |
236 | constexpr auto OMPD_target_update = llvm::omp::Directive::OMPD_target_update; |
237 | constexpr auto OMPD_task = llvm::omp::Directive::OMPD_task; |
238 | constexpr auto OMPD_taskgroup = llvm::omp::Directive::OMPD_taskgroup; |
239 | constexpr auto OMPD_taskloop = llvm::omp::Directive::OMPD_taskloop; |
240 | constexpr auto OMPD_taskloop_simd = llvm::omp::Directive::OMPD_taskloop_simd; |
241 | constexpr auto OMPD_taskwait = llvm::omp::Directive::OMPD_taskwait; |
242 | constexpr auto OMPD_taskyield = llvm::omp::Directive::OMPD_taskyield; |
243 | constexpr auto OMPD_teams = llvm::omp::Directive::OMPD_teams; |
244 | constexpr auto OMPD_teams_distribute = llvm::omp::Directive::OMPD_teams_distribute; |
245 | constexpr auto OMPD_teams_distribute_parallel_do = llvm::omp::Directive::OMPD_teams_distribute_parallel_do; |
246 | constexpr auto OMPD_teams_distribute_parallel_do_simd = llvm::omp::Directive::OMPD_teams_distribute_parallel_do_simd; |
247 | constexpr auto OMPD_teams_distribute_parallel_for = llvm::omp::Directive::OMPD_teams_distribute_parallel_for; |
248 | constexpr auto OMPD_teams_distribute_parallel_for_simd = llvm::omp::Directive::OMPD_teams_distribute_parallel_for_simd; |
249 | constexpr auto OMPD_teams_distribute_simd = llvm::omp::Directive::OMPD_teams_distribute_simd; |
250 | constexpr auto OMPD_threadprivate = llvm::omp::Directive::OMPD_threadprivate; |
251 | constexpr auto OMPD_tile = llvm::omp::Directive::OMPD_tile; |
252 | constexpr auto OMPD_unknown = llvm::omp::Directive::OMPD_unknown; |
253 | constexpr auto OMPD_unroll = llvm::omp::Directive::OMPD_unroll; |
254 | constexpr auto OMPD_workshare = llvm::omp::Directive::OMPD_workshare; |
255 | constexpr auto OMPD_dispatch = llvm::omp::Directive::OMPD_dispatch; |
256 | constexpr auto OMPD_interop = llvm::omp::Directive::OMPD_interop; |
257 | constexpr auto OMPD_loop = llvm::omp::Directive::OMPD_loop; |
258 | constexpr auto OMPD_masked = llvm::omp::Directive::OMPD_masked; |
259 | constexpr auto OMPD_parallel_loop = llvm::omp::Directive::OMPD_parallel_loop; |
260 | constexpr auto OMPD_scope = llvm::omp::Directive::OMPD_scope; |
261 | constexpr auto OMPD_target_loop = llvm::omp::Directive::OMPD_target_loop; |
262 | constexpr auto OMPD_target_parallel_loop = llvm::omp::Directive::OMPD_target_parallel_loop; |
263 | constexpr auto OMPD_target_teams_loop = llvm::omp::Directive::OMPD_target_teams_loop; |
264 | constexpr auto OMPD_teams_loop = llvm::omp::Directive::OMPD_teams_loop; |
265 | |
266 | enum class Clause { |
267 | OMPC_acq_rel, |
268 | OMPC_acquire, |
269 | OMPC_adjust_args, |
270 | OMPC_affinity, |
271 | OMPC_align, |
272 | OMPC_aligned, |
273 | OMPC_allocate, |
274 | OMPC_allocator, |
275 | OMPC_append_args, |
276 | OMPC_at, |
277 | OMPC_atomic_default_mem_order, |
278 | OMPC_bind, |
279 | OMPC_cancellation_construct_type, |
280 | OMPC_capture, |
281 | OMPC_collapse, |
282 | OMPC_compare, |
283 | OMPC_copyprivate, |
284 | OMPC_copyin, |
285 | OMPC_default, |
286 | OMPC_defaultmap, |
287 | OMPC_depend, |
288 | OMPC_depobj, |
289 | OMPC_destroy, |
290 | OMPC_detach, |
291 | OMPC_device, |
292 | OMPC_device_type, |
293 | OMPC_dist_schedule, |
294 | OMPC_doacross, |
295 | OMPC_dynamic_allocators, |
296 | OMPC_enter, |
297 | OMPC_exclusive, |
298 | OMPC_fail, |
299 | OMPC_filter, |
300 | OMPC_final, |
301 | OMPC_firstprivate, |
302 | OMPC_flush, |
303 | OMPC_from, |
304 | OMPC_full, |
305 | OMPC_grainsize, |
306 | OMPC_has_device_addr, |
307 | OMPC_hint, |
308 | OMPC_if, |
309 | OMPC_in_reduction, |
310 | OMPC_inbranch, |
311 | OMPC_inclusive, |
312 | OMPC_indirect, |
313 | OMPC_init, |
314 | OMPC_is_device_ptr, |
315 | OMPC_lastprivate, |
316 | OMPC_linear, |
317 | OMPC_link, |
318 | OMPC_map, |
319 | OMPC_match, |
320 | OMPC_memory_order, |
321 | OMPC_mergeable, |
322 | OMPC_message, |
323 | OMPC_nogroup, |
324 | OMPC_nowait, |
325 | OMPC_nocontext, |
326 | OMPC_nontemporal, |
327 | OMPC_notinbranch, |
328 | OMPC_novariants, |
329 | OMPC_num_tasks, |
330 | OMPC_num_teams, |
331 | OMPC_num_threads, |
332 | OMPC_ompx_attribute, |
333 | OMPC_ompx_bare, |
334 | OMPC_ompx_dyn_cgroup_mem, |
335 | OMPC_order, |
336 | OMPC_ordered, |
337 | OMPC_partial, |
338 | OMPC_priority, |
339 | OMPC_private, |
340 | OMPC_proc_bind, |
341 | OMPC_read, |
342 | OMPC_reduction, |
343 | OMPC_relaxed, |
344 | OMPC_release, |
345 | OMPC_reverse_offload, |
346 | OMPC_safelen, |
347 | OMPC_schedule, |
348 | OMPC_seq_cst, |
349 | OMPC_severity, |
350 | OMPC_shared, |
351 | OMPC_simd, |
352 | OMPC_simdlen, |
353 | OMPC_sizes, |
354 | OMPC_task_reduction, |
355 | OMPC_thread_limit, |
356 | OMPC_threadprivate, |
357 | OMPC_threads, |
358 | OMPC_to, |
359 | OMPC_unified_address, |
360 | OMPC_unified_shared_memory, |
361 | OMPC_uniform, |
362 | OMPC_unknown, |
363 | OMPC_untied, |
364 | OMPC_update, |
365 | OMPC_use, |
366 | OMPC_use_device_addr, |
367 | OMPC_use_device_ptr, |
368 | OMPC_uses_allocators, |
369 | OMPC_weak, |
370 | OMPC_when, |
371 | OMPC_write, |
372 | }; |
373 | |
374 | static constexpr std::size_t Clause_enumSize = 105; |
375 | |
376 | constexpr auto OMPC_acq_rel = llvm::omp::Clause::OMPC_acq_rel; |
377 | constexpr auto OMPC_acquire = llvm::omp::Clause::OMPC_acquire; |
378 | constexpr auto OMPC_adjust_args = llvm::omp::Clause::OMPC_adjust_args; |
379 | constexpr auto OMPC_affinity = llvm::omp::Clause::OMPC_affinity; |
380 | constexpr auto OMPC_align = llvm::omp::Clause::OMPC_align; |
381 | constexpr auto OMPC_aligned = llvm::omp::Clause::OMPC_aligned; |
382 | constexpr auto OMPC_allocate = llvm::omp::Clause::OMPC_allocate; |
383 | constexpr auto OMPC_allocator = llvm::omp::Clause::OMPC_allocator; |
384 | constexpr auto OMPC_append_args = llvm::omp::Clause::OMPC_append_args; |
385 | constexpr auto OMPC_at = llvm::omp::Clause::OMPC_at; |
386 | constexpr auto OMPC_atomic_default_mem_order = llvm::omp::Clause::OMPC_atomic_default_mem_order; |
387 | constexpr auto OMPC_bind = llvm::omp::Clause::OMPC_bind; |
388 | constexpr auto OMPC_cancellation_construct_type = llvm::omp::Clause::OMPC_cancellation_construct_type; |
389 | constexpr auto OMPC_capture = llvm::omp::Clause::OMPC_capture; |
390 | constexpr auto OMPC_collapse = llvm::omp::Clause::OMPC_collapse; |
391 | constexpr auto OMPC_compare = llvm::omp::Clause::OMPC_compare; |
392 | constexpr auto OMPC_copyprivate = llvm::omp::Clause::OMPC_copyprivate; |
393 | constexpr auto OMPC_copyin = llvm::omp::Clause::OMPC_copyin; |
394 | constexpr auto OMPC_default = llvm::omp::Clause::OMPC_default; |
395 | constexpr auto OMPC_defaultmap = llvm::omp::Clause::OMPC_defaultmap; |
396 | constexpr auto OMPC_depend = llvm::omp::Clause::OMPC_depend; |
397 | constexpr auto OMPC_depobj = llvm::omp::Clause::OMPC_depobj; |
398 | constexpr auto OMPC_destroy = llvm::omp::Clause::OMPC_destroy; |
399 | constexpr auto OMPC_detach = llvm::omp::Clause::OMPC_detach; |
400 | constexpr auto OMPC_device = llvm::omp::Clause::OMPC_device; |
401 | constexpr auto OMPC_device_type = llvm::omp::Clause::OMPC_device_type; |
402 | constexpr auto OMPC_dist_schedule = llvm::omp::Clause::OMPC_dist_schedule; |
403 | constexpr auto OMPC_doacross = llvm::omp::Clause::OMPC_doacross; |
404 | constexpr auto OMPC_dynamic_allocators = llvm::omp::Clause::OMPC_dynamic_allocators; |
405 | constexpr auto OMPC_enter = llvm::omp::Clause::OMPC_enter; |
406 | constexpr auto OMPC_exclusive = llvm::omp::Clause::OMPC_exclusive; |
407 | constexpr auto OMPC_fail = llvm::omp::Clause::OMPC_fail; |
408 | constexpr auto OMPC_filter = llvm::omp::Clause::OMPC_filter; |
409 | constexpr auto OMPC_final = llvm::omp::Clause::OMPC_final; |
410 | constexpr auto OMPC_firstprivate = llvm::omp::Clause::OMPC_firstprivate; |
411 | constexpr auto OMPC_flush = llvm::omp::Clause::OMPC_flush; |
412 | constexpr auto OMPC_from = llvm::omp::Clause::OMPC_from; |
413 | constexpr auto OMPC_full = llvm::omp::Clause::OMPC_full; |
414 | constexpr auto OMPC_grainsize = llvm::omp::Clause::OMPC_grainsize; |
415 | constexpr auto OMPC_has_device_addr = llvm::omp::Clause::OMPC_has_device_addr; |
416 | constexpr auto OMPC_hint = llvm::omp::Clause::OMPC_hint; |
417 | constexpr auto OMPC_if = llvm::omp::Clause::OMPC_if; |
418 | constexpr auto OMPC_in_reduction = llvm::omp::Clause::OMPC_in_reduction; |
419 | constexpr auto OMPC_inbranch = llvm::omp::Clause::OMPC_inbranch; |
420 | constexpr auto OMPC_inclusive = llvm::omp::Clause::OMPC_inclusive; |
421 | constexpr auto OMPC_indirect = llvm::omp::Clause::OMPC_indirect; |
422 | constexpr auto OMPC_init = llvm::omp::Clause::OMPC_init; |
423 | constexpr auto OMPC_is_device_ptr = llvm::omp::Clause::OMPC_is_device_ptr; |
424 | constexpr auto OMPC_lastprivate = llvm::omp::Clause::OMPC_lastprivate; |
425 | constexpr auto OMPC_linear = llvm::omp::Clause::OMPC_linear; |
426 | constexpr auto OMPC_link = llvm::omp::Clause::OMPC_link; |
427 | constexpr auto OMPC_map = llvm::omp::Clause::OMPC_map; |
428 | constexpr auto OMPC_match = llvm::omp::Clause::OMPC_match; |
429 | constexpr auto OMPC_memory_order = llvm::omp::Clause::OMPC_memory_order; |
430 | constexpr auto OMPC_mergeable = llvm::omp::Clause::OMPC_mergeable; |
431 | constexpr auto OMPC_message = llvm::omp::Clause::OMPC_message; |
432 | constexpr auto OMPC_nogroup = llvm::omp::Clause::OMPC_nogroup; |
433 | constexpr auto OMPC_nowait = llvm::omp::Clause::OMPC_nowait; |
434 | constexpr auto OMPC_nocontext = llvm::omp::Clause::OMPC_nocontext; |
435 | constexpr auto OMPC_nontemporal = llvm::omp::Clause::OMPC_nontemporal; |
436 | constexpr auto OMPC_notinbranch = llvm::omp::Clause::OMPC_notinbranch; |
437 | constexpr auto OMPC_novariants = llvm::omp::Clause::OMPC_novariants; |
438 | constexpr auto OMPC_num_tasks = llvm::omp::Clause::OMPC_num_tasks; |
439 | constexpr auto OMPC_num_teams = llvm::omp::Clause::OMPC_num_teams; |
440 | constexpr auto OMPC_num_threads = llvm::omp::Clause::OMPC_num_threads; |
441 | constexpr auto OMPC_ompx_attribute = llvm::omp::Clause::OMPC_ompx_attribute; |
442 | constexpr auto OMPC_ompx_bare = llvm::omp::Clause::OMPC_ompx_bare; |
443 | constexpr auto OMPC_ompx_dyn_cgroup_mem = llvm::omp::Clause::OMPC_ompx_dyn_cgroup_mem; |
444 | constexpr auto OMPC_order = llvm::omp::Clause::OMPC_order; |
445 | constexpr auto OMPC_ordered = llvm::omp::Clause::OMPC_ordered; |
446 | constexpr auto OMPC_partial = llvm::omp::Clause::OMPC_partial; |
447 | constexpr auto OMPC_priority = llvm::omp::Clause::OMPC_priority; |
448 | constexpr auto OMPC_private = llvm::omp::Clause::OMPC_private; |
449 | constexpr auto OMPC_proc_bind = llvm::omp::Clause::OMPC_proc_bind; |
450 | constexpr auto OMPC_read = llvm::omp::Clause::OMPC_read; |
451 | constexpr auto OMPC_reduction = llvm::omp::Clause::OMPC_reduction; |
452 | constexpr auto OMPC_relaxed = llvm::omp::Clause::OMPC_relaxed; |
453 | constexpr auto OMPC_release = llvm::omp::Clause::OMPC_release; |
454 | constexpr auto OMPC_reverse_offload = llvm::omp::Clause::OMPC_reverse_offload; |
455 | constexpr auto OMPC_safelen = llvm::omp::Clause::OMPC_safelen; |
456 | constexpr auto OMPC_schedule = llvm::omp::Clause::OMPC_schedule; |
457 | constexpr auto OMPC_seq_cst = llvm::omp::Clause::OMPC_seq_cst; |
458 | constexpr auto OMPC_severity = llvm::omp::Clause::OMPC_severity; |
459 | constexpr auto OMPC_shared = llvm::omp::Clause::OMPC_shared; |
460 | constexpr auto OMPC_simd = llvm::omp::Clause::OMPC_simd; |
461 | constexpr auto OMPC_simdlen = llvm::omp::Clause::OMPC_simdlen; |
462 | constexpr auto OMPC_sizes = llvm::omp::Clause::OMPC_sizes; |
463 | constexpr auto OMPC_task_reduction = llvm::omp::Clause::OMPC_task_reduction; |
464 | constexpr auto OMPC_thread_limit = llvm::omp::Clause::OMPC_thread_limit; |
465 | constexpr auto OMPC_threadprivate = llvm::omp::Clause::OMPC_threadprivate; |
466 | constexpr auto OMPC_threads = llvm::omp::Clause::OMPC_threads; |
467 | constexpr auto OMPC_to = llvm::omp::Clause::OMPC_to; |
468 | constexpr auto OMPC_unified_address = llvm::omp::Clause::OMPC_unified_address; |
469 | constexpr auto OMPC_unified_shared_memory = llvm::omp::Clause::OMPC_unified_shared_memory; |
470 | constexpr auto OMPC_uniform = llvm::omp::Clause::OMPC_uniform; |
471 | constexpr auto OMPC_unknown = llvm::omp::Clause::OMPC_unknown; |
472 | constexpr auto OMPC_untied = llvm::omp::Clause::OMPC_untied; |
473 | constexpr auto OMPC_update = llvm::omp::Clause::OMPC_update; |
474 | constexpr auto OMPC_use = llvm::omp::Clause::OMPC_use; |
475 | constexpr auto OMPC_use_device_addr = llvm::omp::Clause::OMPC_use_device_addr; |
476 | constexpr auto OMPC_use_device_ptr = llvm::omp::Clause::OMPC_use_device_ptr; |
477 | constexpr auto OMPC_uses_allocators = llvm::omp::Clause::OMPC_uses_allocators; |
478 | constexpr auto OMPC_weak = llvm::omp::Clause::OMPC_weak; |
479 | constexpr auto OMPC_when = llvm::omp::Clause::OMPC_when; |
480 | constexpr auto OMPC_write = llvm::omp::Clause::OMPC_write; |
481 | |
482 | enum class CancellationConstructType { |
483 | OMP_CANCELLATION_CONSTRUCT_Parallel=1, |
484 | OMP_CANCELLATION_CONSTRUCT_Loop=2, |
485 | OMP_CANCELLATION_CONSTRUCT_Sections=3, |
486 | OMP_CANCELLATION_CONSTRUCT_Taskgroup=4, |
487 | OMP_CANCELLATION_CONSTRUCT_None=5, |
488 | }; |
489 | |
490 | constexpr auto OMP_CANCELLATION_CONSTRUCT_Parallel = llvm::omp::CancellationConstructType::OMP_CANCELLATION_CONSTRUCT_Parallel; |
491 | constexpr auto OMP_CANCELLATION_CONSTRUCT_Loop = llvm::omp::CancellationConstructType::OMP_CANCELLATION_CONSTRUCT_Loop; |
492 | constexpr auto OMP_CANCELLATION_CONSTRUCT_Sections = llvm::omp::CancellationConstructType::OMP_CANCELLATION_CONSTRUCT_Sections; |
493 | constexpr auto OMP_CANCELLATION_CONSTRUCT_Taskgroup = llvm::omp::CancellationConstructType::OMP_CANCELLATION_CONSTRUCT_Taskgroup; |
494 | constexpr auto OMP_CANCELLATION_CONSTRUCT_None = llvm::omp::CancellationConstructType::OMP_CANCELLATION_CONSTRUCT_None; |
495 | |
496 | enum class GrainsizeType { |
497 | OMP_GRAINSIZE_Strict=1, |
498 | OMP_GRAINSIZE_Unknown=2, |
499 | }; |
500 | |
501 | constexpr auto OMP_GRAINSIZE_Strict = llvm::omp::GrainsizeType::OMP_GRAINSIZE_Strict; |
502 | constexpr auto OMP_GRAINSIZE_Unknown = llvm::omp::GrainsizeType::OMP_GRAINSIZE_Unknown; |
503 | |
504 | enum class MemoryOrderKind { |
505 | OMP_MEMORY_ORDER_SeqCst=1, |
506 | OMP_MEMORY_ORDER_AcqRel=2, |
507 | OMP_MEMORY_ORDER_Acquire=3, |
508 | OMP_MEMORY_ORDER_Release=4, |
509 | OMP_MEMORY_ORDER_Relaxed=5, |
510 | OMP_MEMORY_ORDER_Default=6, |
511 | }; |
512 | |
513 | constexpr auto OMP_MEMORY_ORDER_SeqCst = llvm::omp::MemoryOrderKind::OMP_MEMORY_ORDER_SeqCst; |
514 | constexpr auto OMP_MEMORY_ORDER_AcqRel = llvm::omp::MemoryOrderKind::OMP_MEMORY_ORDER_AcqRel; |
515 | constexpr auto OMP_MEMORY_ORDER_Acquire = llvm::omp::MemoryOrderKind::OMP_MEMORY_ORDER_Acquire; |
516 | constexpr auto OMP_MEMORY_ORDER_Release = llvm::omp::MemoryOrderKind::OMP_MEMORY_ORDER_Release; |
517 | constexpr auto OMP_MEMORY_ORDER_Relaxed = llvm::omp::MemoryOrderKind::OMP_MEMORY_ORDER_Relaxed; |
518 | constexpr auto OMP_MEMORY_ORDER_Default = llvm::omp::MemoryOrderKind::OMP_MEMORY_ORDER_Default; |
519 | |
520 | enum class NumTasksType { |
521 | OMP_NUMTASKS_Strict=1, |
522 | OMP_NUMTASKS_Unknown=2, |
523 | }; |
524 | |
525 | constexpr auto OMP_NUMTASKS_Strict = llvm::omp::NumTasksType::OMP_NUMTASKS_Strict; |
526 | constexpr auto OMP_NUMTASKS_Unknown = llvm::omp::NumTasksType::OMP_NUMTASKS_Unknown; |
527 | |
528 | enum class OrderKind { |
529 | OMP_ORDER_unknown=2, |
530 | OMP_ORDER_concurrent=1, |
531 | }; |
532 | |
533 | constexpr auto OMP_ORDER_unknown = llvm::omp::OrderKind::OMP_ORDER_unknown; |
534 | constexpr auto OMP_ORDER_concurrent = llvm::omp::OrderKind::OMP_ORDER_concurrent; |
535 | |
536 | enum class ProcBindKind { |
537 | OMP_PROC_BIND_primary=5, |
538 | OMP_PROC_BIND_master=2, |
539 | OMP_PROC_BIND_close=3, |
540 | OMP_PROC_BIND_spread=4, |
541 | OMP_PROC_BIND_default=6, |
542 | OMP_PROC_BIND_unknown=7, |
543 | }; |
544 | |
545 | constexpr auto OMP_PROC_BIND_primary = llvm::omp::ProcBindKind::OMP_PROC_BIND_primary; |
546 | constexpr auto OMP_PROC_BIND_master = llvm::omp::ProcBindKind::OMP_PROC_BIND_master; |
547 | constexpr auto OMP_PROC_BIND_close = llvm::omp::ProcBindKind::OMP_PROC_BIND_close; |
548 | constexpr auto OMP_PROC_BIND_spread = llvm::omp::ProcBindKind::OMP_PROC_BIND_spread; |
549 | constexpr auto OMP_PROC_BIND_default = llvm::omp::ProcBindKind::OMP_PROC_BIND_default; |
550 | constexpr auto OMP_PROC_BIND_unknown = llvm::omp::ProcBindKind::OMP_PROC_BIND_unknown; |
551 | |
552 | enum class ScheduleKind { |
553 | OMP_SCHEDULE_Static=2, |
554 | OMP_SCHEDULE_Dynamic=3, |
555 | OMP_SCHEDULE_Guided=4, |
556 | OMP_SCHEDULE_Auto=5, |
557 | OMP_SCHEDULE_Runtime=6, |
558 | OMP_SCHEDULE_Default=7, |
559 | }; |
560 | |
561 | constexpr auto OMP_SCHEDULE_Static = llvm::omp::ScheduleKind::OMP_SCHEDULE_Static; |
562 | constexpr auto OMP_SCHEDULE_Dynamic = llvm::omp::ScheduleKind::OMP_SCHEDULE_Dynamic; |
563 | constexpr auto OMP_SCHEDULE_Guided = llvm::omp::ScheduleKind::OMP_SCHEDULE_Guided; |
564 | constexpr auto OMP_SCHEDULE_Auto = llvm::omp::ScheduleKind::OMP_SCHEDULE_Auto; |
565 | constexpr auto OMP_SCHEDULE_Runtime = llvm::omp::ScheduleKind::OMP_SCHEDULE_Runtime; |
566 | constexpr auto OMP_SCHEDULE_Default = llvm::omp::ScheduleKind::OMP_SCHEDULE_Default; |
567 | |
568 | // Enumeration helper functions |
569 | Directive getOpenMPDirectiveKind(llvm::StringRef Str); |
570 | |
571 | llvm::StringRef getOpenMPDirectiveName(Directive D); |
572 | |
573 | Clause getOpenMPClauseKind(llvm::StringRef Str); |
574 | |
575 | llvm::StringRef getOpenMPClauseName(Clause C); |
576 | |
577 | /// Return true if \p C is a valid clause for \p D in version \p Version. |
578 | bool isAllowedClauseForDirective(Directive D, Clause C, unsigned Version); |
579 | |
580 | constexpr std::size_t getMaxLeafCount() { return 6; } |
581 | Association getDirectiveAssociation(Directive D); |
582 | Category getDirectiveCategory(Directive D); |
583 | CancellationConstructType getCancellationConstructType(StringRef); |
584 | llvm::StringRef getOpenMPCancellationConstructTypeName(CancellationConstructType); |
585 | GrainsizeType getGrainsizeType(StringRef); |
586 | llvm::StringRef getOpenMPGrainsizeTypeName(GrainsizeType); |
587 | MemoryOrderKind getMemoryOrderKind(StringRef); |
588 | llvm::StringRef getOpenMPMemoryOrderKindName(MemoryOrderKind); |
589 | NumTasksType getNumTasksType(StringRef); |
590 | llvm::StringRef getOpenMPNumTasksTypeName(NumTasksType); |
591 | OrderKind getOrderKind(StringRef); |
592 | llvm::StringRef getOpenMPOrderKindName(OrderKind); |
593 | ProcBindKind getProcBindKind(StringRef); |
594 | llvm::StringRef getOpenMPProcBindKindName(ProcBindKind); |
595 | ScheduleKind getScheduleKind(StringRef); |
596 | llvm::StringRef getOpenMPScheduleKindName(ScheduleKind); |
597 | |
598 | } // namespace omp |
599 | } // namespace llvm |
600 | #endif // LLVM_OpenMP_INC |
601 | |