1//===-- OMP.td - OpenMP directive definition file ----------*- tablegen -*-===// 2// 3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4// See https://llvm.org/LICENSE.txt for license information. 5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6// 7//===----------------------------------------------------------------------===// 8// 9// This is the definition file for OpenMP directives and clauses. 10// 11//===----------------------------------------------------------------------===// 12 13include "llvm/Frontend/Directive/DirectiveBase.td" 14 15//===----------------------------------------------------------------------===// 16// Definition of general OpenMP information 17//===----------------------------------------------------------------------===// 18 19def OpenMP : DirectiveLanguage { 20 let name = "OpenMP"; 21 let cppNamespace = "omp"; // final namespace will be llvm::omp 22 let directivePrefix = "OMPD_"; 23 let clausePrefix = "OMPC_"; 24 let makeEnumAvailableInNamespace = 1; 25 let enableBitmaskEnumInNamespace = 1; 26 let includeHeader = "llvm/Frontend/OpenMP/OMP.h.inc"; 27 let clauseEnumSetClass = "OmpClauseSet"; 28} 29 30//===----------------------------------------------------------------------===// 31// Definition of OpenMP clauses 32//===----------------------------------------------------------------------===// 33 34def OMPC_Allocator : Clause<"allocator"> { 35 let clangClass = "OMPAllocatorClause"; 36} 37def OMPC_If : Clause<"if"> { let clangClass = "OMPIfClause"; } 38def OMPC_Final : Clause<"final"> { let clangClass = "OMPFinalClause"; } 39def OMPC_NumThreads : Clause<"num_threads"> { 40 let clangClass = "OMPNumThreadsClause"; 41} 42def OMPC_SafeLen : Clause<"safelen"> { let clangClass = "OMPSafelenClause"; } 43def OMPC_SimdLen : Clause<"simdlen"> { let clangClass = "OMPSimdlenClause"; } 44def OMPC_Collapse : Clause<"collapse"> { let clangClass = "OMPCollapseClause"; } 45def OMPC_Default : Clause<"default"> { let clangClass = "OMPDefaultClause"; } 46def OMPC_Private : Clause<"private"> { let clangClass = "OMPPrivateClause"; } 47def OMPC_FirstPrivate : Clause<"firstprivate"> { 48 let clangClass = "OMPFirstprivateClause"; 49} 50def OMPC_LastPrivate : Clause<"lastprivate"> { 51 let clangClass = "OMPLastprivateClause"; 52} 53def OMPC_Shared : Clause<"shared"> { let clangClass = "OMPSharedClause"; } 54def OMPC_Reduction : Clause<"reduction"> { 55 let clangClass = "OMPReductionClause"; 56} 57def OMPC_Linear : Clause<"linear"> { let clangClass = "OMPLinearClause"; } 58def OMPC_Aligned : Clause<"aligned"> { let clangClass = "OMPAlignedClause"; } 59def OMPC_Copyin : Clause<"copyin"> { let clangClass = "OMPCopyinClause"; } 60def OMPC_CopyPrivate : Clause<"copyprivate"> { 61 let clangClass = "OMPCopyprivateClause"; 62} 63def OMPC_ProcBind : Clause<"proc_bind"> { 64 let clangClass = "OMPProcBindClause"; 65} 66def OMPC_Schedule : Clause<"schedule"> { let clangClass = "OMPScheduleClause"; } 67def OMPC_Ordered : Clause<"ordered"> { let clangClass = "OMPOrderedClause"; } 68def OMPC_NoWait : Clause<"nowait"> { let clangClass = "OMPNowaitClause"; } 69def OMPC_Untied : Clause<"untied"> { let clangClass = "OMPUntiedClause"; } 70def OMPC_Mergeable : Clause<"mergeable"> { 71 let clangClass = "OMPMergeableClause"; 72} 73def OMPC_Read : Clause<"read"> { let clangClass = "OMPReadClause"; } 74def OMPC_Write : Clause<"write"> { let clangClass = "OMPWriteClause"; } 75def OMPC_Update : Clause<"update"> { let clangClass = "OMPUpdateClause"; } 76def OMPC_Capture : Clause<"capture"> { let clangClass = "OMPCaptureClause"; } 77def OMPC_SeqCst : Clause<"seq_cst"> { let clangClass = "OMPSeqCstClause"; } 78def OMPC_AcqRel : Clause<"acq_rel"> { let clangClass = "OMPAcqRelClause"; } 79def OMPC_Acquire : Clause<"acquire"> { let clangClass = "OMPAcquireClause"; } 80def OMPC_Release : Clause<"release"> { let clangClass = "OMPReleaseClause"; } 81def OMPC_Relaxed : Clause<"relaxed"> { let clangClass = "OMPRelaxedClause"; } 82def OMPC_Depend : Clause<"depend"> { let clangClass = "OMPDependClause"; } 83def OMPC_Device : Clause<"device"> { let clangClass = "OMPDeviceClause"; } 84def OMPC_Threads : Clause<"threads"> { let clangClass = "OMPThreadsClause"; } 85def OMPC_Simd : Clause<"simd"> { let clangClass = "OMPSIMDClause"; } 86def OMPC_Map : Clause<"map"> { let clangClass = "OMPMapClause"; } 87def OMPC_NumTeams : Clause<"num_teams"> { 88 let clangClass = "OMPNumTeamsClause"; 89} 90def OMPC_ThreadLimit : Clause<"thread_limit"> { 91 let clangClass = "OMPThreadLimitClause"; 92} 93def OMPC_Priority : Clause<"priority"> { 94 let clangClass = "OMPPriorityClause"; 95} 96def OMPC_GrainSize : Clause<"grainsize"> { 97 let clangClass = "OMPGrainsizeClause"; 98} 99def OMPC_NoGroup : Clause<"nogroup"> { 100 let clangClass = "OMPNogroupClause"; 101} 102def OMPC_NumTasks : Clause<"num_tasks"> { 103 let clangClass = "OMPNumTasksClause"; 104} 105def OMPC_Hint : Clause<"hint"> { 106 let clangClass = "OMPHintClause"; 107} 108def OMPC_DistSchedule : Clause<"dist_schedule"> { 109 let clangClass = "OMPDistScheduleClause"; 110} 111def OMPC_DefaultMap : Clause<"defaultmap"> { 112 let clangClass = "OMPDefaultmapClause"; 113} 114def OMPC_To : Clause<"to"> { 115 let clangClass = "OMPToClause"; 116} 117def OMPC_From : Clause<"from"> { let clangClass = "OMPFromClause"; } 118def OMPC_UseDevicePtr : Clause<"use_device_ptr"> { 119 let clangClass = "OMPUseDevicePtrClause"; 120} 121def OMPC_IsDevicePtr : Clause<"is_device_ptr"> { 122 let clangClass = "OMPIsDevicePtrClause"; 123} 124def OMPC_TaskReduction : Clause<"task_reduction"> { 125 let clangClass = "OMPTaskReductionClause"; 126} 127def OMPC_InReduction : Clause<"in_reduction"> { 128 let clangClass = "OMPInReductionClause"; 129} 130def OMPC_UnifiedAddress : Clause<"unified_address"> { 131 let clangClass = "OMPUnifiedAddressClause"; 132} 133def OMPC_UnifiedSharedMemory : Clause<"unified_shared_memory"> { 134 let clangClass = "OMPUnifiedSharedMemoryClause"; 135} 136def OMPC_ReverseOffload : Clause<"reverse_offload"> { 137 let clangClass = "OMPReverseOffloadClause"; 138} 139def OMPC_DynamicAllocators : Clause<"dynamic_allocators"> { 140 let clangClass = "OMPDynamicAllocatorsClause"; 141} 142def OMPC_AtomicDefaultMemOrder : Clause<"atomic_default_mem_order"> { 143 let clangClass = "OMPAtomicDefaultMemOrderClause"; 144} 145def OMPC_Allocate : Clause<"allocate"> { 146 let clangClass = "OMPAllocateClause"; 147} 148def OMPC_NonTemporal : Clause<"nontemporal"> { 149 let clangClass = "OMPNontemporalClause"; 150} 151def OMPC_Order : Clause<"order"> { 152 let clangClass = "OMPOrderClause"; 153} 154def OMPC_Destroy : Clause<"destroy"> { 155 let clangClass = "OMPDestroyClause"; 156} 157def OMPC_Detach : Clause<"detach"> { 158 let clangClass = "OMPDetachClause"; 159} 160def OMPC_Inclusive : Clause<"inclusive"> { 161 let clangClass = "OMPInclusiveClause"; 162} 163def OMPC_Exclusive : Clause<"exclusive"> { 164 let clangClass = "OMPExclusiveClause"; 165} 166def OMPC_UsesAllocators : Clause<"uses_allocators"> { 167 let clangClass = "OMPUsesAllocatorsClause"; 168} 169def OMPC_Affinity : Clause<"affinity"> { 170 let clangClass = "OMPAffinityClause"; 171} 172def OMPC_UseDeviceAddr : Clause<"use_device_addr"> { 173 let clangClass = "OMPUseDeviceAddrClause"; 174} 175def OMPC_Uniform : Clause<"uniform"> {} 176def OMPC_DeviceType : Clause<"device_type"> {} 177def OMPC_Match : Clause<"match"> {} 178def OMPC_Depobj : Clause<"depobj"> { 179 let clangClass = "OMPDepobjClause"; 180 let isImplicit = 1; 181} 182def OMPC_Flush : Clause<"flush"> { 183 let clangClass = "OMPFlushClause"; 184 let isImplicit = 1; 185} 186def OMPC_ThreadPrivate : Clause<"threadprivate"> { 187 let alternativeName = "threadprivate or thread local"; 188 let isImplicit = 1; 189} 190def OMPC_Unknown : Clause<"unknown"> { 191 let isImplicit = 1; 192 let isDefault = 1; 193} 194def OMPC_Link : Clause<"link"> {} 195def OMPC_Inbranch : Clause<"inbranch"> {} 196def OMPC_Notinbranch : Clause<"notinbranch"> {} 197 198//===----------------------------------------------------------------------===// 199// Definition of OpenMP directives 200//===----------------------------------------------------------------------===// 201 202def OMP_ThreadPrivate : Directive<"threadprivate"> {} 203def OMP_Parallel : Directive<"parallel"> { 204 let allowedClauses = [ 205 VersionedClause<OMPC_Default>, 206 VersionedClause<OMPC_Private>, 207 VersionedClause<OMPC_FirstPrivate>, 208 VersionedClause<OMPC_Shared>, 209 VersionedClause<OMPC_Reduction>, 210 VersionedClause<OMPC_Copyin>, 211 VersionedClause<OMPC_Allocate> 212 ]; 213 let allowedOnceClauses = [ 214 VersionedClause<OMPC_If>, 215 VersionedClause<OMPC_NumThreads>, 216 VersionedClause<OMPC_ProcBind>, 217 ]; 218} 219def OMP_Task : Directive<"task"> { 220 let allowedClauses = [ 221 VersionedClause<OMPC_Default>, 222 VersionedClause<OMPC_Private>, 223 VersionedClause<OMPC_FirstPrivate>, 224 VersionedClause<OMPC_Shared>, 225 VersionedClause<OMPC_Untied>, 226 VersionedClause<OMPC_Mergeable>, 227 VersionedClause<OMPC_Depend>, 228 VersionedClause<OMPC_InReduction>, 229 VersionedClause<OMPC_Allocate>, 230 VersionedClause<OMPC_Detach, 50>, 231 VersionedClause<OMPC_Affinity, 50> 232 ]; 233 let allowedOnceClauses = [ 234 VersionedClause<OMPC_If>, 235 VersionedClause<OMPC_Final>, 236 VersionedClause<OMPC_Priority> 237 ]; 238} 239def OMP_Simd : Directive<"simd"> { 240 let allowedClauses = [ 241 VersionedClause<OMPC_Private>, 242 VersionedClause<OMPC_LastPrivate>, 243 VersionedClause<OMPC_Linear>, 244 VersionedClause<OMPC_Aligned>, 245 VersionedClause<OMPC_Reduction>, 246 VersionedClause<OMPC_Allocate>, 247 VersionedClause<OMPC_NonTemporal, 50>, 248 VersionedClause<OMPC_Order, 50> 249 ]; 250 let allowedOnceClauses = [ 251 VersionedClause<OMPC_Collapse>, 252 VersionedClause<OMPC_SafeLen>, 253 VersionedClause<OMPC_SimdLen>, 254 VersionedClause<OMPC_If, 50>, 255 ]; 256} 257def OMP_For : Directive<"for"> { 258 let allowedClauses = [ 259 VersionedClause<OMPC_Private>, 260 VersionedClause<OMPC_LastPrivate>, 261 VersionedClause<OMPC_FirstPrivate>, 262 VersionedClause<OMPC_Reduction>, 263 VersionedClause<OMPC_Collapse>, 264 VersionedClause<OMPC_Schedule>, 265 VersionedClause<OMPC_Ordered>, 266 VersionedClause<OMPC_NoWait>, 267 VersionedClause<OMPC_Linear>, 268 VersionedClause<OMPC_Allocate>, 269 VersionedClause<OMPC_Order, 50> 270 ]; 271} 272def OMP_Do : Directive<"do"> { 273 let allowedClauses = [ 274 VersionedClause<OMPC_Private>, 275 VersionedClause<OMPC_FirstPrivate>, 276 VersionedClause<OMPC_LastPrivate>, 277 VersionedClause<OMPC_Linear>, 278 VersionedClause<OMPC_Reduction> 279 ]; 280 let allowedOnceClauses = [ 281 VersionedClause<OMPC_Schedule>, 282 VersionedClause<OMPC_Collapse>, 283 VersionedClause<OMPC_Ordered>, 284 VersionedClause<OMPC_NoWait> 285 ]; 286} 287def OMP_Sections : Directive<"sections"> { 288 let allowedClauses = [ 289 VersionedClause<OMPC_Private>, 290 VersionedClause<OMPC_LastPrivate>, 291 VersionedClause<OMPC_FirstPrivate>, 292 VersionedClause<OMPC_Reduction>, 293 VersionedClause<OMPC_NoWait>, 294 VersionedClause<OMPC_Allocate> 295 ]; 296} 297def OMP_Section : Directive<"section"> {} 298def OMP_Single : Directive<"single"> { 299 let allowedClauses = [ 300 VersionedClause<OMPC_Private>, 301 VersionedClause<OMPC_FirstPrivate>, 302 VersionedClause<OMPC_CopyPrivate>, 303 VersionedClause<OMPC_NoWait>, 304 VersionedClause<OMPC_Allocate> 305 ]; 306} 307def OMP_Master : Directive<"master"> {} 308def OMP_Critical : Directive<"critical"> { 309 let allowedClauses = [ 310 VersionedClause<OMPC_Hint> 311 ]; 312} 313def OMP_TaskYield : Directive<"taskyield"> {} 314def OMP_Barrier : Directive<"barrier"> {} 315def OMP_TaskWait : Directive<"taskwait"> {} 316def OMP_TaskGroup : Directive<"taskgroup"> { 317 let allowedClauses = [ 318 VersionedClause<OMPC_TaskReduction>, 319 VersionedClause<OMPC_Allocate> 320 ]; 321} 322def OMP_Flush : Directive<"flush"> { 323 let allowedClauses = [ 324 VersionedClause<OMPC_AcqRel, 50>, 325 VersionedClause<OMPC_Acquire, 50>, 326 VersionedClause<OMPC_Release, 50>, 327 // TODO This should ne `none` instead. Comment carried over from 328 // OMPKinds.def. 329 VersionedClause<OMPC_Flush> 330 ]; 331} 332def OMP_Ordered : Directive<"ordered"> { 333 let allowedClauses = [ 334 VersionedClause<OMPC_Threads>, 335 VersionedClause<OMPC_Simd>, 336 VersionedClause<OMPC_Depend> 337 ]; 338} 339def OMP_Atomic : Directive<"atomic"> { 340 let allowedClauses = [ 341 VersionedClause<OMPC_Read>, 342 VersionedClause<OMPC_Write>, 343 VersionedClause<OMPC_Update>, 344 VersionedClause<OMPC_Capture>, 345 VersionedClause<OMPC_SeqCst>, 346 VersionedClause<OMPC_AcqRel, 50>, 347 VersionedClause<OMPC_Acquire, 50>, 348 VersionedClause<OMPC_Release, 50>, 349 VersionedClause<OMPC_Relaxed, 50>, 350 VersionedClause<OMPC_Hint, 50> 351 ]; 352} 353def OMP_Target : Directive<"target"> { 354 let allowedClauses = [ 355 VersionedClause<OMPC_If>, 356 VersionedClause<OMPC_Map>, 357 VersionedClause<OMPC_Private>, 358 VersionedClause<OMPC_Depend>, 359 VersionedClause<OMPC_FirstPrivate>, 360 VersionedClause<OMPC_IsDevicePtr>, 361 VersionedClause<OMPC_Reduction>, 362 VersionedClause<OMPC_Allocate>, 363 VersionedClause<OMPC_UsesAllocators, 50> 364 ]; 365 let allowedOnceClauses = [ 366 VersionedClause<OMPC_Device>, 367 VersionedClause<OMPC_DefaultMap>, 368 VersionedClause<OMPC_NoWait> 369 ]; 370} 371def OMP_Teams : Directive<"teams"> { 372 let allowedClauses = [ 373 VersionedClause<OMPC_Private>, 374 VersionedClause<OMPC_FirstPrivate>, 375 VersionedClause<OMPC_Shared>, 376 VersionedClause<OMPC_Reduction>, 377 VersionedClause<OMPC_Allocate> 378 ]; 379 let allowedOnceClauses = [ 380 VersionedClause<OMPC_Default>, 381 VersionedClause<OMPC_NumTeams>, 382 VersionedClause<OMPC_ThreadLimit> 383 ]; 384} 385def OMP_Cancel : Directive<"cancel"> { 386 let allowedClauses = [ 387 VersionedClause<OMPC_If> 388 ]; 389} 390def OMP_Requires : Directive<"requires"> { 391 let allowedClauses = [ 392 VersionedClause<OMPC_UnifiedAddress>, 393 VersionedClause<OMPC_UnifiedSharedMemory>, 394 VersionedClause<OMPC_ReverseOffload>, 395 VersionedClause<OMPC_DynamicAllocators>, 396 VersionedClause<OMPC_AtomicDefaultMemOrder> 397 ]; 398} 399def OMP_TargetData : Directive<"target data"> { 400 let allowedClauses = [ 401 VersionedClause<OMPC_Map>, 402 VersionedClause<OMPC_UseDevicePtr>, 403 VersionedClause<OMPC_UseDeviceAddr, 50> 404 ]; 405 let allowedOnceClauses = [ 406 VersionedClause<OMPC_Device>, 407 VersionedClause<OMPC_If> 408 ]; 409 let requiredClauses = [ 410 VersionedClause<OMPC_Map> 411 ]; 412} 413def OMP_TargetEnterData : Directive<"target enter data"> { 414 let allowedClauses = [ 415 VersionedClause<OMPC_Depend>, 416 VersionedClause<OMPC_Map> 417 ]; 418 let allowedOnceClauses = [ 419 VersionedClause<OMPC_If>, 420 VersionedClause<OMPC_Device>, 421 VersionedClause<OMPC_NoWait> 422 ]; 423} 424def OMP_TargetExitData : Directive<"target exit data"> { 425 let allowedClauses = [ 426 VersionedClause<OMPC_Depend>, 427 VersionedClause<OMPC_Map> 428 ]; 429 let allowedOnceClauses = [ 430 VersionedClause<OMPC_Device>, 431 VersionedClause<OMPC_If>, 432 VersionedClause<OMPC_NoWait> 433 ]; 434 let requiredClauses = [ 435 VersionedClause<OMPC_Map> 436 ]; 437} 438def OMP_TargetParallel : Directive<"target parallel"> { 439 let allowedClauses = [ 440 VersionedClause<OMPC_Map>, 441 VersionedClause<OMPC_NoWait>, 442 VersionedClause<OMPC_Depend>, 443 VersionedClause<OMPC_Private>, 444 VersionedClause<OMPC_FirstPrivate>, 445 VersionedClause<OMPC_Default>, 446 VersionedClause<OMPC_Shared>, 447 VersionedClause<OMPC_Reduction>, 448 VersionedClause<OMPC_IsDevicePtr>, 449 VersionedClause<OMPC_Allocate>, 450 VersionedClause<OMPC_UsesAllocators, 50> 451 ]; 452 let allowedOnceClauses = [ 453 VersionedClause<OMPC_DefaultMap>, 454 VersionedClause<OMPC_Device>, 455 VersionedClause<OMPC_If>, 456 VersionedClause<OMPC_NumThreads>, 457 VersionedClause<OMPC_ProcBind> 458 ]; 459} 460def OMP_TargetParallelFor : Directive<"target parallel for"> { 461 let allowedClauses = [ 462 VersionedClause<OMPC_If>, 463 VersionedClause<OMPC_Device>, 464 VersionedClause<OMPC_Map>, 465 VersionedClause<OMPC_Private>, 466 VersionedClause<OMPC_FirstPrivate>, 467 VersionedClause<OMPC_LastPrivate>, 468 VersionedClause<OMPC_NoWait>, 469 VersionedClause<OMPC_Depend>, 470 VersionedClause<OMPC_DefaultMap>, 471 VersionedClause<OMPC_NumThreads>, 472 VersionedClause<OMPC_Default>, 473 VersionedClause<OMPC_ProcBind>, 474 VersionedClause<OMPC_Shared>, 475 VersionedClause<OMPC_Reduction>, 476 VersionedClause<OMPC_Collapse>, 477 VersionedClause<OMPC_Schedule>, 478 VersionedClause<OMPC_Ordered>, 479 VersionedClause<OMPC_Linear>, 480 VersionedClause<OMPC_IsDevicePtr>, 481 VersionedClause<OMPC_Allocate>, 482 VersionedClause<OMPC_Order, 50>, 483 VersionedClause<OMPC_UsesAllocators, 50> 484 ]; 485} 486def OMP_TargetParallelDo : Directive<"target parallel do"> { 487 let allowedClauses = [ 488 VersionedClause<OMPC_Map>, 489 VersionedClause<OMPC_Private>, 490 VersionedClause<OMPC_FirstPrivate>, 491 VersionedClause<OMPC_LastPrivate>, 492 VersionedClause<OMPC_Depend>, 493 VersionedClause<OMPC_Shared>, 494 VersionedClause<OMPC_Reduction>, 495 VersionedClause<OMPC_Linear>, 496 VersionedClause<OMPC_IsDevicePtr>, 497 VersionedClause<OMPC_Allocator>, 498 VersionedClause<OMPC_Order>, 499 VersionedClause<OMPC_UsesAllocators>, 500 VersionedClause<OMPC_Default>, 501 VersionedClause<OMPC_Copyin> 502 ]; 503 let allowedOnceClauses = [ 504 VersionedClause<OMPC_If>, 505 VersionedClause<OMPC_NumThreads>, 506 VersionedClause<OMPC_ProcBind>, 507 VersionedClause<OMPC_Device>, 508 VersionedClause<OMPC_DefaultMap>, 509 VersionedClause<OMPC_Schedule>, 510 VersionedClause<OMPC_Collapse>, 511 VersionedClause<OMPC_Ordered>, 512 VersionedClause<OMPC_NoWait> 513 ]; 514} 515def OMP_TargetUpdate : Directive<"target update"> { 516 let allowedClauses = [ 517 VersionedClause<OMPC_If>, 518 VersionedClause<OMPC_Device>, 519 VersionedClause<OMPC_To>, 520 VersionedClause<OMPC_From>, 521 VersionedClause<OMPC_NoWait>, 522 VersionedClause<OMPC_Depend> 523 ]; 524} 525def OMP_ParallelFor : Directive<"parallel for"> { 526 let allowedClauses = [ 527 VersionedClause<OMPC_If>, 528 VersionedClause<OMPC_NumThreads>, 529 VersionedClause<OMPC_Default>, 530 VersionedClause<OMPC_ProcBind>, 531 VersionedClause<OMPC_Private>, 532 VersionedClause<OMPC_FirstPrivate>, 533 VersionedClause<OMPC_Shared>, 534 VersionedClause<OMPC_Reduction>, 535 VersionedClause<OMPC_Copyin>, 536 VersionedClause<OMPC_LastPrivate>, 537 VersionedClause<OMPC_Collapse>, 538 VersionedClause<OMPC_Schedule>, 539 VersionedClause<OMPC_Ordered>, 540 VersionedClause<OMPC_Linear>, 541 VersionedClause<OMPC_Allocate>, 542 VersionedClause<OMPC_Order, 50> 543 ]; 544} 545def OMP_ParallelDo : Directive<"parallel do"> { 546 let allowedClauses = [ 547 VersionedClause<OMPC_Default>, 548 VersionedClause<OMPC_Private>, 549 VersionedClause<OMPC_FirstPrivate>, 550 VersionedClause<OMPC_Shared>, 551 VersionedClause<OMPC_Reduction>, 552 VersionedClause<OMPC_Copyin>, 553 VersionedClause<OMPC_LastPrivate>, 554 VersionedClause<OMPC_Linear> 555 ]; 556 let allowedOnceClauses = [ 557 VersionedClause<OMPC_If>, 558 VersionedClause<OMPC_NumThreads>, 559 VersionedClause<OMPC_ProcBind>, 560 VersionedClause<OMPC_Schedule>, 561 VersionedClause<OMPC_Ordered>, 562 VersionedClause<OMPC_Collapse> 563 ]; 564} 565def OMP_ParallelForSimd : Directive<"parallel for simd"> { 566 let allowedClauses = [ 567 VersionedClause<OMPC_If>, 568 VersionedClause<OMPC_NumThreads>, 569 VersionedClause<OMPC_Default>, 570 VersionedClause<OMPC_ProcBind>, 571 VersionedClause<OMPC_Private>, 572 VersionedClause<OMPC_FirstPrivate>, 573 VersionedClause<OMPC_Shared>, 574 VersionedClause<OMPC_Reduction>, 575 VersionedClause<OMPC_Copyin>, 576 VersionedClause<OMPC_LastPrivate>, 577 VersionedClause<OMPC_Collapse>, 578 VersionedClause<OMPC_Schedule>, 579 VersionedClause<OMPC_SafeLen>, 580 VersionedClause<OMPC_SimdLen>, 581 VersionedClause<OMPC_Linear>, 582 VersionedClause<OMPC_Aligned>, 583 VersionedClause<OMPC_Ordered>, 584 VersionedClause<OMPC_Allocate>, 585 VersionedClause<OMPC_NonTemporal, 50>, 586 VersionedClause<OMPC_Order, 50> 587 ]; 588} 589def OMP_ParallelDoSimd : Directive<"parallel do simd"> { 590 let allowedClauses = [ 591 VersionedClause<OMPC_Default>, 592 VersionedClause<OMPC_Private>, 593 VersionedClause<OMPC_FirstPrivate>, 594 VersionedClause<OMPC_Shared>, 595 VersionedClause<OMPC_Reduction>, 596 VersionedClause<OMPC_Copyin>, 597 VersionedClause<OMPC_LastPrivate>, 598 VersionedClause<OMPC_Linear>, 599 VersionedClause<OMPC_Aligned>, 600 VersionedClause<OMPC_Allocate>, 601 VersionedClause<OMPC_NonTemporal>, 602 VersionedClause<OMPC_Order> 603 ]; 604 let allowedOnceClauses = [ 605 VersionedClause<OMPC_If>, 606 VersionedClause<OMPC_NumThreads>, 607 VersionedClause<OMPC_ProcBind>, 608 VersionedClause<OMPC_Schedule>, 609 VersionedClause<OMPC_Ordered>, 610 VersionedClause<OMPC_Collapse>, 611 VersionedClause<OMPC_SafeLen>, 612 VersionedClause<OMPC_SimdLen> 613 ]; 614} 615def OMP_ParallelMaster : Directive<"parallel master"> { 616 let allowedClauses = [ 617 VersionedClause<OMPC_If>, 618 VersionedClause<OMPC_NumThreads>, 619 VersionedClause<OMPC_Default>, 620 VersionedClause<OMPC_Private>, 621 VersionedClause<OMPC_FirstPrivate>, 622 VersionedClause<OMPC_Shared>, 623 VersionedClause<OMPC_Copyin>, 624 VersionedClause<OMPC_Reduction>, 625 VersionedClause<OMPC_ProcBind>, 626 VersionedClause<OMPC_Allocate> 627 ]; 628} 629def OMP_ParallelSections : Directive<"parallel sections"> { 630 let allowedClauses = [ 631 VersionedClause<OMPC_If>, 632 VersionedClause<OMPC_Default>, 633 VersionedClause<OMPC_ProcBind>, 634 VersionedClause<OMPC_Private>, 635 VersionedClause<OMPC_FirstPrivate>, 636 VersionedClause<OMPC_Shared>, 637 VersionedClause<OMPC_Reduction>, 638 VersionedClause<OMPC_Copyin>, 639 VersionedClause<OMPC_LastPrivate>, 640 VersionedClause<OMPC_Allocate> 641 ]; 642 let allowedOnceClauses = [ 643 VersionedClause<OMPC_NumThreads> 644 ]; 645} 646def OMP_ForSimd : Directive<"for simd"> { 647 let allowedClauses = [ 648 VersionedClause<OMPC_Private>, 649 VersionedClause<OMPC_FirstPrivate>, 650 VersionedClause<OMPC_LastPrivate>, 651 VersionedClause<OMPC_Reduction>, 652 VersionedClause<OMPC_Schedule>, 653 VersionedClause<OMPC_Collapse>, 654 VersionedClause<OMPC_NoWait>, 655 VersionedClause<OMPC_SafeLen>, 656 VersionedClause<OMPC_SimdLen>, 657 VersionedClause<OMPC_Linear>, 658 VersionedClause<OMPC_Aligned>, 659 VersionedClause<OMPC_Ordered>, 660 VersionedClause<OMPC_Allocate>, 661 VersionedClause<OMPC_If, 50>, 662 VersionedClause<OMPC_NonTemporal, 50>, 663 VersionedClause<OMPC_Order, 50>, 664 ]; 665} 666def OMP_DoSimd : Directive<"do simd"> { 667 let allowedClauses = [ 668 VersionedClause<OMPC_Aligned>, 669 VersionedClause<OMPC_Private>, 670 VersionedClause<OMPC_FirstPrivate>, 671 VersionedClause<OMPC_LastPrivate>, 672 VersionedClause<OMPC_Linear>, 673 VersionedClause<OMPC_Reduction> 674 ]; 675 let allowedOnceClauses = [ 676 VersionedClause<OMPC_Schedule>, 677 VersionedClause<OMPC_Collapse>, 678 VersionedClause<OMPC_Ordered>, 679 VersionedClause<OMPC_SafeLen>, 680 VersionedClause<OMPC_SimdLen>, 681 VersionedClause<OMPC_NoWait> 682 ]; 683} 684def OMP_CancellationPoint : Directive<"cancellation point"> {} 685def OMP_DeclareReduction : Directive<"declare reduction"> {} 686def OMP_DeclareMapper : Directive<"declare mapper"> { 687 let allowedClauses = [ 688 VersionedClause<OMPC_Map> 689 ]; 690} 691def OMP_DeclareSimd : Directive<"declare simd"> { 692 let allowedClauses = [ 693 VersionedClause<OMPC_Linear>, 694 VersionedClause<OMPC_Aligned>, 695 VersionedClause<OMPC_Uniform> 696 ]; 697 let allowedOnceClauses = [ 698 VersionedClause<OMPC_SimdLen> 699 ]; 700 let allowedExclusiveClauses = [ 701 VersionedClause<OMPC_Inbranch>, 702 VersionedClause<OMPC_Notinbranch> 703 ]; 704} 705def OMP_TaskLoop : Directive<"taskloop"> { 706 let allowedClauses = [ 707 VersionedClause<OMPC_Shared>, 708 VersionedClause<OMPC_Private>, 709 VersionedClause<OMPC_FirstPrivate>, 710 VersionedClause<OMPC_LastPrivate>, 711 VersionedClause<OMPC_Default>, 712 VersionedClause<OMPC_Untied>, 713 VersionedClause<OMPC_Mergeable>, 714 VersionedClause<OMPC_NoGroup>, 715 VersionedClause<OMPC_Reduction>, 716 VersionedClause<OMPC_InReduction>, 717 VersionedClause<OMPC_Allocate> 718 ]; 719 let allowedOnceClauses = [ 720 VersionedClause<OMPC_If>, 721 VersionedClause<OMPC_Collapse>, 722 VersionedClause<OMPC_Final>, 723 VersionedClause<OMPC_Priority>, 724 ]; 725 let allowedExclusiveClauses = [ 726 VersionedClause<OMPC_GrainSize>, 727 VersionedClause<OMPC_NumTasks> 728 ]; 729} 730def OMP_TaskLoopSimd : Directive<"taskloop simd"> { 731 let allowedClauses = [ 732 VersionedClause<OMPC_Aligned>, 733 VersionedClause<OMPC_Allocate>, 734 VersionedClause<OMPC_Default>, 735 VersionedClause<OMPC_FirstPrivate>, 736 VersionedClause<OMPC_InReduction>, 737 VersionedClause<OMPC_LastPrivate>, 738 VersionedClause<OMPC_Linear>, 739 VersionedClause<OMPC_Mergeable>, 740 VersionedClause<OMPC_NoGroup>, 741 VersionedClause<OMPC_NonTemporal, 50>, 742 VersionedClause<OMPC_Order, 50>, 743 VersionedClause<OMPC_Private>, 744 VersionedClause<OMPC_Reduction>, 745 VersionedClause<OMPC_Shared>, 746 VersionedClause<OMPC_Untied> 747 ]; 748 let allowedOnceClauses = [ 749 VersionedClause<OMPC_If>, 750 VersionedClause<OMPC_Collapse>, 751 VersionedClause<OMPC_SafeLen>, 752 VersionedClause<OMPC_SimdLen>, 753 VersionedClause<OMPC_Final>, 754 VersionedClause<OMPC_Priority> 755 ]; 756 let allowedExclusiveClauses = [ 757 VersionedClause<OMPC_GrainSize>, 758 VersionedClause<OMPC_NumTasks> 759 ]; 760} 761def OMP_Distribute : Directive<"distribute"> { 762 let allowedClauses = [ 763 VersionedClause<OMPC_Private>, 764 VersionedClause<OMPC_FirstPrivate>, 765 VersionedClause<OMPC_LastPrivate>, 766 VersionedClause<OMPC_Allocate> 767 ]; 768 let allowedOnceClauses = [ 769 VersionedClause<OMPC_Collapse>, 770 VersionedClause<OMPC_DistSchedule> 771 ]; 772} 773def OMP_DeclareTarget : Directive<"declare target"> {} 774def OMP_EndDeclareTarget : Directive<"end declare target"> {} 775def OMP_DistributeParallelFor : Directive<"distribute parallel for"> { 776 let allowedClauses = [ 777 VersionedClause<OMPC_FirstPrivate>, 778 VersionedClause<OMPC_LastPrivate>, 779 VersionedClause<OMPC_Collapse>, 780 VersionedClause<OMPC_DistSchedule>, 781 VersionedClause<OMPC_If>, 782 VersionedClause<OMPC_NumThreads>, 783 VersionedClause<OMPC_Default>, 784 VersionedClause<OMPC_ProcBind>, 785 VersionedClause<OMPC_Private>, 786 VersionedClause<OMPC_Shared>, 787 VersionedClause<OMPC_Reduction>, 788 VersionedClause<OMPC_Copyin>, 789 VersionedClause<OMPC_Schedule>, 790 VersionedClause<OMPC_Allocate>, 791 VersionedClause<OMPC_Order, 50> 792 ]; 793} 794def OMP_DistributeParallelDo : Directive<"distribute parallel do"> { 795 let allowedClauses = [ 796 VersionedClause<OMPC_Private>, 797 VersionedClause<OMPC_FirstPrivate>, 798 VersionedClause<OMPC_LastPrivate>, 799 VersionedClause<OMPC_Allocate>, 800 VersionedClause<OMPC_Order>, 801 VersionedClause<OMPC_Default>, 802 VersionedClause<OMPC_Shared>, 803 VersionedClause<OMPC_Reduction>, 804 VersionedClause<OMPC_Copyin>, 805 VersionedClause<OMPC_Linear> 806 ]; 807 let allowedOnceClauses = [ 808 VersionedClause<OMPC_Collapse>, 809 VersionedClause<OMPC_DistSchedule>, 810 VersionedClause<OMPC_If>, 811 VersionedClause<OMPC_NumThreads>, 812 VersionedClause<OMPC_ProcBind>, 813 VersionedClause<OMPC_Schedule>, 814 VersionedClause<OMPC_Ordered> 815 ]; 816} 817def OMP_DistributeParallelForSimd : Directive<"distribute parallel for simd"> { 818 let allowedClauses = [ 819 VersionedClause<OMPC_FirstPrivate>, 820 VersionedClause<OMPC_LastPrivate>, 821 VersionedClause<OMPC_Collapse>, 822 VersionedClause<OMPC_DistSchedule>, 823 VersionedClause<OMPC_If>, 824 VersionedClause<OMPC_NumThreads>, 825 VersionedClause<OMPC_Default>, 826 VersionedClause<OMPC_ProcBind>, 827 VersionedClause<OMPC_Private>, 828 VersionedClause<OMPC_Shared>, 829 VersionedClause<OMPC_Reduction>, 830 VersionedClause<OMPC_Copyin>, 831 VersionedClause<OMPC_Schedule>, 832 VersionedClause<OMPC_Linear>, 833 VersionedClause<OMPC_Aligned>, 834 VersionedClause<OMPC_SafeLen>, 835 VersionedClause<OMPC_SimdLen>, 836 VersionedClause<OMPC_Allocate>, 837 VersionedClause<OMPC_NonTemporal, 50>, 838 VersionedClause<OMPC_Order, 50> 839 ]; 840} 841def OMP_DistributeParallelDoSimd : Directive<"distribute parallel do simd"> { 842 let allowedClauses = [ 843 VersionedClause<OMPC_FirstPrivate>, 844 VersionedClause<OMPC_LastPrivate>, 845 VersionedClause<OMPC_Collapse>, 846 VersionedClause<OMPC_DistSchedule>, 847 VersionedClause<OMPC_If>, 848 VersionedClause<OMPC_NumThreads>, 849 VersionedClause<OMPC_Default>, 850 VersionedClause<OMPC_ProcBind>, 851 VersionedClause<OMPC_Private>, 852 VersionedClause<OMPC_Shared>, 853 VersionedClause<OMPC_Reduction>, 854 VersionedClause<OMPC_Copyin>, 855 VersionedClause<OMPC_Schedule>, 856 VersionedClause<OMPC_Linear>, 857 VersionedClause<OMPC_Aligned>, 858 VersionedClause<OMPC_SafeLen>, 859 VersionedClause<OMPC_SimdLen>, 860 VersionedClause<OMPC_Allocate>, 861 VersionedClause<OMPC_NonTemporal>, 862 VersionedClause<OMPC_Order> 863 ]; 864} 865def OMP_DistributeSimd : Directive<"distribute simd"> { 866 let allowedClauses = [ 867 VersionedClause<OMPC_Aligned>, 868 VersionedClause<OMPC_Allocate>, 869 VersionedClause<OMPC_Copyin>, 870 VersionedClause<OMPC_Default>, 871 VersionedClause<OMPC_Linear>, 872 VersionedClause<OMPC_FirstPrivate>, 873 VersionedClause<OMPC_LastPrivate>, 874 VersionedClause<OMPC_NonTemporal, 50>, 875 VersionedClause<OMPC_Order, 50>, 876 VersionedClause<OMPC_Private>, 877 VersionedClause<OMPC_Reduction> 878 ]; 879 let allowedOnceClauses = [ 880 VersionedClause<OMPC_Collapse>, 881 VersionedClause<OMPC_DistSchedule>, 882 VersionedClause<OMPC_If, 50>, 883 VersionedClause<OMPC_NumThreads>, 884 VersionedClause<OMPC_Ordered>, 885 VersionedClause<OMPC_ProcBind>, 886 VersionedClause<OMPC_Schedule>, 887 VersionedClause<OMPC_SafeLen>, 888 VersionedClause<OMPC_SimdLen> 889 ]; 890} 891 892def OMP_TargetParallelForSimd : Directive<"target parallel for simd"> { 893 let allowedClauses = [ 894 VersionedClause<OMPC_If>, 895 VersionedClause<OMPC_Device>, 896 VersionedClause<OMPC_Map>, 897 VersionedClause<OMPC_Private>, 898 VersionedClause<OMPC_FirstPrivate>, 899 VersionedClause<OMPC_LastPrivate>, 900 VersionedClause<OMPC_NoWait>, 901 VersionedClause<OMPC_Depend>, 902 VersionedClause<OMPC_DefaultMap>, 903 VersionedClause<OMPC_NumThreads>, 904 VersionedClause<OMPC_Default>, 905 VersionedClause<OMPC_ProcBind>, 906 VersionedClause<OMPC_Shared>, 907 VersionedClause<OMPC_Reduction>, 908 VersionedClause<OMPC_Collapse>, 909 VersionedClause<OMPC_Schedule>, 910 VersionedClause<OMPC_Ordered>, 911 VersionedClause<OMPC_Linear>, 912 VersionedClause<OMPC_SafeLen>, 913 VersionedClause<OMPC_SimdLen>, 914 VersionedClause<OMPC_Aligned>, 915 VersionedClause<OMPC_IsDevicePtr>, 916 VersionedClause<OMPC_Allocate>, 917 VersionedClause<OMPC_NonTemporal, 50>, 918 VersionedClause<OMPC_Order, 50>, 919 VersionedClause<OMPC_UsesAllocators, 50> 920 ]; 921} 922def OMP_TargetParallelDoSimd : Directive<"target parallel do simd"> { 923 let allowedClauses = [ 924 VersionedClause<OMPC_If>, 925 VersionedClause<OMPC_Device>, 926 VersionedClause<OMPC_Map>, 927 VersionedClause<OMPC_Private>, 928 VersionedClause<OMPC_FirstPrivate>, 929 VersionedClause<OMPC_LastPrivate>, 930 VersionedClause<OMPC_NoWait>, 931 VersionedClause<OMPC_Depend>, 932 VersionedClause<OMPC_DefaultMap>, 933 VersionedClause<OMPC_NumThreads>, 934 VersionedClause<OMPC_Default>, 935 VersionedClause<OMPC_ProcBind>, 936 VersionedClause<OMPC_Shared>, 937 VersionedClause<OMPC_Reduction>, 938 VersionedClause<OMPC_Collapse>, 939 VersionedClause<OMPC_Schedule>, 940 VersionedClause<OMPC_Ordered>, 941 VersionedClause<OMPC_Linear>, 942 VersionedClause<OMPC_SafeLen>, 943 VersionedClause<OMPC_SimdLen>, 944 VersionedClause<OMPC_Aligned>, 945 VersionedClause<OMPC_IsDevicePtr>, 946 VersionedClause<OMPC_Allocate>, 947 VersionedClause<OMPC_NonTemporal>, 948 VersionedClause<OMPC_Order>, 949 VersionedClause<OMPC_UsesAllocators> 950 ]; 951} 952def OMP_TargetSimd : Directive<"target simd"> { 953 let allowedClauses = [ 954 VersionedClause<OMPC_Aligned>, 955 VersionedClause<OMPC_Allocate>, 956 VersionedClause<OMPC_Depend>, 957 VersionedClause<OMPC_FirstPrivate>, 958 VersionedClause<OMPC_IsDevicePtr>, 959 VersionedClause<OMPC_LastPrivate>, 960 VersionedClause<OMPC_Linear>, 961 VersionedClause<OMPC_Map>, 962 VersionedClause<OMPC_NonTemporal, 50>, 963 VersionedClause<OMPC_NoWait>, 964 VersionedClause<OMPC_Order, 50>, 965 VersionedClause<OMPC_Private>, 966 VersionedClause<OMPC_Reduction>, 967 VersionedClause<OMPC_Shared>, 968 VersionedClause<OMPC_UsesAllocators, 50> 969 ]; 970 let allowedOnceClauses = [ 971 VersionedClause<OMPC_Collapse>, 972 VersionedClause<OMPC_SafeLen>, 973 VersionedClause<OMPC_SimdLen>, 974 VersionedClause<OMPC_If>, 975 VersionedClause<OMPC_NumThreads>, 976 VersionedClause<OMPC_ProcBind>, 977 VersionedClause<OMPC_Device>, 978 VersionedClause<OMPC_DefaultMap>, 979 VersionedClause<OMPC_Schedule> 980 ]; 981} 982def OMP_TeamsDistribute : Directive<"teams distribute"> { 983 let allowedClauses = [ 984 VersionedClause<OMPC_Default>, 985 VersionedClause<OMPC_Private>, 986 VersionedClause<OMPC_FirstPrivate>, 987 VersionedClause<OMPC_Shared>, 988 VersionedClause<OMPC_Reduction>, 989 VersionedClause<OMPC_NumTeams>, 990 VersionedClause<OMPC_ThreadLimit>, 991 VersionedClause<OMPC_LastPrivate>, 992 VersionedClause<OMPC_Collapse>, 993 VersionedClause<OMPC_DistSchedule>, 994 VersionedClause<OMPC_Allocate> 995 ]; 996} 997def OMP_TeamsDistributeSimd : Directive<"teams distribute simd"> { 998 let allowedClauses = [ 999 VersionedClause<OMPC_Aligned>, 1000 VersionedClause<OMPC_Allocate>, 1001 VersionedClause<OMPC_FirstPrivate>, 1002 VersionedClause<OMPC_LastPrivate>, 1003 VersionedClause<OMPC_Linear>, 1004 VersionedClause<OMPC_NonTemporal, 50>, 1005 VersionedClause<OMPC_Order, 50>, 1006 VersionedClause<OMPC_Private>, 1007 VersionedClause<OMPC_Reduction>, 1008 VersionedClause<OMPC_Shared> 1009 ]; 1010 let allowedOnceClauses = [ 1011 VersionedClause<OMPC_Collapse>, 1012 VersionedClause<OMPC_Default>, 1013 VersionedClause<OMPC_DistSchedule>, 1014 VersionedClause<OMPC_If, 50>, 1015 VersionedClause<OMPC_NumTeams>, 1016 VersionedClause<OMPC_SafeLen>, 1017 VersionedClause<OMPC_SimdLen>, 1018 VersionedClause<OMPC_ThreadLimit> 1019 ]; 1020} 1021 1022def OMP_TeamsDistributeParallelForSimd : 1023 Directive<"teams distribute parallel for simd"> { 1024 let allowedClauses = [ 1025 VersionedClause<OMPC_FirstPrivate>, 1026 VersionedClause<OMPC_LastPrivate>, 1027 VersionedClause<OMPC_Collapse>, 1028 VersionedClause<OMPC_DistSchedule>, 1029 VersionedClause<OMPC_If>, 1030 VersionedClause<OMPC_NumThreads>, 1031 VersionedClause<OMPC_Default>, 1032 VersionedClause<OMPC_ProcBind>, 1033 VersionedClause<OMPC_Private>, 1034 VersionedClause<OMPC_Shared>, 1035 VersionedClause<OMPC_Reduction>, 1036 VersionedClause<OMPC_Schedule>, 1037 VersionedClause<OMPC_Linear>, 1038 VersionedClause<OMPC_Aligned>, 1039 VersionedClause<OMPC_SafeLen>, 1040 VersionedClause<OMPC_SimdLen>, 1041 VersionedClause<OMPC_NumTeams>, 1042 VersionedClause<OMPC_ThreadLimit>, 1043 VersionedClause<OMPC_Allocate>, 1044 VersionedClause<OMPC_NonTemporal, 50>, 1045 VersionedClause<OMPC_Order, 50> 1046 ]; 1047} 1048def OMP_TeamsDistributeParallelDoSimd : 1049 Directive<"teams distribute parallel do simd"> { 1050 let allowedClauses = [ 1051 VersionedClause<OMPC_Private>, 1052 VersionedClause<OMPC_FirstPrivate>, 1053 VersionedClause<OMPC_LastPrivate>, 1054 VersionedClause<OMPC_Allocate>, 1055 VersionedClause<OMPC_Shared>, 1056 VersionedClause<OMPC_Reduction>, 1057 VersionedClause<OMPC_Linear>, 1058 VersionedClause<OMPC_Order>, 1059 VersionedClause<OMPC_Aligned>, 1060 VersionedClause<OMPC_NonTemporal> 1061 ]; 1062 let allowedOnceClauses = [ 1063 VersionedClause<OMPC_Default>, 1064 VersionedClause<OMPC_NumTeams>, 1065 VersionedClause<OMPC_ThreadLimit>, 1066 VersionedClause<OMPC_Collapse>, 1067 VersionedClause<OMPC_DistSchedule>, 1068 VersionedClause<OMPC_NumThreads>, 1069 VersionedClause<OMPC_ProcBind>, 1070 VersionedClause<OMPC_Schedule>, 1071 VersionedClause<OMPC_SafeLen>, 1072 VersionedClause<OMPC_SimdLen>, 1073 VersionedClause<OMPC_If>, 1074 ]; 1075} 1076def OMP_TeamsDistributeParallelFor : 1077 Directive<"teams distribute parallel for"> { 1078 let allowedClauses = [ 1079 VersionedClause<OMPC_FirstPrivate>, 1080 VersionedClause<OMPC_LastPrivate>, 1081 VersionedClause<OMPC_Collapse>, 1082 VersionedClause<OMPC_DistSchedule>, 1083 VersionedClause<OMPC_If>, 1084 VersionedClause<OMPC_NumThreads>, 1085 VersionedClause<OMPC_Default>, 1086 VersionedClause<OMPC_ProcBind>, 1087 VersionedClause<OMPC_Private>, 1088 VersionedClause<OMPC_Shared>, 1089 VersionedClause<OMPC_Reduction>, 1090 VersionedClause<OMPC_Schedule>, 1091 VersionedClause<OMPC_NumTeams>, 1092 VersionedClause<OMPC_ThreadLimit>, 1093 VersionedClause<OMPC_Copyin>, 1094 VersionedClause<OMPC_Allocate>, 1095 VersionedClause<OMPC_Order, 50> 1096 ]; 1097} 1098def OMP_TeamsDistributeParallelDo : 1099 Directive<"teams distribute parallel do"> { 1100 let allowedClauses = [ 1101 VersionedClause<OMPC_Private>, 1102 VersionedClause<OMPC_FirstPrivate>, 1103 VersionedClause<OMPC_LastPrivate>, 1104 VersionedClause<OMPC_Shared>, 1105 VersionedClause<OMPC_Reduction>, 1106 VersionedClause<OMPC_Allocate>, 1107 VersionedClause<OMPC_Copyin>, 1108 VersionedClause<OMPC_Linear> 1109 ]; 1110let allowedOnceClauses = [ 1111 VersionedClause<OMPC_NumTeams>, 1112 VersionedClause<OMPC_ThreadLimit>, 1113 VersionedClause<OMPC_Default>, 1114 VersionedClause<OMPC_Collapse>, 1115 VersionedClause<OMPC_DistSchedule>, 1116 VersionedClause<OMPC_Ordered>, 1117 VersionedClause<OMPC_Order>, 1118 VersionedClause<OMPC_If>, 1119 VersionedClause<OMPC_NumThreads>, 1120 VersionedClause<OMPC_ProcBind>, 1121 VersionedClause<OMPC_Schedule> 1122 ]; 1123} 1124def OMP_TargetTeams : Directive<"target teams"> { 1125 let allowedClauses = [ 1126 VersionedClause<OMPC_If>, 1127 VersionedClause<OMPC_Map>, 1128 VersionedClause<OMPC_Private>, 1129 VersionedClause<OMPC_Depend>, 1130 VersionedClause<OMPC_FirstPrivate>, 1131 VersionedClause<OMPC_IsDevicePtr>, 1132 VersionedClause<OMPC_Reduction>, 1133 VersionedClause<OMPC_Allocate>, 1134 VersionedClause<OMPC_UsesAllocators, 50>, 1135 VersionedClause<OMPC_Shared> 1136 ]; 1137 1138 let allowedOnceClauses = [ 1139 VersionedClause<OMPC_Device>, 1140 VersionedClause<OMPC_NoWait>, 1141 VersionedClause<OMPC_DefaultMap>, 1142 VersionedClause<OMPC_Default>, 1143 VersionedClause<OMPC_NumTeams>, 1144 VersionedClause<OMPC_ThreadLimit> 1145 ]; 1146} 1147def OMP_TargetTeamsDistribute : Directive<"target teams distribute"> { 1148 let allowedClauses = [ 1149 VersionedClause<OMPC_If>, 1150 VersionedClause<OMPC_Map>, 1151 VersionedClause<OMPC_Private>, 1152 VersionedClause<OMPC_Depend>, 1153 VersionedClause<OMPC_FirstPrivate>, 1154 VersionedClause<OMPC_IsDevicePtr>, 1155 VersionedClause<OMPC_Reduction>, 1156 VersionedClause<OMPC_Allocate>, 1157 VersionedClause<OMPC_UsesAllocators, 50>, 1158 VersionedClause<OMPC_Shared>, 1159 VersionedClause<OMPC_LastPrivate> 1160 ]; 1161 let allowedOnceClauses = [ 1162 VersionedClause<OMPC_Device>, 1163 VersionedClause<OMPC_NoWait>, 1164 VersionedClause<OMPC_DefaultMap>, 1165 VersionedClause<OMPC_Default>, 1166 VersionedClause<OMPC_NumTeams>, 1167 VersionedClause<OMPC_ThreadLimit>, 1168 VersionedClause<OMPC_Collapse>, 1169 VersionedClause<OMPC_DistSchedule> 1170 ]; 1171} 1172 1173def OMP_TargetTeamsDistributeParallelFor : 1174 Directive<"target teams distribute parallel for"> { 1175 let allowedClauses = [ 1176 VersionedClause<OMPC_If>, 1177 VersionedClause<OMPC_Device>, 1178 VersionedClause<OMPC_Map>, 1179 VersionedClause<OMPC_Private>, 1180 VersionedClause<OMPC_NoWait>, 1181 VersionedClause<OMPC_Depend>, 1182 VersionedClause<OMPC_DefaultMap>, 1183 VersionedClause<OMPC_FirstPrivate>, 1184 VersionedClause<OMPC_IsDevicePtr>, 1185 VersionedClause<OMPC_Default>, 1186 VersionedClause<OMPC_Shared>, 1187 VersionedClause<OMPC_Reduction>, 1188 VersionedClause<OMPC_NumTeams>, 1189 VersionedClause<OMPC_ThreadLimit>, 1190 VersionedClause<OMPC_LastPrivate>, 1191 VersionedClause<OMPC_Collapse>, 1192 VersionedClause<OMPC_DistSchedule>, 1193 VersionedClause<OMPC_NumThreads>, 1194 VersionedClause<OMPC_ProcBind>, 1195 VersionedClause<OMPC_Schedule>, 1196 VersionedClause<OMPC_Allocate>, 1197 VersionedClause<OMPC_Order, 50>, 1198 VersionedClause<OMPC_UsesAllocators, 50> 1199 ]; 1200} 1201def OMP_TargetTeamsDistributeParallelDo : 1202 Directive<"target teams distribute parallel do"> { 1203 let allowedClauses = [ 1204 VersionedClause<OMPC_If>, 1205 VersionedClause<OMPC_Map>, 1206 VersionedClause<OMPC_Private>, 1207 VersionedClause<OMPC_Depend>, 1208 VersionedClause<OMPC_FirstPrivate>, 1209 VersionedClause<OMPC_IsDevicePtr>, 1210 VersionedClause<OMPC_Reduction>, 1211 VersionedClause<OMPC_Allocate>, 1212 VersionedClause<OMPC_UsesAllocators>, 1213 VersionedClause<OMPC_Shared>, 1214 VersionedClause<OMPC_LastPrivate>, 1215 VersionedClause<OMPC_Copyin>, 1216 VersionedClause<OMPC_Linear>, 1217 VersionedClause<OMPC_Ordered>, 1218 VersionedClause<OMPC_Order> 1219 ]; 1220 let allowedOnceClauses = [ 1221 VersionedClause<OMPC_Device>, 1222 VersionedClause<OMPC_DefaultMap>, 1223 VersionedClause<OMPC_NoWait>, 1224 VersionedClause<OMPC_Default>, 1225 VersionedClause<OMPC_NumTeams>, 1226 VersionedClause<OMPC_ThreadLimit>, 1227 VersionedClause<OMPC_Collapse>, 1228 VersionedClause<OMPC_DistSchedule>, 1229 VersionedClause<OMPC_NumThreads>, 1230 VersionedClause<OMPC_ProcBind>, 1231 VersionedClause<OMPC_Schedule>, 1232 ]; 1233} 1234def OMP_TargetTeamsDistributeParallelForSimd : 1235 Directive<"target teams distribute parallel for simd"> { 1236 let allowedClauses = [ 1237 VersionedClause<OMPC_If>, 1238 VersionedClause<OMPC_Device>, 1239 VersionedClause<OMPC_Map>, 1240 VersionedClause<OMPC_Private>, 1241 VersionedClause<OMPC_NoWait>, 1242 VersionedClause<OMPC_Depend>, 1243 VersionedClause<OMPC_DefaultMap>, 1244 VersionedClause<OMPC_FirstPrivate>, 1245 VersionedClause<OMPC_IsDevicePtr>, 1246 VersionedClause<OMPC_Default>, 1247 VersionedClause<OMPC_Shared>, 1248 VersionedClause<OMPC_Reduction>, 1249 VersionedClause<OMPC_NumTeams>, 1250 VersionedClause<OMPC_ThreadLimit>, 1251 VersionedClause<OMPC_LastPrivate>, 1252 VersionedClause<OMPC_Collapse>, 1253 VersionedClause<OMPC_DistSchedule>, 1254 VersionedClause<OMPC_NumThreads>, 1255 VersionedClause<OMPC_ProcBind>, 1256 VersionedClause<OMPC_Schedule>, 1257 VersionedClause<OMPC_Linear>, 1258 VersionedClause<OMPC_Aligned>, 1259 VersionedClause<OMPC_SafeLen>, 1260 VersionedClause<OMPC_SimdLen>, 1261 VersionedClause<OMPC_Allocate>, 1262 VersionedClause<OMPC_NonTemporal, 50>, 1263 VersionedClause<OMPC_Order, 50>, 1264 VersionedClause<OMPC_UsesAllocators, 50> 1265 ]; 1266} 1267def OMP_TargetTeamsDistributeParallelDoSimd : 1268 Directive<"target teams distribute parallel do simd"> { 1269 let allowedClauses = [ 1270 VersionedClause<OMPC_Map>, 1271 VersionedClause<OMPC_Private>, 1272 VersionedClause<OMPC_Depend>, 1273 VersionedClause<OMPC_FirstPrivate>, 1274 VersionedClause<OMPC_IsDevicePtr>, 1275 VersionedClause<OMPC_Reduction>, 1276 VersionedClause<OMPC_Allocate>, 1277 VersionedClause<OMPC_UsesAllocators>, 1278 VersionedClause<OMPC_Shared>, 1279 VersionedClause<OMPC_LastPrivate>, 1280 VersionedClause<OMPC_Copyin>, 1281 VersionedClause<OMPC_Linear>, 1282 VersionedClause<OMPC_Ordered>, 1283 VersionedClause<OMPC_Order>, 1284 VersionedClause<OMPC_Aligned>, 1285 VersionedClause<OMPC_NonTemporal> 1286 ]; 1287 let allowedOnceClauses = [ 1288 VersionedClause<OMPC_If>, 1289 VersionedClause<OMPC_Device>, 1290 VersionedClause<OMPC_NoWait>, 1291 VersionedClause<OMPC_DefaultMap>, 1292 VersionedClause<OMPC_Default>, 1293 VersionedClause<OMPC_NumTeams>, 1294 VersionedClause<OMPC_ThreadLimit>, 1295 VersionedClause<OMPC_Collapse>, 1296 VersionedClause<OMPC_DistSchedule>, 1297 VersionedClause<OMPC_NumThreads>, 1298 VersionedClause<OMPC_ProcBind>, 1299 VersionedClause<OMPC_Schedule>, 1300 VersionedClause<OMPC_SafeLen>, 1301 VersionedClause<OMPC_SimdLen> 1302 ]; 1303} 1304def OMP_TargetTeamsDistributeSimd : 1305 Directive<"target teams distribute simd"> { 1306 let allowedClauses = [ 1307 VersionedClause<OMPC_Aligned>, 1308 VersionedClause<OMPC_Allocate>, 1309 VersionedClause<OMPC_Depend>, 1310 VersionedClause<OMPC_FirstPrivate>, 1311 VersionedClause<OMPC_If>, 1312 VersionedClause<OMPC_IsDevicePtr>, 1313 VersionedClause<OMPC_LastPrivate>, 1314 VersionedClause<OMPC_Linear>, 1315 VersionedClause<OMPC_Map>, 1316 VersionedClause<OMPC_NonTemporal, 50>, 1317 VersionedClause<OMPC_Order, 50>, 1318 VersionedClause<OMPC_Private>, 1319 VersionedClause<OMPC_Reduction>, 1320 VersionedClause<OMPC_Shared>, 1321 VersionedClause<OMPC_UsesAllocators, 50> 1322 ]; 1323 let allowedOnceClauses = [ 1324 VersionedClause<OMPC_Device>, 1325 VersionedClause<OMPC_DefaultMap>, 1326 VersionedClause<OMPC_NoWait>, 1327 VersionedClause<OMPC_NumTeams>, 1328 VersionedClause<OMPC_ThreadLimit>, 1329 VersionedClause<OMPC_Collapse>, 1330 VersionedClause<OMPC_DistSchedule>, 1331 VersionedClause<OMPC_SafeLen>, 1332 VersionedClause<OMPC_SimdLen>, 1333 ]; 1334} 1335def OMP_Allocate : Directive<"allocate"> { 1336 let allowedClauses = [ 1337 VersionedClause<OMPC_Allocator> 1338 ]; 1339} 1340def OMP_DeclareVariant : Directive<"declare variant"> { 1341 let allowedClauses = [ 1342 VersionedClause<OMPC_Match> 1343 ]; 1344} 1345def OMP_MasterTaskloop : Directive<"master taskloop"> { 1346 let allowedClauses = [ 1347 VersionedClause<OMPC_If>, 1348 VersionedClause<OMPC_Shared>, 1349 VersionedClause<OMPC_Private>, 1350 VersionedClause<OMPC_FirstPrivate>, 1351 VersionedClause<OMPC_LastPrivate>, 1352 VersionedClause<OMPC_Default>, 1353 VersionedClause<OMPC_Collapse>, 1354 VersionedClause<OMPC_Final>, 1355 VersionedClause<OMPC_Untied>, 1356 VersionedClause<OMPC_Mergeable>, 1357 VersionedClause<OMPC_Priority>, 1358 VersionedClause<OMPC_GrainSize>, 1359 VersionedClause<OMPC_NoGroup>, 1360 VersionedClause<OMPC_NumTasks>, 1361 VersionedClause<OMPC_Reduction>, 1362 VersionedClause<OMPC_InReduction>, 1363 VersionedClause<OMPC_Allocate> 1364 ]; 1365} 1366def OMP_ParallelMasterTaskloop : 1367 Directive<"parallel master taskloop"> { 1368 let allowedClauses = [ 1369 VersionedClause<OMPC_If>, 1370 VersionedClause<OMPC_Shared>, 1371 VersionedClause<OMPC_Private>, 1372 VersionedClause<OMPC_FirstPrivate>, 1373 VersionedClause<OMPC_LastPrivate>, 1374 VersionedClause<OMPC_Default>, 1375 VersionedClause<OMPC_Collapse>, 1376 VersionedClause<OMPC_Final>, 1377 VersionedClause<OMPC_Untied>, 1378 VersionedClause<OMPC_Mergeable>, 1379 VersionedClause<OMPC_Priority>, 1380 VersionedClause<OMPC_GrainSize>, 1381 VersionedClause<OMPC_NoGroup>, 1382 VersionedClause<OMPC_NumTasks>, 1383 VersionedClause<OMPC_Reduction>, 1384 VersionedClause<OMPC_Allocate>, 1385 VersionedClause<OMPC_NumThreads>, 1386 VersionedClause<OMPC_ProcBind>, 1387 VersionedClause<OMPC_Copyin> 1388 ]; 1389} 1390def OMP_MasterTaskloopSimd : Directive<"master taskloop simd"> { 1391 let allowedClauses = [ 1392 VersionedClause<OMPC_If>, 1393 VersionedClause<OMPC_Shared>, 1394 VersionedClause<OMPC_Private>, 1395 VersionedClause<OMPC_FirstPrivate>, 1396 VersionedClause<OMPC_LastPrivate>, 1397 VersionedClause<OMPC_Default>, 1398 VersionedClause<OMPC_Collapse>, 1399 VersionedClause<OMPC_Final>, 1400 VersionedClause<OMPC_Untied>, 1401 VersionedClause<OMPC_Mergeable>, 1402 VersionedClause<OMPC_Priority>, 1403 VersionedClause<OMPC_Linear>, 1404 VersionedClause<OMPC_Aligned>, 1405 VersionedClause<OMPC_SafeLen>, 1406 VersionedClause<OMPC_SimdLen>, 1407 VersionedClause<OMPC_GrainSize>, 1408 VersionedClause<OMPC_NoGroup>, 1409 VersionedClause<OMPC_NumTasks>, 1410 VersionedClause<OMPC_Reduction>, 1411 VersionedClause<OMPC_InReduction>, 1412 VersionedClause<OMPC_Allocate>, 1413 VersionedClause<OMPC_NonTemporal, 50>, 1414 VersionedClause<OMPC_Order, 50> 1415 ]; 1416} 1417def OMP_ParallelMasterTaskloopSimd : 1418 Directive<"parallel master taskloop simd"> { 1419 let allowedClauses = [ 1420 VersionedClause<OMPC_If>, 1421 VersionedClause<OMPC_Shared>, 1422 VersionedClause<OMPC_Private>, 1423 VersionedClause<OMPC_FirstPrivate>, 1424 VersionedClause<OMPC_LastPrivate>, 1425 VersionedClause<OMPC_Default>, 1426 VersionedClause<OMPC_Collapse>, 1427 VersionedClause<OMPC_Final>, 1428 VersionedClause<OMPC_Untied>, 1429 VersionedClause<OMPC_Mergeable>, 1430 VersionedClause<OMPC_Priority>, 1431 VersionedClause<OMPC_GrainSize>, 1432 VersionedClause<OMPC_NoGroup>, 1433 VersionedClause<OMPC_NumTasks>, 1434 VersionedClause<OMPC_Reduction>, 1435 VersionedClause<OMPC_Allocate>, 1436 VersionedClause<OMPC_NumThreads>, 1437 VersionedClause<OMPC_ProcBind>, 1438 VersionedClause<OMPC_Copyin>, 1439 VersionedClause<OMPC_Linear>, 1440 VersionedClause<OMPC_Aligned>, 1441 VersionedClause<OMPC_SafeLen>, 1442 VersionedClause<OMPC_SimdLen>, 1443 VersionedClause<OMPC_NonTemporal, 50>, 1444 VersionedClause<OMPC_Order, 50> 1445 ]; 1446} 1447def OMP_Depobj : Directive<"depobj"> { 1448 let allowedClauses = [ 1449 VersionedClause<OMPC_Depend, 50>, 1450 VersionedClause<OMPC_Destroy, 50>, 1451 VersionedClause<OMPC_Update, 50>, 1452 // TODO This should ne `none` instead. Comment carried over from 1453 // OMPKinds.def. 1454 VersionedClause<OMPC_Depobj, 50> 1455 ]; 1456} 1457def OMP_Scan : Directive<"scan"> { 1458 let allowedClauses = [ 1459 VersionedClause<OMPC_Inclusive, 50>, 1460 VersionedClause<OMPC_Exclusive, 50> 1461 ]; 1462} 1463def OMP_BeginDeclareVariant : Directive<"begin declare variant"> {} 1464def OMP_EndDeclareVariant : Directive<"end declare variant"> {} 1465def OMP_ParallelWorkshare : Directive<"parallel workshare"> { 1466 let allowedClauses = [ 1467 VersionedClause<OMPC_Allocate>, 1468 VersionedClause<OMPC_Copyin>, 1469 VersionedClause<OMPC_Default>, 1470 VersionedClause<OMPC_FirstPrivate>, 1471 VersionedClause<OMPC_Private>, 1472 VersionedClause<OMPC_Reduction>, 1473 VersionedClause<OMPC_Shared> 1474 ]; 1475 let allowedOnceClauses = [ 1476 VersionedClause<OMPC_If>, 1477 VersionedClause<OMPC_NumThreads>, 1478 VersionedClause<OMPC_ProcBind> 1479 ]; 1480} 1481def OMP_Workshare : Directive<"workshare"> {} 1482def OMP_EndDo : Directive<"end do"> {} 1483def OMP_EndDoSimd : Directive<"end do simd"> {} 1484def OMP_EndSections : Directive<"end sections"> {} 1485def OMP_EndSingle : Directive<"end single"> {} 1486def OMP_EndWorkshare : Directive<"end workshare"> {} 1487def OMP_Unknown : Directive<"unknown"> { 1488 let isDefault = 1; 1489} 1490