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