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