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 = true; 25 let enableBitmaskEnumInNamespace = true; 26 let clauseEnumSetClass = "OmpClauseSet"; 27 let flangClauseBaseClass = "OmpClause"; 28} 29 30//===----------------------------------------------------------------------===// 31// Definitions of OpenMP clauses 32// Sorted alphabetically wrt clause spelling. 33//===----------------------------------------------------------------------===// 34 35def OMPC_Acquire : Clause<"acquire"> { 36 let clangClass = "OMPAcquireClause"; 37} 38def OMPC_AcqRel : Clause<"acq_rel"> { 39 let clangClass = "OMPAcqRelClause"; 40} 41def OMPC_AdjustArgs : Clause<"adjust_args"> { 42} 43def OMPC_Affinity : Clause<"affinity"> { 44 let clangClass = "OMPAffinityClause"; 45} 46def OMPC_Align : Clause<"align"> { 47 let clangClass = "OMPAlignClause"; 48} 49def OMPC_Aligned : Clause<"aligned"> { 50 let clangClass = "OMPAlignedClause"; 51 let flangClass = "OmpAlignedClause"; 52} 53def OMPC_Allocate : Clause<"allocate"> { 54 let clangClass = "OMPAllocateClause"; 55 let flangClass = "OmpAllocateClause"; 56} 57def OMPC_Allocator : Clause<"allocator"> { 58 let clangClass = "OMPAllocatorClause"; 59 let flangClass = "ScalarIntExpr"; 60} 61def OMPC_AppendArgs : Clause<"append_args"> { 62} 63def OMPC_At : Clause<"at"> { 64 let clangClass = "OMPAtClause"; 65} 66def OMPC_AtomicDefaultMemOrder : Clause<"atomic_default_mem_order"> { 67 let clangClass = "OMPAtomicDefaultMemOrderClause"; 68 let flangClass = "OmpAtomicDefaultMemOrderClause"; 69} 70def OMPC_Bind : Clause<"bind"> { 71 let clangClass = "OMPBindClause"; 72} 73def OMP_CANCELLATION_CONSTRUCT_Parallel : ClauseVal<"parallel", 1, 1> {} 74def OMP_CANCELLATION_CONSTRUCT_Loop : ClauseVal<"loop", 2, 1> {} 75def OMP_CANCELLATION_CONSTRUCT_Sections : ClauseVal<"sections", 3, 1> {} 76def OMP_CANCELLATION_CONSTRUCT_Taskgroup : ClauseVal<"taskgroup", 4, 1> {} 77def OMP_CANCELLATION_CONSTRUCT_None : ClauseVal<"none", 5, 0> { 78 let isDefault = 1; 79} 80def OMPC_CancellationConstructType : Clause<"cancellation_construct_type"> { 81 let enumClauseValue = "CancellationConstructType"; 82 let allowedClauseValues = [ 83 OMP_CANCELLATION_CONSTRUCT_Parallel, 84 OMP_CANCELLATION_CONSTRUCT_Loop, 85 OMP_CANCELLATION_CONSTRUCT_Sections, 86 OMP_CANCELLATION_CONSTRUCT_Taskgroup, 87 OMP_CANCELLATION_CONSTRUCT_None 88 ]; 89} 90def OMPC_Capture : Clause<"capture"> { 91 let clangClass = "OMPCaptureClause"; 92} 93def OMPC_Collapse : Clause<"collapse"> { 94 let clangClass = "OMPCollapseClause"; 95 let flangClass = "ScalarIntConstantExpr"; 96} 97def OMPC_Compare : Clause<"compare"> { 98 let clangClass = "OMPCompareClause"; 99} 100def OMPC_Copyin : Clause<"copyin"> { 101 let clangClass = "OMPCopyinClause"; 102 let flangClass = "OmpObjectList"; 103} 104def OMPC_CopyPrivate : Clause<"copyprivate"> { 105 let clangClass = "OMPCopyprivateClause"; 106 let flangClass = "OmpObjectList"; 107} 108def OMPC_Default : Clause<"default"> { 109 let clangClass = "OMPDefaultClause"; 110 let flangClass = "OmpDefaultClause"; 111} 112def OMPC_DefaultMap : Clause<"defaultmap"> { 113 let clangClass = "OMPDefaultmapClause"; 114 let flangClass = "OmpDefaultmapClause"; 115} 116def OMPC_Depend : Clause<"depend"> { 117 let clangClass = "OMPDependClause"; 118 let flangClass = "OmpDependClause"; 119} 120def OMPC_Depobj : Clause<"depobj"> { 121 let clangClass = "OMPDepobjClause"; 122 let isImplicit = true; 123} 124def OMPC_Destroy : Clause<"destroy"> { 125 let clangClass = "OMPDestroyClause"; 126} 127def OMPC_Detach : Clause<"detach"> { 128 let clangClass = "OMPDetachClause"; 129} 130def OMPC_Device : Clause<"device"> { 131 let clangClass = "OMPDeviceClause"; 132 let flangClass = "OmpDeviceClause"; 133} 134def OMPC_DeviceType : Clause<"device_type"> { 135 let flangClass = "OmpDeviceTypeClause"; 136} 137def OMPC_DistSchedule : Clause<"dist_schedule"> { 138 let clangClass = "OMPDistScheduleClause"; 139 let flangClass = "ScalarIntExpr"; 140 let isValueOptional = true; 141} 142def OMPC_Doacross : Clause<"doacross"> { 143 let clangClass = "OMPDoacrossClause"; 144} 145def OMPC_DynamicAllocators : Clause<"dynamic_allocators"> { 146 let clangClass = "OMPDynamicAllocatorsClause"; 147} 148def OMPC_Enter : Clause<"enter"> { 149 let flangClass = "OmpObjectList"; 150} 151def OMPC_Exclusive : Clause<"exclusive"> { 152 let clangClass = "OMPExclusiveClause"; 153} 154def OMPC_Fail : Clause<"fail"> { 155 let clangClass = "OMPFailClause"; 156} 157def OMPC_Filter : Clause<"filter"> { 158 let clangClass = "OMPFilterClause"; 159 let flangClass = "ScalarIntExpr"; 160} 161def OMPC_Final : Clause<"final"> { 162 let clangClass = "OMPFinalClause"; 163 let flangClass = "ScalarLogicalExpr"; 164} 165def OMPC_FirstPrivate : Clause<"firstprivate"> { 166 let clangClass = "OMPFirstprivateClause"; 167 let flangClass = "OmpObjectList"; 168} 169def OMPC_Flush : Clause<"flush"> { 170 let clangClass = "OMPFlushClause"; 171 let isImplicit = true; 172} 173def OMPC_From : Clause<"from"> { 174 let clangClass = "OMPFromClause"; 175 let flangClass = "OmpObjectList"; 176} 177def OMPC_Full: Clause<"full"> { 178 let clangClass = "OMPFullClause"; 179} 180def OMP_GRAINSIZE_Strict : ClauseVal<"strict", 1, 1> {} 181def OMP_GRAINSIZE_Unknown : ClauseVal<"unkonwn", 2, 0> { let isDefault = 1; } 182def OMPC_GrainSize : Clause<"grainsize"> { 183 let clangClass = "OMPGrainsizeClause"; 184 let flangClass = "ScalarIntExpr"; 185 let enumClauseValue = "GrainsizeType"; 186 let allowedClauseValues = [ 187 OMP_GRAINSIZE_Strict, 188 OMP_GRAINSIZE_Unknown 189 ]; 190} 191def OMPC_HasDeviceAddr : Clause<"has_device_addr"> { 192 let clangClass = "OMPHasDeviceAddrClause"; 193 let flangClass = "OmpObjectList"; 194} 195def OMPC_Hint : Clause<"hint"> { 196 let clangClass = "OMPHintClause"; 197 let flangClass = "ConstantExpr"; 198} 199def OMPC_If : Clause<"if"> { 200 let clangClass = "OMPIfClause"; 201 let flangClass = "OmpIfClause"; 202} 203def OMPC_Inbranch : Clause<"inbranch"> { 204} 205def OMPC_Inclusive : Clause<"inclusive"> { 206 let clangClass = "OMPInclusiveClause"; 207} 208def OMPC_Indirect : Clause<"indirect"> { 209} 210def OMPC_Init : Clause<"init"> { 211 let clangClass = "OMPInitClause"; 212} 213def OMPC_InReduction : Clause<"in_reduction"> { 214 let clangClass = "OMPInReductionClause"; 215 let flangClass = "OmpInReductionClause"; 216} 217def OMPC_IsDevicePtr : Clause<"is_device_ptr"> { 218 let clangClass = "OMPIsDevicePtrClause"; 219 let flangClass = "OmpObjectList"; 220} 221def OMPC_LastPrivate : Clause<"lastprivate"> { 222 let clangClass = "OMPLastprivateClause"; 223 let flangClass = "OmpObjectList"; 224} 225def OMPC_Linear : Clause<"linear"> { 226 let clangClass = "OMPLinearClause"; 227 let flangClass = "OmpLinearClause"; 228} 229def OMPC_Link : Clause<"link"> { 230 let flangClass = "OmpObjectList"; 231} 232def OMPC_Map : Clause<"map"> { 233 let clangClass = "OMPMapClause"; 234 let flangClass = "OmpMapClause"; 235} 236def OMPC_Match : Clause<"match"> { 237} 238def OMP_MEMORY_ORDER_SeqCst : ClauseVal<"seq_cst", 1, 1> {} 239def OMP_MEMORY_ORDER_AcqRel : ClauseVal<"acq_rel", 2, 1> {} 240def OMP_MEMORY_ORDER_Acquire : ClauseVal<"acquire", 3, 1> {} 241def OMP_MEMORY_ORDER_Release : ClauseVal<"release", 4, 1> {} 242def OMP_MEMORY_ORDER_Relaxed : ClauseVal<"relaxed", 5, 1> {} 243def OMP_MEMORY_ORDER_Default : ClauseVal<"default", 6, 0> { 244 let isDefault = 1; 245} 246def OMPC_MemoryOrder : Clause<"memory_order"> { 247 let enumClauseValue = "MemoryOrderKind"; 248 let allowedClauseValues = [ 249 OMP_MEMORY_ORDER_SeqCst, 250 OMP_MEMORY_ORDER_AcqRel, 251 OMP_MEMORY_ORDER_Acquire, 252 OMP_MEMORY_ORDER_Release, 253 OMP_MEMORY_ORDER_Relaxed, 254 OMP_MEMORY_ORDER_Default 255 ]; 256} 257def OMPC_Mergeable : Clause<"mergeable"> { 258 let clangClass = "OMPMergeableClause"; 259} 260def OMPC_Message : Clause<"message"> { 261 let clangClass = "OMPMessageClause"; 262} 263def OMPC_Nocontext : Clause<"nocontext"> { 264 let clangClass = "OMPNocontextClause"; 265 let flangClass = "ScalarLogicalExpr"; 266} 267def OMPC_NoGroup : Clause<"nogroup"> { 268 let clangClass = "OMPNogroupClause"; 269} 270def OMPC_NonTemporal : Clause<"nontemporal"> { 271 let clangClass = "OMPNontemporalClause"; 272 let flangClass = "Name"; 273 let isValueList = true; 274} 275def OMPC_Notinbranch : Clause<"notinbranch"> { 276} 277def OMPC_Novariants : Clause<"novariants"> { 278 let clangClass = "OMPNovariantsClause"; 279 let flangClass = "ScalarLogicalExpr"; 280} 281def OMPC_NoWait : Clause<"nowait"> { 282 let clangClass = "OMPNowaitClause"; 283} 284def OMP_NUMTASKS_Strict : ClauseVal<"strict", 1, 1> {} 285def OMP_NUMTASKS_Unknown : ClauseVal<"unkonwn", 2, 0> { let isDefault = 1; } 286def OMPC_NumTasks : Clause<"num_tasks"> { 287 let clangClass = "OMPNumTasksClause"; 288 let flangClass = "ScalarIntExpr"; 289 let enumClauseValue = "NumTasksType"; 290 let allowedClauseValues = [ 291 OMP_NUMTASKS_Strict, 292 OMP_NUMTASKS_Unknown 293 ]; 294} 295def OMPC_NumTeams : Clause<"num_teams"> { 296 let clangClass = "OMPNumTeamsClause"; 297 let flangClass = "ScalarIntExpr"; 298} 299def OMPC_NumThreads : Clause<"num_threads"> { 300 let clangClass = "OMPNumThreadsClause"; 301 let flangClass = "ScalarIntExpr"; 302} 303def OMPC_OMPX_Attribute : Clause<"ompx_attribute"> { 304 let clangClass = "OMPXAttributeClause"; 305} 306def OMPC_OMPX_Bare : Clause<"ompx_bare"> { 307 let clangClass = "OMPXBareClause"; 308} 309def OMPC_OMPX_DynCGroupMem : Clause<"ompx_dyn_cgroup_mem"> { 310 let clangClass = "OMPXDynCGroupMemClause"; 311 let flangClass = "ScalarIntExpr"; 312} 313def OMP_ORDER_concurrent : ClauseVal<"concurrent",1,1> {} 314def OMP_ORDER_unknown : ClauseVal<"unknown",2,0> { let isDefault = 1; } 315def OMPC_Order : Clause<"order"> { 316 let clangClass = "OMPOrderClause"; 317 let flangClass = "OmpOrderClause"; 318 let enumClauseValue = "OrderKind"; 319 let allowedClauseValues = [ 320 OMP_ORDER_unknown, 321 OMP_ORDER_concurrent 322 ]; 323} 324def OMPC_Ordered : Clause<"ordered"> { 325 let clangClass = "OMPOrderedClause"; 326 let flangClass = "ScalarIntConstantExpr"; 327 let isValueOptional = true; 328} 329def OMPC_Partial: Clause<"partial"> { 330 let clangClass = "OMPPartialClause"; 331 let flangClass = "ScalarIntConstantExpr"; 332 let isValueOptional = true; 333} 334def OMPC_Priority : Clause<"priority"> { 335 let clangClass = "OMPPriorityClause"; 336 let flangClass = "ScalarIntExpr"; 337} 338def OMPC_Private : Clause<"private"> { 339 let clangClass = "OMPPrivateClause"; 340 let flangClass = "OmpObjectList"; 341} 342def OMP_PROC_BIND_master : ClauseVal<"master",2,1> {} 343def OMP_PROC_BIND_close : ClauseVal<"close",3,1> {} 344def OMP_PROC_BIND_spread : ClauseVal<"spread",4,1> {} 345def OMP_PROC_BIND_primary : ClauseVal<"primary",5,1> {} 346def OMP_PROC_BIND_default : ClauseVal<"default",6,0> {} 347def OMP_PROC_BIND_unknown : ClauseVal<"unknown",7,0> { let isDefault = true; } 348def OMPC_ProcBind : Clause<"proc_bind"> { 349 let clangClass = "OMPProcBindClause"; 350 let flangClass = "OmpProcBindClause"; 351 let enumClauseValue = "ProcBindKind"; 352 let allowedClauseValues = [ 353 OMP_PROC_BIND_primary, 354 OMP_PROC_BIND_master, 355 OMP_PROC_BIND_close, 356 OMP_PROC_BIND_spread, 357 OMP_PROC_BIND_default, 358 OMP_PROC_BIND_unknown 359 ]; 360} 361def OMPC_Read : Clause<"read"> { 362 let clangClass = "OMPReadClause"; 363} 364def OMPC_Reduction : Clause<"reduction"> { 365 let clangClass = "OMPReductionClause"; 366 let flangClass = "OmpReductionClause"; 367} 368def OMPC_Relaxed : Clause<"relaxed"> { 369 let clangClass = "OMPRelaxedClause"; 370} 371def OMPC_Release : Clause<"release"> { 372 let clangClass = "OMPReleaseClause"; 373} 374def OMPC_ReverseOffload : Clause<"reverse_offload"> { 375 let clangClass = "OMPReverseOffloadClause"; 376} 377def OMPC_SafeLen : Clause<"safelen"> { 378 let clangClass = "OMPSafelenClause"; 379 let flangClass = "ScalarIntConstantExpr"; 380} 381def OMP_SCHEDULE_Static : ClauseVal<"static", 2, 1> {} 382def OMP_SCHEDULE_Dynamic : ClauseVal<"dynamic", 3, 1> {} 383def OMP_SCHEDULE_Guided : ClauseVal<"guided", 4, 1> {} 384def OMP_SCHEDULE_Auto : ClauseVal<"auto", 5, 1> {} 385def OMP_SCHEDULE_Runtime : ClauseVal<"runtime", 6, 1> {} 386def OMP_SCHEDULE_Default : ClauseVal<"default", 7, 0> { let isDefault = 1; } 387def OMPC_Schedule : Clause<"schedule"> { 388 let clangClass = "OMPScheduleClause"; 389 let flangClass = "OmpScheduleClause"; 390 let enumClauseValue = "ScheduleKind"; 391 let allowedClauseValues = [ 392 OMP_SCHEDULE_Static, 393 OMP_SCHEDULE_Dynamic, 394 OMP_SCHEDULE_Guided, 395 OMP_SCHEDULE_Auto, 396 OMP_SCHEDULE_Runtime, 397 OMP_SCHEDULE_Default 398 ]; 399} 400def OMPC_SeqCst : Clause<"seq_cst"> { 401 let clangClass = "OMPSeqCstClause"; 402} 403def OMPC_Severity : Clause<"severity"> { 404 let clangClass = "OMPSeverityClause"; 405} 406def OMPC_Shared : Clause<"shared"> { 407 let clangClass = "OMPSharedClause"; 408 let flangClass = "OmpObjectList"; 409} 410def OMPC_Simd : Clause<"simd"> { 411 let clangClass = "OMPSIMDClause"; 412} 413def OMPC_SimdLen : Clause<"simdlen"> { 414 let clangClass = "OMPSimdlenClause"; 415 let flangClass = "ScalarIntConstantExpr"; 416} 417def OMPC_Sizes: Clause<"sizes"> { 418 let clangClass = "OMPSizesClause"; 419 let flangClass = "ScalarIntExpr"; 420 let isValueList = true; 421} 422def OMPC_TaskReduction : Clause<"task_reduction"> { 423 let clangClass = "OMPTaskReductionClause"; 424 let flangClass = "OmpReductionClause"; 425} 426def OMPC_ThreadLimit : Clause<"thread_limit"> { 427 let clangClass = "OMPThreadLimitClause"; 428 let flangClass = "ScalarIntExpr"; 429} 430def OMPC_ThreadPrivate : Clause<"threadprivate"> { 431 let alternativeName = "threadprivate or thread local"; 432 let isImplicit = true; 433} 434def OMPC_Threads : Clause<"threads"> { 435 let clangClass = "OMPThreadsClause"; 436} 437def OMPC_To : Clause<"to"> { 438 let clangClass = "OMPToClause"; 439 let flangClass = "OmpObjectList"; 440} 441def OMPC_UnifiedAddress : Clause<"unified_address"> { 442 let clangClass = "OMPUnifiedAddressClause"; 443} 444def OMPC_UnifiedSharedMemory : Clause<"unified_shared_memory"> { 445 let clangClass = "OMPUnifiedSharedMemoryClause"; 446} 447def OMPC_Uniform : Clause<"uniform"> { 448 let flangClass = "Name"; 449 let isValueList = true; 450} 451def OMPC_Unknown : Clause<"unknown"> { 452 let isImplicit = true; 453 let isDefault = true; 454} 455def OMPC_Untied : Clause<"untied"> { 456 let clangClass = "OMPUntiedClause"; 457} 458def OMPC_Update : Clause<"update"> { 459 let clangClass = "OMPUpdateClause"; 460} 461def OMPC_Use : Clause<"use"> { 462 let clangClass = "OMPUseClause"; 463} 464def OMPC_UsesAllocators : Clause<"uses_allocators"> { 465 let clangClass = "OMPUsesAllocatorsClause"; 466} 467def OMPC_UseDeviceAddr : Clause<"use_device_addr"> { 468 let clangClass = "OMPUseDeviceAddrClause"; 469 let flangClass = "OmpObjectList"; 470} 471def OMPC_UseDevicePtr : Clause<"use_device_ptr"> { 472 let clangClass = "OMPUseDevicePtrClause"; 473 let flangClass = "OmpObjectList"; 474} 475def OMPC_Weak : Clause<"weak"> { 476 let clangClass = "OMPWeakClause"; 477} 478def OMPC_When: Clause<"when"> { 479} 480def OMPC_Write : Clause<"write"> { 481 let clangClass = "OMPWriteClause"; 482} 483 484//===----------------------------------------------------------------------===// 485// Definitions of OpenMP leaf directives 486// Sorted alphabetically wrt directive spelling, except "end xyz" immediately 487// follows "xyz". 488//===----------------------------------------------------------------------===// 489 490def OMP_Allocate : Directive<"allocate"> { 491 let allowedOnceClauses = [ 492 VersionedClause<OMPC_Align, 51>, 493 VersionedClause<OMPC_Allocator>, 494 ]; 495 let association = AS_None; 496 let category = CA_Declarative; 497} 498def OMP_Allocators : Directive<"allocators"> { 499 let allowedClauses = [ 500 VersionedClause<OMPC_Allocate>, 501 ]; 502 let association = AS_Block; 503 let category = CA_Executable; 504} 505def OMP_Assumes : Directive<"assumes"> { 506 let association = AS_None; 507 let category = CA_Informational; 508} 509def OMP_EndAssumes : Directive<"end assumes"> { 510 let association = AS_Delimited; 511 let category = OMP_Assumes.category; 512} 513def OMP_Atomic : Directive<"atomic"> { 514 let allowedClauses = [ 515 VersionedClause<OMPC_Capture>, 516 VersionedClause<OMPC_Compare, 51>, 517 VersionedClause<OMPC_Read>, 518 VersionedClause<OMPC_Update>, 519 VersionedClause<OMPC_Write>, 520 ]; 521 let allowedOnceClauses = [ 522 VersionedClause<OMPC_AcqRel, 50>, 523 VersionedClause<OMPC_Acquire, 50>, 524 VersionedClause<OMPC_Fail, 51>, 525 VersionedClause<OMPC_Hint, 50>, 526 VersionedClause<OMPC_Relaxed, 50>, 527 VersionedClause<OMPC_Release, 50>, 528 VersionedClause<OMPC_SeqCst>, 529 VersionedClause<OMPC_Weak, 51>, 530 ]; 531 let association = AS_Block; 532 let category = CA_Executable; 533} 534def OMP_Barrier : Directive<"barrier"> { 535 let association = AS_None; 536 let category = CA_Executable; 537} 538def OMP_BeginAssumes : Directive<"begin assumes"> { 539 let association = AS_Delimited; 540 let category = CA_Informational; 541} 542def OMP_BeginDeclareTarget : Directive<"begin declare target"> { 543 let allowedClauses = [ 544 VersionedClause<OMPC_DeviceType>, 545 VersionedClause<OMPC_Indirect>, 546 VersionedClause<OMPC_Link>, 547 VersionedClause<OMPC_To>, 548 ]; 549 let association = AS_Delimited; 550 let category = CA_Declarative; 551} 552def OMP_BeginDeclareVariant : Directive<"begin declare variant"> { 553 let association = AS_Delimited; 554 let category = CA_Declarative; 555} 556def OMP_Cancel : Directive<"cancel"> { 557 let allowedOnceClauses = [ 558 VersionedClause<OMPC_If>, 559 ]; 560 let association = AS_None; 561 let category = CA_Executable; 562} 563def OMP_CancellationPoint : Directive<"cancellation point"> { 564 let association = AS_None; 565 let category = CA_Executable; 566} 567def OMP_Critical : Directive<"critical"> { 568 let allowedClauses = [ 569 VersionedClause<OMPC_Hint>, 570 ]; 571 let association = AS_Block; 572 let category = CA_Executable; 573} 574def OMP_DeclareMapper : Directive<"declare mapper"> { 575 let allowedClauses = [ 576 VersionedClause<OMPC_Map>, 577 ]; 578 let association = AS_None; 579 let category = CA_Declarative; 580} 581def OMP_DeclareReduction : Directive<"declare reduction"> { 582 let association = AS_None; 583 let category = CA_Declarative; 584} 585def OMP_DeclareSimd : Directive<"declare simd"> { 586 let allowedClauses = [ 587 VersionedClause<OMPC_Aligned>, 588 VersionedClause<OMPC_Linear>, 589 VersionedClause<OMPC_Uniform>, 590 ]; 591 let allowedOnceClauses = [ 592 VersionedClause<OMPC_SimdLen>, 593 ]; 594 let allowedExclusiveClauses = [ 595 VersionedClause<OMPC_Inbranch>, 596 VersionedClause<OMPC_Notinbranch>, 597 ]; 598 let association = AS_Declaration; 599 let category = CA_Declarative; 600} 601def OMP_DeclareTarget : Directive<"declare target"> { 602 let allowedClauses = [ 603 VersionedClause<OMPC_Enter, 52>, 604 VersionedClause<OMPC_Indirect>, 605 VersionedClause<OMPC_Link>, 606 VersionedClause<OMPC_To>, 607 ]; 608 let allowedOnceClauses = [ 609 VersionedClause<OMPC_DeviceType, 50>, 610 ]; 611 let association = AS_None; 612 let category = CA_Declarative; 613} 614def OMP_EndDeclareTarget : Directive<"end declare target"> { 615 let association = AS_Delimited; 616 let category = OMP_DeclareTarget.category; 617} 618def OMP_DeclareVariant : Directive<"declare variant"> { 619 let allowedClauses = [ 620 VersionedClause<OMPC_Match>, 621 ]; 622 let allowedExclusiveClauses = [ 623 VersionedClause<OMPC_AdjustArgs, 51>, 624 VersionedClause<OMPC_AppendArgs, 51>, 625 ]; 626 let association = AS_Declaration; 627 let category = CA_Declarative; 628} 629def OMP_EndDeclareVariant : Directive<"end declare variant"> { 630 let association = AS_Delimited; 631 let category = OMP_DeclareVariant.category; 632} 633def OMP_Depobj : Directive<"depobj"> { 634 let allowedClauses = [ 635 VersionedClause<OMPC_Depend, 50>, 636 // TODO This should ne `none` instead. Comment carried over from 637 // OMPKinds.def. 638 VersionedClause<OMPC_Depobj, 50>, 639 VersionedClause<OMPC_Destroy, 50>, 640 VersionedClause<OMPC_Update, 50>, 641 ]; 642 let association = AS_None; 643 let category = CA_Executable; 644} 645def OMP_dispatch : Directive<"dispatch"> { 646 let allowedClauses = [ 647 VersionedClause<OMPC_Depend>, 648 VersionedClause<OMPC_Device>, 649 VersionedClause<OMPC_HasDeviceAddr, 51>, 650 VersionedClause<OMPC_IsDevicePtr>, 651 VersionedClause<OMPC_Nocontext>, 652 VersionedClause<OMPC_Novariants>, 653 VersionedClause<OMPC_NoWait>, 654 ]; 655 let association = AS_Block; 656 let category = CA_Executable; 657} 658def OMP_Distribute : Directive<"distribute"> { 659 let allowedClauses = [ 660 VersionedClause<OMPC_Allocate>, 661 VersionedClause<OMPC_FirstPrivate>, 662 VersionedClause<OMPC_LastPrivate>, 663 VersionedClause<OMPC_Private>, 664 ]; 665 let allowedOnceClauses = [ 666 VersionedClause<OMPC_Collapse>, 667 VersionedClause<OMPC_DistSchedule>, 668 VersionedClause<OMPC_Order, 50>, 669 ]; 670 let association = AS_Loop; 671 let category = CA_Executable; 672} 673def OMP_Do : Directive<"do"> { 674 let allowedClauses = [ 675 VersionedClause<OMPC_FirstPrivate>, 676 VersionedClause<OMPC_LastPrivate>, 677 VersionedClause<OMPC_Linear>, 678 VersionedClause<OMPC_Private>, 679 VersionedClause<OMPC_Reduction>, 680 ]; 681 let allowedOnceClauses = [ 682 VersionedClause<OMPC_Collapse>, 683 VersionedClause<OMPC_NoWait>, 684 VersionedClause<OMPC_Order, 50>, 685 VersionedClause<OMPC_Ordered>, 686 VersionedClause<OMPC_Schedule>, 687 ]; 688 let association = AS_Loop; 689 let category = CA_Executable; 690} 691def OMP_EndDo : Directive<"end do"> { 692 let allowedOnceClauses = [ 693 VersionedClause<OMPC_NoWait>, 694 ]; 695 // Needed for association computation, since OMP_Do has it "from leafConstructs". 696 let leafConstructs = OMP_Do.leafConstructs; 697 let association = OMP_Do.association; 698 let category = OMP_Do.category; 699} 700def OMP_Error : Directive<"error"> { 701 let allowedClauses = [ 702 VersionedClause<OMPC_At, 51>, 703 VersionedClause<OMPC_Message, 51>, 704 VersionedClause<OMPC_Severity, 51>, 705 ]; 706 let association = AS_None; 707 let category = CA_Utility; 708} 709def OMP_Flush : Directive<"flush"> { 710 let allowedOnceClauses = [ 711 VersionedClause<OMPC_AcqRel, 50>, 712 VersionedClause<OMPC_Acquire, 50>, 713 // TODO This should ne `none` instead. Comment carried over from 714 // OMPKinds.def. 715 VersionedClause<OMPC_Flush>, 716 VersionedClause<OMPC_Release, 50>, 717 ]; 718 let association = AS_None; 719 let category = CA_Executable; 720} 721def OMP_For : Directive<"for"> { 722 let allowedClauses = [ 723 VersionedClause<OMPC_Allocate>, 724 VersionedClause<OMPC_Collapse>, 725 VersionedClause<OMPC_FirstPrivate>, 726 VersionedClause<OMPC_LastPrivate>, 727 VersionedClause<OMPC_Linear>, 728 VersionedClause<OMPC_NoWait>, 729 VersionedClause<OMPC_Order, 50>, 730 VersionedClause<OMPC_Ordered>, 731 VersionedClause<OMPC_Private>, 732 VersionedClause<OMPC_Reduction>, 733 VersionedClause<OMPC_Schedule>, 734 ]; 735 let association = AS_Loop; 736 let category = CA_Executable; 737} 738def OMP_Interchange : Directive<"interchange"> { 739 let association = AS_Loop; 740 let category = CA_Executable; 741} 742def OMP_interop : Directive<"interop"> { 743 let allowedClauses = [ 744 VersionedClause<OMPC_Depend>, 745 VersionedClause<OMPC_Destroy>, 746 VersionedClause<OMPC_Device>, 747 VersionedClause<OMPC_Init>, 748 VersionedClause<OMPC_NoWait>, 749 VersionedClause<OMPC_Use>, 750 ]; 751 let association = AS_None; 752 let category = CA_Executable; 753} 754def OMP_loop : Directive<"loop"> { 755 let allowedClauses = [ 756 VersionedClause<OMPC_LastPrivate>, 757 VersionedClause<OMPC_Private>, 758 VersionedClause<OMPC_Reduction>, 759 ]; 760 let allowedOnceClauses = [ 761 VersionedClause<OMPC_Bind, 50>, 762 VersionedClause<OMPC_Collapse>, 763 VersionedClause<OMPC_Order, 50>, 764 ]; 765 let association = AS_Loop; 766 let category = CA_Executable; 767} 768def OMP_masked : Directive<"masked"> { 769 let allowedOnceClauses = [ 770 VersionedClause<OMPC_Filter>, 771 ]; 772 let association = AS_Block; 773 let category = CA_Executable; 774} 775def OMP_Master : Directive<"master"> { 776 let association = AS_Block; 777 let category = CA_Executable; 778} 779def OMP_Metadirective : Directive<"metadirective"> { 780 let allowedClauses = [ 781 VersionedClause<OMPC_When>, 782 ]; 783 let allowedOnceClauses = [ 784 VersionedClause<OMPC_Default>, 785 ]; 786 let association = AS_None; 787 let category = CA_Meta; 788} 789def OMP_Nothing : Directive<"nothing"> { 790 let association = AS_None; 791 let category = CA_Utility; 792} 793def OMP_Ordered : Directive<"ordered"> { 794 let allowedClauses = [ 795 VersionedClause<OMPC_Depend>, 796 VersionedClause<OMPC_Doacross, 52>, 797 ]; 798 let allowedOnceClauses = [ 799 VersionedClause<OMPC_Simd>, 800 VersionedClause<OMPC_Threads>, 801 ]; 802 let association = AS_None; 803 // There is also a block-associated "ordered" directive. 804 let category = CA_Executable; 805} 806def OMP_Parallel : Directive<"parallel"> { 807 let allowedClauses = [ 808 VersionedClause<OMPC_Allocate>, 809 VersionedClause<OMPC_Copyin>, 810 VersionedClause<OMPC_FirstPrivate>, 811 VersionedClause<OMPC_OMPX_Attribute>, 812 VersionedClause<OMPC_Private>, 813 VersionedClause<OMPC_Reduction>, 814 VersionedClause<OMPC_Shared>, 815 ]; 816 let allowedOnceClauses = [ 817 VersionedClause<OMPC_Default>, 818 VersionedClause<OMPC_If>, 819 VersionedClause<OMPC_NumThreads>, 820 VersionedClause<OMPC_ProcBind>, 821 ]; 822 let association = AS_Block; 823 let category = CA_Executable; 824} 825def OMP_Requires : Directive<"requires"> { 826 let allowedOnceClauses = [ 827 VersionedClause<OMPC_UnifiedAddress>, 828 VersionedClause<OMPC_UnifiedSharedMemory>, 829 // OpenMP 5.2 Spec: If an implementation is not supporting a requirement 830 // (reverse offload in this case) then it should give compile-time error 831 // termination. 832 // Seeting supported version for reverse_offload to a distant future version 833 // 9.9 so that its partial support can be tested in the meantime. 834 // 835 // TODO: Correct this supprted version number whenever complete 836 // implementation of reverse_offload is available. 837 VersionedClause<OMPC_AtomicDefaultMemOrder>, 838 VersionedClause<OMPC_DynamicAllocators>, 839 VersionedClause<OMPC_ReverseOffload, 99>, 840 ]; 841 let association = AS_None; 842 let category = CA_Informational; 843} 844def OMP_Reverse : Directive<"reverse"> { 845 let association = AS_Loop; 846 let category = CA_Executable; 847} 848def OMP_Scan : Directive<"scan"> { 849 let allowedClauses = [ 850 VersionedClause<OMPC_Exclusive, 50>, 851 VersionedClause<OMPC_Inclusive, 50>, 852 ]; 853 let association = AS_Separating; 854 let category = CA_Subsidiary; 855} 856def OMP_scope : Directive<"scope"> { 857 let allowedClauses = [ 858 VersionedClause<OMPC_Private, 51>, 859 VersionedClause<OMPC_Reduction, 51>, 860 ]; 861 let allowedOnceClauses = [ 862 VersionedClause<OMPC_NoWait, 51>, 863 ]; 864 let association = AS_Block; 865 let category = CA_Executable; 866} 867def OMP_Section : Directive<"section"> { 868 let association = AS_Separating; 869 let category = CA_Subsidiary; 870} 871def OMP_Sections : Directive<"sections"> { 872 let allowedClauses = [ 873 VersionedClause<OMPC_Allocate>, 874 VersionedClause<OMPC_FirstPrivate>, 875 VersionedClause<OMPC_LastPrivate>, 876 VersionedClause<OMPC_NoWait>, 877 VersionedClause<OMPC_Private>, 878 VersionedClause<OMPC_Reduction>, 879 ]; 880 let association = AS_Block; 881 let category = CA_Executable; 882} 883def OMP_EndSections : Directive<"end sections"> { 884 let allowedOnceClauses = [ 885 VersionedClause<OMPC_NoWait>, 886 ]; 887 let leafConstructs = OMP_Sections.leafConstructs; 888 let association = OMP_Sections.association; 889 let category = OMP_Sections.category; 890} 891def OMP_Simd : Directive<"simd"> { 892 let allowedClauses = [ 893 VersionedClause<OMPC_Aligned>, 894 VersionedClause<OMPC_Allocate>, 895 VersionedClause<OMPC_LastPrivate>, 896 VersionedClause<OMPC_Linear>, 897 VersionedClause<OMPC_NonTemporal, 50>, 898 VersionedClause<OMPC_Private>, 899 VersionedClause<OMPC_Reduction>, 900 ]; 901 let allowedOnceClauses = [ 902 VersionedClause<OMPC_Collapse>, 903 VersionedClause<OMPC_If, 50>, 904 VersionedClause<OMPC_Order, 50>, 905 VersionedClause<OMPC_SafeLen>, 906 VersionedClause<OMPC_SimdLen>, 907 ]; 908 let association = AS_Loop; 909 let category = CA_Executable; 910} 911def OMP_Single : Directive<"single"> { 912 let allowedClauses = [ 913 VersionedClause<OMPC_Allocate>, 914 VersionedClause<OMPC_CopyPrivate>, 915 VersionedClause<OMPC_FirstPrivate>, 916 VersionedClause<OMPC_NoWait>, 917 VersionedClause<OMPC_Private>, 918 ]; 919 let association = AS_Block; 920 let category = CA_Executable; 921} 922def OMP_EndSingle : Directive<"end single"> { 923 let allowedClauses = [ 924 VersionedClause<OMPC_CopyPrivate>, 925 ]; 926 let allowedOnceClauses = [ 927 VersionedClause<OMPC_NoWait>, 928 ]; 929 let leafConstructs = OMP_Single.leafConstructs; 930 let association = OMP_Single.association; 931 let category = OMP_Single.category; 932} 933def OMP_Target : Directive<"target"> { 934 let allowedClauses = [ 935 VersionedClause<OMPC_Allocate>, 936 VersionedClause<OMPC_Depend>, 937 VersionedClause<OMPC_FirstPrivate>, 938 VersionedClause<OMPC_HasDeviceAddr, 51>, 939 VersionedClause<OMPC_InReduction, 50>, 940 VersionedClause<OMPC_IsDevicePtr>, 941 VersionedClause<OMPC_Map>, 942 VersionedClause<OMPC_OMPX_Attribute>, 943 VersionedClause<OMPC_Private>, 944 VersionedClause<OMPC_UsesAllocators, 50>, 945 ]; 946 let allowedOnceClauses = [ 947 VersionedClause<OMPC_DefaultMap>, 948 VersionedClause<OMPC_Device>, 949 VersionedClause<OMPC_If>, 950 VersionedClause<OMPC_NoWait>, 951 VersionedClause<OMPC_OMPX_DynCGroupMem>, 952 VersionedClause<OMPC_ThreadLimit, 51>, 953 ]; 954 let association = AS_Block; 955 let category = CA_Executable; 956} 957def OMP_TargetData : Directive<"target data"> { 958 let allowedOnceClauses = [ 959 VersionedClause<OMPC_Device>, 960 VersionedClause<OMPC_If>, 961 ]; 962 let requiredClauses = [ 963 VersionedClause<OMPC_Map>, 964 VersionedClause<OMPC_UseDeviceAddr, 50>, 965 VersionedClause<OMPC_UseDevicePtr>, 966 ]; 967 let association = AS_Block; 968 let category = CA_Executable; 969} 970def OMP_TargetEnterData : Directive<"target enter data"> { 971 let allowedClauses = [ 972 VersionedClause<OMPC_Depend>, 973 ]; 974 let allowedOnceClauses = [ 975 VersionedClause<OMPC_Device>, 976 VersionedClause<OMPC_If>, 977 VersionedClause<OMPC_NoWait>, 978 ]; 979 let requiredClauses = [ 980 VersionedClause<OMPC_Map>, 981 ]; 982 let association = AS_None; 983 let category = CA_Executable; 984} 985def OMP_TargetExitData : Directive<"target exit data"> { 986 let allowedClauses = [ 987 VersionedClause<OMPC_Depend>, 988 ]; 989 let allowedOnceClauses = [ 990 VersionedClause<OMPC_Device>, 991 VersionedClause<OMPC_If>, 992 VersionedClause<OMPC_NoWait>, 993 ]; 994 let requiredClauses = [ 995 VersionedClause<OMPC_Map>, 996 ]; 997 let association = AS_None; 998 let category = CA_Executable; 999} 1000def OMP_TargetUpdate : Directive<"target update"> { 1001 let allowedClauses = [ 1002 VersionedClause<OMPC_Depend>, 1003 VersionedClause<OMPC_From>, 1004 VersionedClause<OMPC_To>, 1005 ]; 1006 let allowedOnceClauses = [ 1007 VersionedClause<OMPC_Device>, 1008 VersionedClause<OMPC_If>, 1009 VersionedClause<OMPC_NoWait>, 1010 ]; 1011 let association = AS_None; 1012 let category = CA_Executable; 1013} 1014def OMP_Task : Directive<"task"> { 1015 let allowedClauses = [ 1016 VersionedClause<OMPC_Affinity, 50>, 1017 VersionedClause<OMPC_Allocate>, 1018 VersionedClause<OMPC_Depend>, 1019 VersionedClause<OMPC_Detach, 50>, 1020 VersionedClause<OMPC_FirstPrivate>, 1021 VersionedClause<OMPC_InReduction>, 1022 VersionedClause<OMPC_Mergeable>, 1023 VersionedClause<OMPC_Private>, 1024 VersionedClause<OMPC_Shared>, 1025 VersionedClause<OMPC_Untied>, 1026 ]; 1027 let allowedOnceClauses = [ 1028 VersionedClause<OMPC_Default>, 1029 VersionedClause<OMPC_Final>, 1030 VersionedClause<OMPC_If>, 1031 VersionedClause<OMPC_Priority>, 1032 ]; 1033 let association = AS_Block; 1034 let category = CA_Executable; 1035} 1036def OMP_TaskGroup : Directive<"taskgroup"> { 1037 let allowedClauses = [ 1038 VersionedClause<OMPC_Allocate, 50>, 1039 VersionedClause<OMPC_TaskReduction, 50>, 1040 ]; 1041 let association = AS_Block; 1042 let category = CA_Executable; 1043} 1044def OMP_TaskLoop : Directive<"taskloop"> { 1045 let allowedClauses = [ 1046 VersionedClause<OMPC_Allocate>, 1047 VersionedClause<OMPC_FirstPrivate>, 1048 VersionedClause<OMPC_InReduction>, 1049 VersionedClause<OMPC_LastPrivate>, 1050 VersionedClause<OMPC_Mergeable>, 1051 VersionedClause<OMPC_NoGroup>, 1052 VersionedClause<OMPC_Private>, 1053 VersionedClause<OMPC_Reduction>, 1054 VersionedClause<OMPC_Shared>, 1055 VersionedClause<OMPC_Untied>, 1056 ]; 1057 let allowedOnceClauses = [ 1058 VersionedClause<OMPC_Collapse>, 1059 VersionedClause<OMPC_Default>, 1060 VersionedClause<OMPC_Final>, 1061 VersionedClause<OMPC_If>, 1062 VersionedClause<OMPC_Priority>, 1063 ]; 1064 let allowedExclusiveClauses = [ 1065 VersionedClause<OMPC_GrainSize>, 1066 VersionedClause<OMPC_NumTasks>, 1067 ]; 1068 let association = AS_Loop; 1069 let category = CA_Executable; 1070} 1071def OMP_TaskWait : Directive<"taskwait"> { 1072 let allowedClauses = [ 1073 VersionedClause<OMPC_Depend, 50>, 1074 VersionedClause<OMPC_NoWait, 51>, 1075 ]; 1076 let association = AS_None; 1077 let category = CA_Executable; 1078} 1079def OMP_TaskYield : Directive<"taskyield"> { 1080 let association = AS_None; 1081 let category = CA_Executable; 1082} 1083def OMP_Teams : Directive<"teams"> { 1084 let allowedClauses = [ 1085 VersionedClause<OMPC_Allocate>, 1086 VersionedClause<OMPC_FirstPrivate>, 1087 VersionedClause<OMPC_OMPX_Attribute>, 1088 VersionedClause<OMPC_Private>, 1089 VersionedClause<OMPC_Reduction>, 1090 VersionedClause<OMPC_Shared>, 1091 ]; 1092 let allowedOnceClauses = [ 1093 VersionedClause<OMPC_Default>, 1094 VersionedClause<OMPC_If, 52>, 1095 VersionedClause<OMPC_NumTeams>, 1096 VersionedClause<OMPC_ThreadLimit>, 1097 ]; 1098 let association = AS_Block; 1099 let category = CA_Executable; 1100} 1101def OMP_ThreadPrivate : Directive<"threadprivate"> { 1102 let association = AS_None; 1103 let category = CA_Declarative; 1104} 1105def OMP_Tile : Directive<"tile"> { 1106 let allowedOnceClauses = [ 1107 VersionedClause<OMPC_Sizes, 51>, 1108 ]; 1109 let association = AS_Loop; 1110 let category = CA_Executable; 1111} 1112def OMP_Unknown : Directive<"unknown"> { 1113 let isDefault = true; 1114 let association = AS_None; 1115 let category = CA_Utility; 1116} 1117def OMP_Unroll : Directive<"unroll"> { 1118 let allowedOnceClauses = [ 1119 VersionedClause<OMPC_Full, 51>, 1120 VersionedClause<OMPC_Partial, 51>, 1121 ]; 1122 let association = AS_Loop; 1123 let category = CA_Executable; 1124} 1125def OMP_Workshare : Directive<"workshare"> { 1126 let allowedOnceClauses = [ 1127 VersionedClause<OMPC_NoWait>, 1128 ]; 1129 let association = AS_Block; 1130 let category = CA_Executable; 1131} 1132def OMP_EndWorkshare : Directive<"end workshare"> { 1133 let allowedClauses = [ 1134 VersionedClause<OMPC_NoWait>, 1135 ]; 1136 let leafConstructs = OMP_Workshare.leafConstructs; 1137 let association = OMP_Workshare.association; 1138 let category = OMP_Workshare.category; 1139} 1140 1141//===----------------------------------------------------------------------===// 1142// Definitions of OpenMP compound directives 1143// Sorted alphabetically wrt directive spelling, except "end xyz" immediately 1144// follows "xyz". 1145//===----------------------------------------------------------------------===// 1146 1147def OMP_DistributeParallelDo : Directive<"distribute parallel do"> { 1148 let allowedClauses = [ 1149 VersionedClause<OMPC_Allocate>, 1150 VersionedClause<OMPC_Copyin>, 1151 VersionedClause<OMPC_Default>, 1152 VersionedClause<OMPC_FirstPrivate>, 1153 VersionedClause<OMPC_LastPrivate>, 1154 VersionedClause<OMPC_Linear>, 1155 VersionedClause<OMPC_Private>, 1156 VersionedClause<OMPC_Reduction>, 1157 VersionedClause<OMPC_Shared>, 1158 ]; 1159 let allowedOnceClauses = [ 1160 VersionedClause<OMPC_Collapse>, 1161 VersionedClause<OMPC_DistSchedule>, 1162 VersionedClause<OMPC_If>, 1163 VersionedClause<OMPC_NumThreads>, 1164 VersionedClause<OMPC_Order, 50>, 1165 VersionedClause<OMPC_Ordered>, 1166 VersionedClause<OMPC_ProcBind>, 1167 VersionedClause<OMPC_Schedule>, 1168 ]; 1169 let leafConstructs = [OMP_Distribute, OMP_Parallel, OMP_Do]; 1170 let category = CA_Executable; 1171} 1172def OMP_DistributeParallelDoSimd : Directive<"distribute parallel do simd"> { 1173 let allowedClauses = [ 1174 VersionedClause<OMPC_Aligned>, 1175 VersionedClause<OMPC_Allocate>, 1176 VersionedClause<OMPC_Collapse>, 1177 VersionedClause<OMPC_Copyin>, 1178 VersionedClause<OMPC_Default>, 1179 VersionedClause<OMPC_DistSchedule>, 1180 VersionedClause<OMPC_FirstPrivate>, 1181 VersionedClause<OMPC_If>, 1182 VersionedClause<OMPC_LastPrivate>, 1183 VersionedClause<OMPC_Linear>, 1184 VersionedClause<OMPC_NonTemporal>, 1185 VersionedClause<OMPC_NumThreads>, 1186 VersionedClause<OMPC_Order, 50>, 1187 VersionedClause<OMPC_Private>, 1188 VersionedClause<OMPC_ProcBind>, 1189 VersionedClause<OMPC_Reduction>, 1190 VersionedClause<OMPC_SafeLen>, 1191 VersionedClause<OMPC_Schedule>, 1192 VersionedClause<OMPC_Shared>, 1193 VersionedClause<OMPC_SimdLen>, 1194 ]; 1195 let leafConstructs = [OMP_Distribute, OMP_Parallel, OMP_Do, OMP_Simd]; 1196 let category = CA_Executable; 1197} 1198def OMP_DistributeParallelFor : Directive<"distribute parallel for"> { 1199 let allowedClauses = [ 1200 VersionedClause<OMPC_Allocate>, 1201 VersionedClause<OMPC_Collapse>, 1202 VersionedClause<OMPC_Copyin>, 1203 VersionedClause<OMPC_Default>, 1204 VersionedClause<OMPC_DistSchedule>, 1205 VersionedClause<OMPC_FirstPrivate>, 1206 VersionedClause<OMPC_If>, 1207 VersionedClause<OMPC_LastPrivate>, 1208 VersionedClause<OMPC_NumThreads>, 1209 VersionedClause<OMPC_OMPX_Attribute>, 1210 VersionedClause<OMPC_Order, 50>, 1211 VersionedClause<OMPC_Private>, 1212 VersionedClause<OMPC_ProcBind>, 1213 VersionedClause<OMPC_Reduction>, 1214 VersionedClause<OMPC_Schedule>, 1215 VersionedClause<OMPC_Shared>, 1216 ]; 1217 let leafConstructs = [OMP_Distribute, OMP_Parallel, OMP_For]; 1218 let category = CA_Executable; 1219} 1220def OMP_DistributeParallelForSimd : Directive<"distribute parallel for simd"> { 1221 let allowedClauses = [ 1222 VersionedClause<OMPC_Aligned>, 1223 VersionedClause<OMPC_Allocate>, 1224 VersionedClause<OMPC_Collapse>, 1225 VersionedClause<OMPC_Copyin>, 1226 VersionedClause<OMPC_Default>, 1227 VersionedClause<OMPC_DistSchedule>, 1228 VersionedClause<OMPC_FirstPrivate>, 1229 VersionedClause<OMPC_If>, 1230 VersionedClause<OMPC_LastPrivate>, 1231 VersionedClause<OMPC_Linear>, 1232 VersionedClause<OMPC_NonTemporal, 50>, 1233 VersionedClause<OMPC_NumThreads>, 1234 VersionedClause<OMPC_OMPX_Attribute>, 1235 VersionedClause<OMPC_Order, 50>, 1236 VersionedClause<OMPC_Private>, 1237 VersionedClause<OMPC_ProcBind>, 1238 VersionedClause<OMPC_Reduction>, 1239 VersionedClause<OMPC_SafeLen>, 1240 VersionedClause<OMPC_Schedule>, 1241 VersionedClause<OMPC_Shared>, 1242 VersionedClause<OMPC_SimdLen>, 1243 ]; 1244 let leafConstructs = [OMP_Distribute, OMP_Parallel, OMP_For, OMP_Simd]; 1245 let category = CA_Executable; 1246} 1247def OMP_DistributeSimd : Directive<"distribute simd"> { 1248 let allowedClauses = [ 1249 VersionedClause<OMPC_Aligned>, 1250 VersionedClause<OMPC_Allocate>, 1251 VersionedClause<OMPC_Copyin>, 1252 VersionedClause<OMPC_Default>, 1253 VersionedClause<OMPC_FirstPrivate>, 1254 VersionedClause<OMPC_LastPrivate>, 1255 VersionedClause<OMPC_Linear>, 1256 VersionedClause<OMPC_NonTemporal, 50>, 1257 VersionedClause<OMPC_Private>, 1258 VersionedClause<OMPC_Reduction>, 1259 ]; 1260 let allowedOnceClauses = [ 1261 VersionedClause<OMPC_Collapse>, 1262 VersionedClause<OMPC_DistSchedule>, 1263 VersionedClause<OMPC_If, 50>, 1264 VersionedClause<OMPC_NumThreads>, 1265 VersionedClause<OMPC_Order, 50>, 1266 VersionedClause<OMPC_Ordered>, 1267 VersionedClause<OMPC_ProcBind>, 1268 VersionedClause<OMPC_SafeLen>, 1269 VersionedClause<OMPC_Schedule>, 1270 VersionedClause<OMPC_SimdLen>, 1271 ]; 1272 let leafConstructs = [OMP_Distribute, OMP_Simd]; 1273 let category = CA_Executable; 1274} 1275def OMP_DoSimd : Directive<"do simd"> { 1276 let allowedClauses = [ 1277 VersionedClause<OMPC_Aligned>, 1278 VersionedClause<OMPC_FirstPrivate>, 1279 VersionedClause<OMPC_LastPrivate>, 1280 VersionedClause<OMPC_Linear>, 1281 VersionedClause<OMPC_Private>, 1282 VersionedClause<OMPC_Reduction>, 1283 ]; 1284 let allowedOnceClauses = [ 1285 VersionedClause<OMPC_Collapse>, 1286 VersionedClause<OMPC_If>, 1287 VersionedClause<OMPC_NoWait>, 1288 VersionedClause<OMPC_Order, 50>, 1289 VersionedClause<OMPC_Ordered>, 1290 VersionedClause<OMPC_SafeLen>, 1291 VersionedClause<OMPC_Schedule>, 1292 VersionedClause<OMPC_SimdLen>, 1293 ]; 1294 let leafConstructs = [OMP_Do, OMP_Simd]; 1295 let category = CA_Executable; 1296} 1297def OMP_EndDoSimd : Directive<"end do simd"> { 1298 let allowedOnceClauses = [ 1299 VersionedClause<OMPC_NoWait>, 1300 ]; 1301 let leafConstructs = OMP_DoSimd.leafConstructs; 1302 let association = OMP_DoSimd.association; 1303 let category = OMP_DoSimd.category; 1304} 1305def OMP_ForSimd : Directive<"for simd"> { 1306 let allowedClauses = [ 1307 VersionedClause<OMPC_Aligned>, 1308 VersionedClause<OMPC_Allocate>, 1309 VersionedClause<OMPC_Collapse>, 1310 VersionedClause<OMPC_FirstPrivate>, 1311 VersionedClause<OMPC_If, 50>, 1312 VersionedClause<OMPC_LastPrivate>, 1313 VersionedClause<OMPC_Linear>, 1314 VersionedClause<OMPC_NonTemporal, 50>, 1315 VersionedClause<OMPC_NoWait>, 1316 VersionedClause<OMPC_Order, 50>, 1317 VersionedClause<OMPC_Ordered>, 1318 VersionedClause<OMPC_Private>, 1319 VersionedClause<OMPC_Reduction>, 1320 VersionedClause<OMPC_SafeLen>, 1321 VersionedClause<OMPC_Schedule>, 1322 VersionedClause<OMPC_SimdLen>, 1323 ]; 1324 let leafConstructs = [OMP_For, OMP_Simd]; 1325 let category = CA_Executable; 1326} 1327def OMP_target_loop : Directive<"target loop"> { 1328 let allowedClauses = [ 1329 VersionedClause<OMPC_Allocate>, 1330 VersionedClause<OMPC_Depend>, 1331 VersionedClause<OMPC_FirstPrivate>, 1332 VersionedClause<OMPC_IsDevicePtr>, 1333 VersionedClause<OMPC_HasDeviceAddr, 51>, 1334 VersionedClause<OMPC_LastPrivate>, 1335 VersionedClause<OMPC_Map>, 1336 VersionedClause<OMPC_Private>, 1337 VersionedClause<OMPC_Reduction>, 1338 VersionedClause<OMPC_UsesAllocators, 50>, 1339 VersionedClause<OMPC_OMPX_Attribute>, 1340 VersionedClause<OMPC_InReduction, 50>, 1341 1342 ]; 1343 let allowedOnceClauses = [ 1344 VersionedClause<OMPC_Bind, 50>, 1345 VersionedClause<OMPC_Collapse>, 1346 VersionedClause<OMPC_Order>, 1347 VersionedClause<OMPC_ThreadLimit>, 1348 VersionedClause<OMPC_OMPX_DynCGroupMem>, 1349 VersionedClause<OMPC_If>, 1350 VersionedClause<OMPC_Device>, 1351 VersionedClause<OMPC_DefaultMap>, 1352 VersionedClause<OMPC_NoWait>, 1353 ]; 1354 let leafConstructs = [OMP_Target, OMP_loop]; 1355 let category = CA_Executable; 1356} 1357def OMP_MaskedTaskloop : Directive<"masked taskloop"> { 1358 let allowedClauses = [ 1359 VersionedClause<OMPC_Allocate>, 1360 VersionedClause<OMPC_Collapse>, 1361 VersionedClause<OMPC_Default>, 1362 VersionedClause<OMPC_Filter>, 1363 VersionedClause<OMPC_Final>, 1364 VersionedClause<OMPC_FirstPrivate>, 1365 VersionedClause<OMPC_GrainSize>, 1366 VersionedClause<OMPC_If>, 1367 VersionedClause<OMPC_InReduction>, 1368 VersionedClause<OMPC_LastPrivate>, 1369 VersionedClause<OMPC_Mergeable>, 1370 VersionedClause<OMPC_NoGroup>, 1371 VersionedClause<OMPC_NumTasks>, 1372 VersionedClause<OMPC_Priority>, 1373 VersionedClause<OMPC_Private>, 1374 VersionedClause<OMPC_Reduction>, 1375 VersionedClause<OMPC_Shared>, 1376 VersionedClause<OMPC_Untied>, 1377 ]; 1378 let leafConstructs = [OMP_masked, OMP_TaskLoop]; 1379 let category = CA_Executable; 1380} 1381def OMP_MaskedTaskloopSimd : Directive<"masked taskloop simd"> { 1382 let allowedClauses = [ 1383 VersionedClause<OMPC_Aligned>, 1384 VersionedClause<OMPC_Allocate>, 1385 VersionedClause<OMPC_Collapse>, 1386 VersionedClause<OMPC_Default>, 1387 VersionedClause<OMPC_Filter>, 1388 VersionedClause<OMPC_Final>, 1389 VersionedClause<OMPC_FirstPrivate>, 1390 VersionedClause<OMPC_GrainSize>, 1391 VersionedClause<OMPC_If>, 1392 VersionedClause<OMPC_InReduction>, 1393 VersionedClause<OMPC_LastPrivate>, 1394 VersionedClause<OMPC_Linear>, 1395 VersionedClause<OMPC_Mergeable>, 1396 VersionedClause<OMPC_NoGroup>, 1397 VersionedClause<OMPC_NonTemporal, 50>, 1398 VersionedClause<OMPC_NumTasks>, 1399 VersionedClause<OMPC_Order, 50>, 1400 VersionedClause<OMPC_Priority>, 1401 VersionedClause<OMPC_Private>, 1402 VersionedClause<OMPC_Reduction>, 1403 VersionedClause<OMPC_SafeLen>, 1404 VersionedClause<OMPC_Shared>, 1405 VersionedClause<OMPC_SimdLen>, 1406 VersionedClause<OMPC_Untied>, 1407 ]; 1408 let leafConstructs = [OMP_masked, OMP_TaskLoop, OMP_Simd]; 1409 let category = CA_Executable; 1410} 1411def OMP_MasterTaskloop : Directive<"master taskloop"> { 1412 let allowedClauses = [ 1413 VersionedClause<OMPC_Allocate>, 1414 VersionedClause<OMPC_Collapse>, 1415 VersionedClause<OMPC_Default>, 1416 VersionedClause<OMPC_Final>, 1417 VersionedClause<OMPC_FirstPrivate>, 1418 VersionedClause<OMPC_GrainSize>, 1419 VersionedClause<OMPC_If>, 1420 VersionedClause<OMPC_InReduction>, 1421 VersionedClause<OMPC_LastPrivate>, 1422 VersionedClause<OMPC_Mergeable>, 1423 VersionedClause<OMPC_NoGroup>, 1424 VersionedClause<OMPC_NumTasks>, 1425 VersionedClause<OMPC_Priority>, 1426 VersionedClause<OMPC_Private>, 1427 VersionedClause<OMPC_Reduction>, 1428 VersionedClause<OMPC_Shared>, 1429 VersionedClause<OMPC_Untied>, 1430 ]; 1431 let leafConstructs = [OMP_Master, OMP_TaskLoop]; 1432 let category = CA_Executable; 1433} 1434def OMP_MasterTaskloopSimd : Directive<"master taskloop simd"> { 1435 let allowedClauses = [ 1436 VersionedClause<OMPC_Aligned>, 1437 VersionedClause<OMPC_Allocate>, 1438 VersionedClause<OMPC_Collapse>, 1439 VersionedClause<OMPC_Default>, 1440 VersionedClause<OMPC_Final>, 1441 VersionedClause<OMPC_FirstPrivate>, 1442 VersionedClause<OMPC_GrainSize>, 1443 VersionedClause<OMPC_If>, 1444 VersionedClause<OMPC_InReduction>, 1445 VersionedClause<OMPC_LastPrivate>, 1446 VersionedClause<OMPC_Linear>, 1447 VersionedClause<OMPC_Mergeable>, 1448 VersionedClause<OMPC_NoGroup>, 1449 VersionedClause<OMPC_NonTemporal, 50>, 1450 VersionedClause<OMPC_NumTasks>, 1451 VersionedClause<OMPC_Order, 50>, 1452 VersionedClause<OMPC_Priority>, 1453 VersionedClause<OMPC_Private>, 1454 VersionedClause<OMPC_Reduction>, 1455 VersionedClause<OMPC_SafeLen>, 1456 VersionedClause<OMPC_Shared>, 1457 VersionedClause<OMPC_SimdLen>, 1458 VersionedClause<OMPC_Untied>, 1459 ]; 1460 let leafConstructs = [OMP_Master, OMP_TaskLoop, OMP_Simd]; 1461 let category = CA_Executable; 1462} 1463def OMP_ParallelDo : Directive<"parallel do"> { 1464 let allowedClauses = [ 1465 VersionedClause<OMPC_Copyin>, 1466 VersionedClause<OMPC_Default>, 1467 VersionedClause<OMPC_FirstPrivate>, 1468 VersionedClause<OMPC_LastPrivate>, 1469 VersionedClause<OMPC_Linear>, 1470 VersionedClause<OMPC_Private>, 1471 VersionedClause<OMPC_Reduction>, 1472 VersionedClause<OMPC_Shared>, 1473 ]; 1474 let allowedOnceClauses = [ 1475 VersionedClause<OMPC_Collapse>, 1476 VersionedClause<OMPC_If>, 1477 VersionedClause<OMPC_NumThreads>, 1478 VersionedClause<OMPC_Order, 50>, 1479 VersionedClause<OMPC_Ordered>, 1480 VersionedClause<OMPC_ProcBind>, 1481 VersionedClause<OMPC_Schedule>, 1482 ]; 1483 let leafConstructs = [OMP_Parallel, OMP_Do]; 1484 let category = CA_Executable; 1485} 1486def OMP_ParallelDoSimd : Directive<"parallel do simd"> { 1487 let allowedClauses = [ 1488 VersionedClause<OMPC_Aligned>, 1489 VersionedClause<OMPC_Allocate>, 1490 VersionedClause<OMPC_Copyin>, 1491 VersionedClause<OMPC_Default>, 1492 VersionedClause<OMPC_FirstPrivate>, 1493 VersionedClause<OMPC_If>, 1494 VersionedClause<OMPC_LastPrivate>, 1495 VersionedClause<OMPC_Linear>, 1496 VersionedClause<OMPC_NonTemporal>, 1497 VersionedClause<OMPC_Private>, 1498 VersionedClause<OMPC_Reduction>, 1499 VersionedClause<OMPC_Shared>, 1500 ]; 1501 let allowedOnceClauses = [ 1502 VersionedClause<OMPC_Collapse>, 1503 VersionedClause<OMPC_NumThreads>, 1504 VersionedClause<OMPC_Order, 50>, 1505 VersionedClause<OMPC_Ordered>, 1506 VersionedClause<OMPC_ProcBind>, 1507 VersionedClause<OMPC_SafeLen>, 1508 VersionedClause<OMPC_Schedule>, 1509 VersionedClause<OMPC_SimdLen>, 1510 ]; 1511 let leafConstructs = [OMP_Parallel, OMP_Do, OMP_Simd]; 1512 let category = CA_Executable; 1513} 1514def OMP_ParallelFor : Directive<"parallel for"> { 1515 let allowedClauses = [ 1516 VersionedClause<OMPC_Allocate>, 1517 VersionedClause<OMPC_Collapse>, 1518 VersionedClause<OMPC_Copyin>, 1519 VersionedClause<OMPC_Default>, 1520 VersionedClause<OMPC_FirstPrivate>, 1521 VersionedClause<OMPC_If>, 1522 VersionedClause<OMPC_LastPrivate>, 1523 VersionedClause<OMPC_Linear>, 1524 VersionedClause<OMPC_NumThreads>, 1525 VersionedClause<OMPC_OMPX_Attribute>, 1526 VersionedClause<OMPC_Order, 50>, 1527 VersionedClause<OMPC_Ordered>, 1528 VersionedClause<OMPC_Private>, 1529 VersionedClause<OMPC_ProcBind>, 1530 VersionedClause<OMPC_Reduction>, 1531 VersionedClause<OMPC_Schedule>, 1532 VersionedClause<OMPC_Shared>, 1533 ]; 1534 let leafConstructs = [OMP_Parallel, OMP_For]; 1535 let category = CA_Executable; 1536} 1537def OMP_ParallelForSimd : Directive<"parallel for simd"> { 1538 let allowedClauses = [ 1539 VersionedClause<OMPC_Aligned>, 1540 VersionedClause<OMPC_Allocate>, 1541 VersionedClause<OMPC_Collapse>, 1542 VersionedClause<OMPC_Copyin>, 1543 VersionedClause<OMPC_Default>, 1544 VersionedClause<OMPC_FirstPrivate>, 1545 VersionedClause<OMPC_If>, 1546 VersionedClause<OMPC_LastPrivate>, 1547 VersionedClause<OMPC_Linear>, 1548 VersionedClause<OMPC_NonTemporal, 50>, 1549 VersionedClause<OMPC_NumThreads>, 1550 VersionedClause<OMPC_OMPX_Attribute>, 1551 VersionedClause<OMPC_Order, 50>, 1552 VersionedClause<OMPC_Ordered>, 1553 VersionedClause<OMPC_Private>, 1554 VersionedClause<OMPC_ProcBind>, 1555 VersionedClause<OMPC_Reduction>, 1556 VersionedClause<OMPC_SafeLen>, 1557 VersionedClause<OMPC_Schedule>, 1558 VersionedClause<OMPC_Shared>, 1559 VersionedClause<OMPC_SimdLen>, 1560 ]; 1561 let leafConstructs = [OMP_Parallel, OMP_For, OMP_Simd]; 1562 let category = CA_Executable; 1563} 1564def OMP_parallel_loop : Directive<"parallel loop"> { 1565 let allowedClauses = [ 1566 VersionedClause<OMPC_Allocate>, 1567 VersionedClause<OMPC_Copyin>, 1568 VersionedClause<OMPC_FirstPrivate>, 1569 VersionedClause<OMPC_LastPrivate>, 1570 VersionedClause<OMPC_OMPX_Attribute>, 1571 VersionedClause<OMPC_Private>, 1572 VersionedClause<OMPC_Reduction>, 1573 VersionedClause<OMPC_Shared>, 1574 ]; 1575 let allowedOnceClauses = [ 1576 VersionedClause<OMPC_Bind, 50>, 1577 VersionedClause<OMPC_Collapse>, 1578 VersionedClause<OMPC_Default>, 1579 VersionedClause<OMPC_If>, 1580 VersionedClause<OMPC_NumThreads>, 1581 VersionedClause<OMPC_Order>, 1582 VersionedClause<OMPC_ProcBind>, 1583 ]; 1584 let leafConstructs = [OMP_Parallel, OMP_loop]; 1585 let category = CA_Executable; 1586} 1587def OMP_ParallelMasked : Directive<"parallel masked"> { 1588 let allowedClauses = [ 1589 VersionedClause<OMPC_Allocate>, 1590 VersionedClause<OMPC_Copyin>, 1591 VersionedClause<OMPC_Default>, 1592 VersionedClause<OMPC_Filter>, 1593 VersionedClause<OMPC_FirstPrivate>, 1594 VersionedClause<OMPC_If>, 1595 VersionedClause<OMPC_NumThreads>, 1596 VersionedClause<OMPC_OMPX_Attribute>, 1597 VersionedClause<OMPC_Private>, 1598 VersionedClause<OMPC_ProcBind>, 1599 VersionedClause<OMPC_Reduction>, 1600 VersionedClause<OMPC_Shared>, 1601 ]; 1602 let leafConstructs = [OMP_Parallel, OMP_masked]; 1603 let category = CA_Executable; 1604} 1605def OMP_ParallelMaskedTaskloop : 1606 Directive<"parallel masked taskloop"> { 1607 let allowedClauses = [ 1608 VersionedClause<OMPC_Allocate>, 1609 VersionedClause<OMPC_Collapse>, 1610 VersionedClause<OMPC_Copyin>, 1611 VersionedClause<OMPC_Default>, 1612 VersionedClause<OMPC_Filter>, 1613 VersionedClause<OMPC_Final>, 1614 VersionedClause<OMPC_FirstPrivate>, 1615 VersionedClause<OMPC_GrainSize>, 1616 VersionedClause<OMPC_If>, 1617 VersionedClause<OMPC_LastPrivate>, 1618 VersionedClause<OMPC_Mergeable>, 1619 VersionedClause<OMPC_NoGroup>, 1620 VersionedClause<OMPC_NumTasks>, 1621 VersionedClause<OMPC_NumThreads>, 1622 VersionedClause<OMPC_OMPX_Attribute>, 1623 VersionedClause<OMPC_Priority>, 1624 VersionedClause<OMPC_Private>, 1625 VersionedClause<OMPC_ProcBind>, 1626 VersionedClause<OMPC_Reduction>, 1627 VersionedClause<OMPC_Shared>, 1628 VersionedClause<OMPC_Untied>, 1629 ]; 1630 let leafConstructs = [OMP_Parallel, OMP_masked, OMP_TaskLoop]; 1631 let category = CA_Executable; 1632} 1633def OMP_ParallelMaskedTaskloopSimd : 1634 Directive<"parallel masked taskloop simd"> { 1635 let allowedClauses = [ 1636 VersionedClause<OMPC_Aligned>, 1637 VersionedClause<OMPC_Allocate>, 1638 VersionedClause<OMPC_Collapse>, 1639 VersionedClause<OMPC_Copyin>, 1640 VersionedClause<OMPC_Default>, 1641 VersionedClause<OMPC_Filter>, 1642 VersionedClause<OMPC_Final>, 1643 VersionedClause<OMPC_FirstPrivate>, 1644 VersionedClause<OMPC_GrainSize>, 1645 VersionedClause<OMPC_If>, 1646 VersionedClause<OMPC_LastPrivate>, 1647 VersionedClause<OMPC_Linear>, 1648 VersionedClause<OMPC_Mergeable>, 1649 VersionedClause<OMPC_NoGroup>, 1650 VersionedClause<OMPC_NonTemporal, 50>, 1651 VersionedClause<OMPC_NumTasks>, 1652 VersionedClause<OMPC_NumThreads>, 1653 VersionedClause<OMPC_OMPX_Attribute>, 1654 VersionedClause<OMPC_Order, 50>, 1655 VersionedClause<OMPC_Priority>, 1656 VersionedClause<OMPC_Private>, 1657 VersionedClause<OMPC_ProcBind>, 1658 VersionedClause<OMPC_Reduction>, 1659 VersionedClause<OMPC_SafeLen>, 1660 VersionedClause<OMPC_Shared>, 1661 VersionedClause<OMPC_SimdLen>, 1662 VersionedClause<OMPC_Untied>, 1663 ]; 1664 let leafConstructs = [OMP_Parallel, OMP_masked, OMP_TaskLoop, OMP_Simd]; 1665 let category = CA_Executable; 1666} 1667def OMP_ParallelMaster : Directive<"parallel master"> { 1668 let allowedClauses = [ 1669 VersionedClause<OMPC_Allocate>, 1670 VersionedClause<OMPC_Copyin>, 1671 VersionedClause<OMPC_Default>, 1672 VersionedClause<OMPC_FirstPrivate>, 1673 VersionedClause<OMPC_If>, 1674 VersionedClause<OMPC_NumThreads>, 1675 VersionedClause<OMPC_OMPX_Attribute>, 1676 VersionedClause<OMPC_Private>, 1677 VersionedClause<OMPC_ProcBind>, 1678 VersionedClause<OMPC_Reduction>, 1679 VersionedClause<OMPC_Shared>, 1680 ]; 1681 let leafConstructs = [OMP_Parallel, OMP_Master]; 1682 let category = CA_Executable; 1683} 1684def OMP_ParallelMasterTaskloop : 1685 Directive<"parallel master taskloop"> { 1686 let allowedClauses = [ 1687 VersionedClause<OMPC_Allocate>, 1688 VersionedClause<OMPC_Collapse>, 1689 VersionedClause<OMPC_Copyin>, 1690 VersionedClause<OMPC_Default>, 1691 VersionedClause<OMPC_Final>, 1692 VersionedClause<OMPC_FirstPrivate>, 1693 VersionedClause<OMPC_GrainSize>, 1694 VersionedClause<OMPC_If>, 1695 VersionedClause<OMPC_LastPrivate>, 1696 VersionedClause<OMPC_Mergeable>, 1697 VersionedClause<OMPC_NoGroup>, 1698 VersionedClause<OMPC_NumTasks>, 1699 VersionedClause<OMPC_NumThreads>, 1700 VersionedClause<OMPC_OMPX_Attribute>, 1701 VersionedClause<OMPC_Priority>, 1702 VersionedClause<OMPC_Private>, 1703 VersionedClause<OMPC_ProcBind>, 1704 VersionedClause<OMPC_Reduction>, 1705 VersionedClause<OMPC_Shared>, 1706 VersionedClause<OMPC_Untied>, 1707 ]; 1708 let leafConstructs = [OMP_Parallel, OMP_Master, OMP_TaskLoop]; 1709 let category = CA_Executable; 1710} 1711def OMP_ParallelMasterTaskloopSimd : 1712 Directive<"parallel master taskloop simd"> { 1713 let allowedClauses = [ 1714 VersionedClause<OMPC_Aligned>, 1715 VersionedClause<OMPC_Allocate>, 1716 VersionedClause<OMPC_Collapse>, 1717 VersionedClause<OMPC_Copyin>, 1718 VersionedClause<OMPC_Default>, 1719 VersionedClause<OMPC_Final>, 1720 VersionedClause<OMPC_FirstPrivate>, 1721 VersionedClause<OMPC_GrainSize>, 1722 VersionedClause<OMPC_If>, 1723 VersionedClause<OMPC_LastPrivate>, 1724 VersionedClause<OMPC_Linear>, 1725 VersionedClause<OMPC_Mergeable>, 1726 VersionedClause<OMPC_NoGroup>, 1727 VersionedClause<OMPC_NonTemporal, 50>, 1728 VersionedClause<OMPC_NumTasks>, 1729 VersionedClause<OMPC_NumThreads>, 1730 VersionedClause<OMPC_OMPX_Attribute>, 1731 VersionedClause<OMPC_Order, 50>, 1732 VersionedClause<OMPC_Priority>, 1733 VersionedClause<OMPC_Private>, 1734 VersionedClause<OMPC_ProcBind>, 1735 VersionedClause<OMPC_Reduction>, 1736 VersionedClause<OMPC_SafeLen>, 1737 VersionedClause<OMPC_Shared>, 1738 VersionedClause<OMPC_SimdLen>, 1739 VersionedClause<OMPC_Untied>, 1740 ]; 1741 let leafConstructs = [OMP_Parallel, OMP_Master, OMP_TaskLoop, OMP_Simd]; 1742 let category = CA_Executable; 1743} 1744def OMP_ParallelSections : Directive<"parallel sections"> { 1745 let allowedClauses = [ 1746 VersionedClause<OMPC_Allocate>, 1747 VersionedClause<OMPC_Copyin>, 1748 VersionedClause<OMPC_Default>, 1749 VersionedClause<OMPC_FirstPrivate>, 1750 VersionedClause<OMPC_LastPrivate>, 1751 VersionedClause<OMPC_OMPX_Attribute>, 1752 VersionedClause<OMPC_Private>, 1753 VersionedClause<OMPC_ProcBind>, 1754 VersionedClause<OMPC_Reduction>, 1755 VersionedClause<OMPC_Shared>, 1756 ]; 1757 let allowedOnceClauses = [ 1758 VersionedClause<OMPC_If>, 1759 VersionedClause<OMPC_NumThreads>, 1760 ]; 1761 let leafConstructs = [OMP_Parallel, OMP_Sections]; 1762 let category = CA_Executable; 1763} 1764def OMP_ParallelWorkshare : Directive<"parallel workshare"> { 1765 let allowedClauses = [ 1766 VersionedClause<OMPC_Allocate>, 1767 VersionedClause<OMPC_Copyin>, 1768 VersionedClause<OMPC_Default>, 1769 VersionedClause<OMPC_FirstPrivate>, 1770 VersionedClause<OMPC_Private>, 1771 VersionedClause<OMPC_Reduction>, 1772 VersionedClause<OMPC_Shared>, 1773 ]; 1774 let allowedOnceClauses = [ 1775 VersionedClause<OMPC_If>, 1776 VersionedClause<OMPC_NumThreads>, 1777 VersionedClause<OMPC_ProcBind>, 1778 ]; 1779 let leafConstructs = [OMP_Parallel, OMP_Workshare]; 1780 let category = CA_Executable; 1781} 1782def OMP_TargetParallel : Directive<"target parallel"> { 1783 let allowedClauses = [ 1784 VersionedClause<OMPC_Allocate>, 1785 VersionedClause<OMPC_Default>, 1786 VersionedClause<OMPC_Depend>, 1787 VersionedClause<OMPC_FirstPrivate>, 1788 VersionedClause<OMPC_HasDeviceAddr, 51>, 1789 VersionedClause<OMPC_If>, 1790 VersionedClause<OMPC_IsDevicePtr>, 1791 VersionedClause<OMPC_Map>, 1792 VersionedClause<OMPC_NoWait>, 1793 VersionedClause<OMPC_OMPX_Attribute>, 1794 VersionedClause<OMPC_Private>, 1795 VersionedClause<OMPC_Reduction>, 1796 VersionedClause<OMPC_Shared>, 1797 VersionedClause<OMPC_UsesAllocators, 50>, 1798 ]; 1799 let allowedOnceClauses = [ 1800 VersionedClause<OMPC_DefaultMap>, 1801 VersionedClause<OMPC_Device>, 1802 VersionedClause<OMPC_NumThreads>, 1803 VersionedClause<OMPC_OMPX_DynCGroupMem>, 1804 VersionedClause<OMPC_ProcBind>, 1805 VersionedClause<OMPC_ThreadLimit, 51>, 1806 ]; 1807 let leafConstructs = [OMP_Target, OMP_Parallel]; 1808 let category = CA_Executable; 1809} 1810def OMP_TargetParallelDo : Directive<"target parallel do"> { 1811 let allowedClauses = [ 1812 VersionedClause<OMPC_Allocator>, 1813 VersionedClause<OMPC_Copyin>, 1814 VersionedClause<OMPC_Default>, 1815 VersionedClause<OMPC_Depend>, 1816 VersionedClause<OMPC_FirstPrivate>, 1817 VersionedClause<OMPC_HasDeviceAddr, 51>, 1818 VersionedClause<OMPC_If>, 1819 VersionedClause<OMPC_IsDevicePtr>, 1820 VersionedClause<OMPC_LastPrivate>, 1821 VersionedClause<OMPC_Linear>, 1822 VersionedClause<OMPC_Map>, 1823 VersionedClause<OMPC_Private>, 1824 VersionedClause<OMPC_Reduction>, 1825 VersionedClause<OMPC_Shared>, 1826 VersionedClause<OMPC_UsesAllocators>, 1827 ]; 1828 let allowedOnceClauses = [ 1829 VersionedClause<OMPC_Collapse>, 1830 VersionedClause<OMPC_DefaultMap>, 1831 VersionedClause<OMPC_Device>, 1832 VersionedClause<OMPC_NoWait>, 1833 VersionedClause<OMPC_NumThreads>, 1834 VersionedClause<OMPC_Order, 50>, 1835 VersionedClause<OMPC_Ordered>, 1836 VersionedClause<OMPC_ProcBind>, 1837 VersionedClause<OMPC_Schedule>, 1838 ]; 1839 let leafConstructs = [OMP_Target, OMP_Parallel, OMP_Do]; 1840 let category = CA_Executable; 1841} 1842def OMP_TargetParallelDoSimd : Directive<"target parallel do simd"> { 1843 let allowedClauses = [ 1844 VersionedClause<OMPC_Aligned>, 1845 VersionedClause<OMPC_Allocate>, 1846 VersionedClause<OMPC_Collapse>, 1847 VersionedClause<OMPC_Default>, 1848 VersionedClause<OMPC_DefaultMap>, 1849 VersionedClause<OMPC_Depend>, 1850 VersionedClause<OMPC_Device>, 1851 VersionedClause<OMPC_FirstPrivate>, 1852 VersionedClause<OMPC_HasDeviceAddr, 51>, 1853 VersionedClause<OMPC_If>, 1854 VersionedClause<OMPC_IsDevicePtr>, 1855 VersionedClause<OMPC_LastPrivate>, 1856 VersionedClause<OMPC_Linear>, 1857 VersionedClause<OMPC_Map>, 1858 VersionedClause<OMPC_NonTemporal>, 1859 VersionedClause<OMPC_NoWait>, 1860 VersionedClause<OMPC_NumThreads>, 1861 VersionedClause<OMPC_Order, 50>, 1862 VersionedClause<OMPC_Ordered>, 1863 VersionedClause<OMPC_Private>, 1864 VersionedClause<OMPC_ProcBind>, 1865 VersionedClause<OMPC_Reduction>, 1866 VersionedClause<OMPC_SafeLen>, 1867 VersionedClause<OMPC_Schedule>, 1868 VersionedClause<OMPC_Shared>, 1869 VersionedClause<OMPC_SimdLen>, 1870 VersionedClause<OMPC_UsesAllocators>, 1871 ]; 1872 let leafConstructs = [OMP_Target, OMP_Parallel, OMP_Do, OMP_Simd]; 1873 let category = CA_Executable; 1874} 1875def OMP_TargetParallelFor : Directive<"target parallel for"> { 1876 let allowedClauses = [ 1877 VersionedClause<OMPC_Allocate>, 1878 VersionedClause<OMPC_Collapse>, 1879 VersionedClause<OMPC_Default>, 1880 VersionedClause<OMPC_DefaultMap>, 1881 VersionedClause<OMPC_Depend>, 1882 VersionedClause<OMPC_Device>, 1883 VersionedClause<OMPC_FirstPrivate>, 1884 VersionedClause<OMPC_HasDeviceAddr, 51>, 1885 VersionedClause<OMPC_If>, 1886 VersionedClause<OMPC_IsDevicePtr>, 1887 VersionedClause<OMPC_LastPrivate>, 1888 VersionedClause<OMPC_Linear>, 1889 VersionedClause<OMPC_Map>, 1890 VersionedClause<OMPC_NoWait>, 1891 VersionedClause<OMPC_NumThreads>, 1892 VersionedClause<OMPC_OMPX_Attribute>, 1893 VersionedClause<OMPC_Order, 50>, 1894 VersionedClause<OMPC_Ordered>, 1895 VersionedClause<OMPC_Private>, 1896 VersionedClause<OMPC_ProcBind>, 1897 VersionedClause<OMPC_Reduction>, 1898 VersionedClause<OMPC_Schedule>, 1899 VersionedClause<OMPC_Shared>, 1900 VersionedClause<OMPC_UsesAllocators, 50>, 1901 ]; 1902 let allowedOnceClauses = [ 1903 VersionedClause<OMPC_OMPX_DynCGroupMem>, 1904 VersionedClause<OMPC_ThreadLimit, 51>, 1905 ]; 1906 let leafConstructs = [OMP_Target, OMP_Parallel, OMP_For]; 1907 let category = CA_Executable; 1908} 1909def OMP_TargetParallelForSimd : Directive<"target parallel for simd"> { 1910 let allowedClauses = [ 1911 VersionedClause<OMPC_Aligned>, 1912 VersionedClause<OMPC_Allocate>, 1913 VersionedClause<OMPC_Collapse>, 1914 VersionedClause<OMPC_Default>, 1915 VersionedClause<OMPC_DefaultMap>, 1916 VersionedClause<OMPC_Depend>, 1917 VersionedClause<OMPC_Device>, 1918 VersionedClause<OMPC_FirstPrivate>, 1919 VersionedClause<OMPC_HasDeviceAddr, 51>, 1920 VersionedClause<OMPC_If>, 1921 VersionedClause<OMPC_IsDevicePtr>, 1922 VersionedClause<OMPC_LastPrivate>, 1923 VersionedClause<OMPC_Linear>, 1924 VersionedClause<OMPC_Map>, 1925 VersionedClause<OMPC_NonTemporal, 50>, 1926 VersionedClause<OMPC_NoWait>, 1927 VersionedClause<OMPC_NumThreads>, 1928 VersionedClause<OMPC_OMPX_Attribute>, 1929 VersionedClause<OMPC_Order, 50>, 1930 VersionedClause<OMPC_Ordered>, 1931 VersionedClause<OMPC_Private>, 1932 VersionedClause<OMPC_ProcBind>, 1933 VersionedClause<OMPC_Reduction>, 1934 VersionedClause<OMPC_SafeLen>, 1935 VersionedClause<OMPC_Schedule>, 1936 VersionedClause<OMPC_Shared>, 1937 VersionedClause<OMPC_SimdLen>, 1938 VersionedClause<OMPC_UsesAllocators, 50>, 1939 ]; 1940 let allowedOnceClauses = [ 1941 VersionedClause<OMPC_OMPX_DynCGroupMem>, 1942 VersionedClause<OMPC_ThreadLimit, 51>, 1943 ]; 1944 let leafConstructs = [OMP_Target, OMP_Parallel, OMP_For, OMP_Simd]; 1945 let category = CA_Executable; 1946} 1947def OMP_target_parallel_loop : Directive<"target parallel loop"> { 1948 let allowedClauses = [ 1949 VersionedClause<OMPC_Allocate>, 1950 VersionedClause<OMPC_Copyin>, 1951 VersionedClause<OMPC_Depend>, 1952 VersionedClause<OMPC_Device>, 1953 VersionedClause<OMPC_FirstPrivate>, 1954 VersionedClause<OMPC_HasDeviceAddr, 51>, 1955 VersionedClause<OMPC_If>, 1956 VersionedClause<OMPC_IsDevicePtr>, 1957 VersionedClause<OMPC_LastPrivate>, 1958 VersionedClause<OMPC_Map>, 1959 VersionedClause<OMPC_OMPX_Attribute>, 1960 VersionedClause<OMPC_Private>, 1961 VersionedClause<OMPC_Reduction>, 1962 VersionedClause<OMPC_Shared>, 1963 VersionedClause<OMPC_UsesAllocators, 50>, 1964 ]; 1965 let allowedOnceClauses = [ 1966 VersionedClause<OMPC_Bind, 50>, 1967 VersionedClause<OMPC_Collapse>, 1968 VersionedClause<OMPC_Default>, 1969 VersionedClause<OMPC_DefaultMap>, 1970 VersionedClause<OMPC_NoWait>, 1971 VersionedClause<OMPC_NumThreads>, 1972 VersionedClause<OMPC_OMPX_DynCGroupMem>, 1973 VersionedClause<OMPC_Order>, 1974 VersionedClause<OMPC_ProcBind>, 1975 VersionedClause<OMPC_ThreadLimit, 51>, 1976 ]; 1977 let leafConstructs = [OMP_Target, OMP_Parallel, OMP_loop]; 1978 let category = CA_Executable; 1979} 1980def OMP_TargetSimd : Directive<"target simd"> { 1981 let allowedClauses = [ 1982 VersionedClause<OMPC_Aligned>, 1983 VersionedClause<OMPC_Allocate>, 1984 VersionedClause<OMPC_Depend>, 1985 VersionedClause<OMPC_FirstPrivate>, 1986 VersionedClause<OMPC_HasDeviceAddr, 51>, 1987 VersionedClause<OMPC_If>, 1988 VersionedClause<OMPC_IsDevicePtr>, 1989 VersionedClause<OMPC_LastPrivate>, 1990 VersionedClause<OMPC_Linear>, 1991 VersionedClause<OMPC_Map>, 1992 VersionedClause<OMPC_NonTemporal, 50>, 1993 VersionedClause<OMPC_NoWait>, 1994 VersionedClause<OMPC_OMPX_Attribute>, 1995 VersionedClause<OMPC_Private>, 1996 VersionedClause<OMPC_Reduction>, 1997 VersionedClause<OMPC_Shared>, 1998 VersionedClause<OMPC_UsesAllocators, 50>, 1999 ]; 2000 let allowedOnceClauses = [ 2001 VersionedClause<OMPC_Collapse>, 2002 VersionedClause<OMPC_DefaultMap>, 2003 VersionedClause<OMPC_Device>, 2004 VersionedClause<OMPC_NumThreads>, 2005 VersionedClause<OMPC_OMPX_DynCGroupMem>, 2006 VersionedClause<OMPC_Order, 50>, 2007 VersionedClause<OMPC_ProcBind>, 2008 VersionedClause<OMPC_SafeLen>, 2009 VersionedClause<OMPC_Schedule>, 2010 VersionedClause<OMPC_SimdLen>, 2011 VersionedClause<OMPC_ThreadLimit, 51>, 2012 ]; 2013 let leafConstructs = [OMP_Target, OMP_Simd]; 2014 let category = CA_Executable; 2015} 2016def OMP_TargetTeams : Directive<"target teams"> { 2017 let allowedClauses = [ 2018 VersionedClause<OMPC_Allocate>, 2019 VersionedClause<OMPC_Depend>, 2020 VersionedClause<OMPC_FirstPrivate>, 2021 VersionedClause<OMPC_HasDeviceAddr, 51>, 2022 VersionedClause<OMPC_If>, 2023 VersionedClause<OMPC_IsDevicePtr>, 2024 VersionedClause<OMPC_Map>, 2025 VersionedClause<OMPC_OMPX_Attribute>, 2026 VersionedClause<OMPC_Private>, 2027 VersionedClause<OMPC_Reduction>, 2028 VersionedClause<OMPC_Shared>, 2029 VersionedClause<OMPC_UsesAllocators, 50>, 2030 ]; 2031 let allowedOnceClauses = [ 2032 VersionedClause<OMPC_Default>, 2033 VersionedClause<OMPC_DefaultMap>, 2034 VersionedClause<OMPC_Device>, 2035 VersionedClause<OMPC_NoWait>, 2036 VersionedClause<OMPC_NumTeams>, 2037 VersionedClause<OMPC_OMPX_DynCGroupMem>, 2038 VersionedClause<OMPC_OMPX_Bare>, 2039 VersionedClause<OMPC_ThreadLimit>, 2040 ]; 2041 let leafConstructs = [OMP_Target, OMP_Teams]; 2042 let category = CA_Executable; 2043} 2044def OMP_TargetTeamsDistribute : Directive<"target teams distribute"> { 2045 let allowedClauses = [ 2046 VersionedClause<OMPC_Allocate>, 2047 VersionedClause<OMPC_Depend>, 2048 VersionedClause<OMPC_FirstPrivate>, 2049 VersionedClause<OMPC_HasDeviceAddr, 51>, 2050 VersionedClause<OMPC_If>, 2051 VersionedClause<OMPC_IsDevicePtr>, 2052 VersionedClause<OMPC_LastPrivate>, 2053 VersionedClause<OMPC_Map>, 2054 VersionedClause<OMPC_OMPX_Attribute>, 2055 VersionedClause<OMPC_Private>, 2056 VersionedClause<OMPC_Reduction>, 2057 VersionedClause<OMPC_Shared>, 2058 VersionedClause<OMPC_UsesAllocators, 50>, 2059 ]; 2060 let allowedOnceClauses = [ 2061 VersionedClause<OMPC_Collapse>, 2062 VersionedClause<OMPC_Default>, 2063 VersionedClause<OMPC_DefaultMap>, 2064 VersionedClause<OMPC_Device>, 2065 VersionedClause<OMPC_DistSchedule>, 2066 VersionedClause<OMPC_NoWait>, 2067 VersionedClause<OMPC_NumTeams>, 2068 VersionedClause<OMPC_OMPX_DynCGroupMem>, 2069 VersionedClause<OMPC_Order, 50>, 2070 VersionedClause<OMPC_ThreadLimit>, 2071 ]; 2072 let leafConstructs = [OMP_Target, OMP_Teams, OMP_Distribute]; 2073 let category = CA_Executable; 2074} 2075def OMP_TargetTeamsDistributeParallelDo : 2076 Directive<"target teams distribute parallel do"> { 2077 let allowedClauses = [ 2078 VersionedClause<OMPC_Allocate>, 2079 VersionedClause<OMPC_Copyin>, 2080 VersionedClause<OMPC_Depend>, 2081 VersionedClause<OMPC_FirstPrivate>, 2082 VersionedClause<OMPC_HasDeviceAddr, 51>, 2083 VersionedClause<OMPC_If>, 2084 VersionedClause<OMPC_IsDevicePtr>, 2085 VersionedClause<OMPC_LastPrivate>, 2086 VersionedClause<OMPC_Linear>, 2087 VersionedClause<OMPC_Map>, 2088 VersionedClause<OMPC_Ordered>, 2089 VersionedClause<OMPC_Private>, 2090 VersionedClause<OMPC_Reduction>, 2091 VersionedClause<OMPC_Shared>, 2092 VersionedClause<OMPC_UsesAllocators>, 2093 ]; 2094 let allowedOnceClauses = [ 2095 VersionedClause<OMPC_Collapse>, 2096 VersionedClause<OMPC_Default>, 2097 VersionedClause<OMPC_DefaultMap>, 2098 VersionedClause<OMPC_Device>, 2099 VersionedClause<OMPC_DistSchedule>, 2100 VersionedClause<OMPC_NoWait>, 2101 VersionedClause<OMPC_NumTeams>, 2102 VersionedClause<OMPC_NumThreads>, 2103 VersionedClause<OMPC_Order, 50>, 2104 VersionedClause<OMPC_ProcBind>, 2105 VersionedClause<OMPC_Schedule>, 2106 VersionedClause<OMPC_ThreadLimit>, 2107 ]; 2108 let leafConstructs = [OMP_Target, OMP_Teams, OMP_Distribute, OMP_Parallel, OMP_Do]; 2109 let category = CA_Executable; 2110} 2111def OMP_TargetTeamsDistributeParallelDoSimd : 2112 Directive<"target teams distribute parallel do simd"> { 2113 let allowedClauses = [ 2114 VersionedClause<OMPC_Aligned>, 2115 VersionedClause<OMPC_Allocate>, 2116 VersionedClause<OMPC_Copyin>, 2117 VersionedClause<OMPC_Depend>, 2118 VersionedClause<OMPC_FirstPrivate>, 2119 VersionedClause<OMPC_HasDeviceAddr, 51>, 2120 VersionedClause<OMPC_If>, 2121 VersionedClause<OMPC_IsDevicePtr>, 2122 VersionedClause<OMPC_LastPrivate>, 2123 VersionedClause<OMPC_Linear>, 2124 VersionedClause<OMPC_Map>, 2125 VersionedClause<OMPC_NonTemporal>, 2126 VersionedClause<OMPC_Ordered>, 2127 VersionedClause<OMPC_Private>, 2128 VersionedClause<OMPC_Reduction>, 2129 VersionedClause<OMPC_Shared>, 2130 VersionedClause<OMPC_UsesAllocators>, 2131 ]; 2132 let allowedOnceClauses = [ 2133 VersionedClause<OMPC_Collapse>, 2134 VersionedClause<OMPC_Default>, 2135 VersionedClause<OMPC_DefaultMap>, 2136 VersionedClause<OMPC_Device>, 2137 VersionedClause<OMPC_DistSchedule>, 2138 VersionedClause<OMPC_NoWait>, 2139 VersionedClause<OMPC_NumTeams>, 2140 VersionedClause<OMPC_NumThreads>, 2141 VersionedClause<OMPC_Order, 50>, 2142 VersionedClause<OMPC_ProcBind>, 2143 VersionedClause<OMPC_SafeLen>, 2144 VersionedClause<OMPC_Schedule>, 2145 VersionedClause<OMPC_SimdLen>, 2146 VersionedClause<OMPC_ThreadLimit>, 2147 ]; 2148 let leafConstructs = [OMP_Target, OMP_Teams, OMP_Distribute, OMP_Parallel, OMP_Do, OMP_Simd]; 2149 let category = CA_Executable; 2150} 2151def OMP_TargetTeamsDistributeParallelFor : 2152 Directive<"target teams distribute parallel for"> { 2153 let allowedClauses = [ 2154 VersionedClause<OMPC_Allocate>, 2155 VersionedClause<OMPC_Collapse>, 2156 VersionedClause<OMPC_Default>, 2157 VersionedClause<OMPC_DefaultMap>, 2158 VersionedClause<OMPC_Depend>, 2159 VersionedClause<OMPC_Device>, 2160 VersionedClause<OMPC_DistSchedule>, 2161 VersionedClause<OMPC_FirstPrivate>, 2162 VersionedClause<OMPC_HasDeviceAddr, 51>, 2163 VersionedClause<OMPC_If>, 2164 VersionedClause<OMPC_IsDevicePtr>, 2165 VersionedClause<OMPC_LastPrivate>, 2166 VersionedClause<OMPC_Map>, 2167 VersionedClause<OMPC_NoWait>, 2168 VersionedClause<OMPC_NumTeams>, 2169 VersionedClause<OMPC_NumThreads>, 2170 VersionedClause<OMPC_OMPX_Attribute>, 2171 VersionedClause<OMPC_Order, 50>, 2172 VersionedClause<OMPC_Private>, 2173 VersionedClause<OMPC_ProcBind>, 2174 VersionedClause<OMPC_Reduction>, 2175 VersionedClause<OMPC_Schedule>, 2176 VersionedClause<OMPC_Shared>, 2177 VersionedClause<OMPC_ThreadLimit>, 2178 VersionedClause<OMPC_UsesAllocators, 50>, 2179 ]; 2180 let allowedOnceClauses = [ 2181 VersionedClause<OMPC_OMPX_DynCGroupMem>, 2182 ]; 2183 let leafConstructs = [OMP_Target, OMP_Teams, OMP_Distribute, OMP_Parallel, OMP_For]; 2184 let category = CA_Executable; 2185} 2186def OMP_TargetTeamsDistributeParallelForSimd : 2187 Directive<"target teams distribute parallel for simd"> { 2188 let allowedClauses = [ 2189 VersionedClause<OMPC_Aligned>, 2190 VersionedClause<OMPC_Allocate>, 2191 VersionedClause<OMPC_Collapse>, 2192 VersionedClause<OMPC_Default>, 2193 VersionedClause<OMPC_DefaultMap>, 2194 VersionedClause<OMPC_Depend>, 2195 VersionedClause<OMPC_Device>, 2196 VersionedClause<OMPC_DistSchedule>, 2197 VersionedClause<OMPC_FirstPrivate>, 2198 VersionedClause<OMPC_HasDeviceAddr, 51>, 2199 VersionedClause<OMPC_If>, 2200 VersionedClause<OMPC_IsDevicePtr>, 2201 VersionedClause<OMPC_LastPrivate>, 2202 VersionedClause<OMPC_Linear>, 2203 VersionedClause<OMPC_Map>, 2204 VersionedClause<OMPC_NonTemporal, 50>, 2205 VersionedClause<OMPC_NoWait>, 2206 VersionedClause<OMPC_NumTeams>, 2207 VersionedClause<OMPC_NumThreads>, 2208 VersionedClause<OMPC_OMPX_Attribute>, 2209 VersionedClause<OMPC_Order, 50>, 2210 VersionedClause<OMPC_Private>, 2211 VersionedClause<OMPC_ProcBind>, 2212 VersionedClause<OMPC_Reduction>, 2213 VersionedClause<OMPC_SafeLen>, 2214 VersionedClause<OMPC_Schedule>, 2215 VersionedClause<OMPC_Shared>, 2216 VersionedClause<OMPC_SimdLen>, 2217 VersionedClause<OMPC_ThreadLimit>, 2218 VersionedClause<OMPC_UsesAllocators, 50>, 2219 ]; 2220 let allowedOnceClauses = [ 2221 VersionedClause<OMPC_OMPX_DynCGroupMem>, 2222 ]; 2223 let leafConstructs = [OMP_Target, OMP_Teams, OMP_Distribute, OMP_Parallel, OMP_For, OMP_Simd]; 2224 let category = CA_Executable; 2225} 2226def OMP_TargetTeamsDistributeSimd : 2227 Directive<"target teams distribute simd"> { 2228 let allowedClauses = [ 2229 VersionedClause<OMPC_Aligned>, 2230 VersionedClause<OMPC_Allocate>, 2231 VersionedClause<OMPC_Depend>, 2232 VersionedClause<OMPC_FirstPrivate>, 2233 VersionedClause<OMPC_HasDeviceAddr, 51>, 2234 VersionedClause<OMPC_If>, 2235 VersionedClause<OMPC_IsDevicePtr>, 2236 VersionedClause<OMPC_LastPrivate>, 2237 VersionedClause<OMPC_Linear>, 2238 VersionedClause<OMPC_Map>, 2239 VersionedClause<OMPC_NonTemporal, 50>, 2240 VersionedClause<OMPC_OMPX_Attribute>, 2241 VersionedClause<OMPC_Private>, 2242 VersionedClause<OMPC_Reduction>, 2243 VersionedClause<OMPC_Shared>, 2244 VersionedClause<OMPC_UsesAllocators, 50>, 2245 ]; 2246 let allowedOnceClauses = [ 2247 VersionedClause<OMPC_Collapse>, 2248 VersionedClause<OMPC_DefaultMap>, 2249 VersionedClause<OMPC_Device>, 2250 VersionedClause<OMPC_DistSchedule>, 2251 VersionedClause<OMPC_NoWait>, 2252 VersionedClause<OMPC_NumTeams>, 2253 VersionedClause<OMPC_OMPX_DynCGroupMem>, 2254 VersionedClause<OMPC_Order, 50>, 2255 VersionedClause<OMPC_SafeLen>, 2256 VersionedClause<OMPC_SimdLen>, 2257 VersionedClause<OMPC_ThreadLimit>, 2258 ]; 2259 let leafConstructs = [OMP_Target, OMP_Teams, OMP_Distribute, OMP_Simd]; 2260 let category = CA_Executable; 2261} 2262def OMP_target_teams_loop : Directive<"target teams loop"> { 2263 let allowedClauses = [ 2264 VersionedClause<OMPC_Allocate>, 2265 VersionedClause<OMPC_DefaultMap>, 2266 VersionedClause<OMPC_Depend>, 2267 VersionedClause<OMPC_Device>, 2268 VersionedClause<OMPC_FirstPrivate>, 2269 VersionedClause<OMPC_HasDeviceAddr, 51>, 2270 VersionedClause<OMPC_If>, 2271 VersionedClause<OMPC_IsDevicePtr>, 2272 VersionedClause<OMPC_LastPrivate>, 2273 VersionedClause<OMPC_Map>, 2274 VersionedClause<OMPC_OMPX_Attribute>, 2275 VersionedClause<OMPC_Private>, 2276 VersionedClause<OMPC_Reduction>, 2277 VersionedClause<OMPC_Shared>, 2278 VersionedClause<OMPC_UsesAllocators, 50>, 2279 ]; 2280 let allowedOnceClauses = [ 2281 VersionedClause<OMPC_Bind, 50>, 2282 VersionedClause<OMPC_Collapse>, 2283 VersionedClause<OMPC_Default>, 2284 VersionedClause<OMPC_NoWait>, 2285 VersionedClause<OMPC_NumTeams>, 2286 VersionedClause<OMPC_OMPX_DynCGroupMem>, 2287 VersionedClause<OMPC_Order>, 2288 VersionedClause<OMPC_ThreadLimit>, 2289 ]; 2290 let leafConstructs = [OMP_Target, OMP_Teams, OMP_loop]; 2291 let category = CA_Executable; 2292} 2293def OMP_TaskLoopSimd : Directive<"taskloop simd"> { 2294 let allowedClauses = [ 2295 VersionedClause<OMPC_Aligned>, 2296 VersionedClause<OMPC_Allocate>, 2297 VersionedClause<OMPC_Default>, 2298 VersionedClause<OMPC_FirstPrivate>, 2299 VersionedClause<OMPC_If>, 2300 VersionedClause<OMPC_InReduction>, 2301 VersionedClause<OMPC_LastPrivate>, 2302 VersionedClause<OMPC_Linear>, 2303 VersionedClause<OMPC_Mergeable>, 2304 VersionedClause<OMPC_NoGroup>, 2305 VersionedClause<OMPC_NonTemporal, 50>, 2306 VersionedClause<OMPC_Private>, 2307 VersionedClause<OMPC_Reduction>, 2308 VersionedClause<OMPC_Shared>, 2309 VersionedClause<OMPC_Untied>, 2310 ]; 2311 let allowedOnceClauses = [ 2312 VersionedClause<OMPC_Collapse>, 2313 VersionedClause<OMPC_Final>, 2314 VersionedClause<OMPC_Order, 50>, 2315 VersionedClause<OMPC_Priority>, 2316 VersionedClause<OMPC_SafeLen>, 2317 VersionedClause<OMPC_SimdLen>, 2318 ]; 2319 let allowedExclusiveClauses = [ 2320 VersionedClause<OMPC_GrainSize>, 2321 VersionedClause<OMPC_NumTasks>, 2322 ]; 2323 let leafConstructs = [OMP_TaskLoop, OMP_Simd]; 2324 let category = CA_Executable; 2325} 2326def OMP_TeamsDistribute : Directive<"teams distribute"> { 2327 let allowedClauses = [ 2328 VersionedClause<OMPC_Allocate>, 2329 VersionedClause<OMPC_Collapse>, 2330 VersionedClause<OMPC_Default>, 2331 VersionedClause<OMPC_DistSchedule>, 2332 VersionedClause<OMPC_FirstPrivate>, 2333 VersionedClause<OMPC_LastPrivate>, 2334 VersionedClause<OMPC_NumTeams>, 2335 VersionedClause<OMPC_OMPX_Attribute>, 2336 VersionedClause<OMPC_Private>, 2337 VersionedClause<OMPC_Reduction>, 2338 VersionedClause<OMPC_Shared>, 2339 VersionedClause<OMPC_ThreadLimit>, 2340 ]; 2341 let allowedOnceClauses = [ 2342 VersionedClause<OMPC_If>, 2343 VersionedClause<OMPC_Order, 50>, 2344 ]; 2345 let leafConstructs = [OMP_Teams, OMP_Distribute]; 2346 let category = CA_Executable; 2347} 2348def OMP_TeamsDistributeParallelDo : 2349 Directive<"teams distribute parallel do"> { 2350 let allowedClauses = [ 2351 VersionedClause<OMPC_Allocate>, 2352 VersionedClause<OMPC_Copyin>, 2353 VersionedClause<OMPC_FirstPrivate>, 2354 VersionedClause<OMPC_If>, 2355 VersionedClause<OMPC_LastPrivate>, 2356 VersionedClause<OMPC_Linear>, 2357 VersionedClause<OMPC_Private>, 2358 VersionedClause<OMPC_Reduction>, 2359 VersionedClause<OMPC_Shared>, 2360 ]; 2361 let allowedOnceClauses = [ 2362 VersionedClause<OMPC_Collapse>, 2363 VersionedClause<OMPC_Default>, 2364 VersionedClause<OMPC_DistSchedule>, 2365 VersionedClause<OMPC_NumTeams>, 2366 VersionedClause<OMPC_NumThreads>, 2367 VersionedClause<OMPC_Order, 50>, 2368 VersionedClause<OMPC_Ordered>, 2369 VersionedClause<OMPC_ProcBind>, 2370 VersionedClause<OMPC_Schedule>, 2371 VersionedClause<OMPC_ThreadLimit>, 2372 ]; 2373 let leafConstructs = [OMP_Teams, OMP_Distribute, OMP_Parallel, OMP_Do]; 2374 let category = CA_Executable; 2375} 2376def OMP_TeamsDistributeParallelDoSimd : 2377 Directive<"teams distribute parallel do simd"> { 2378 let allowedClauses = [ 2379 VersionedClause<OMPC_Aligned>, 2380 VersionedClause<OMPC_Allocate>, 2381 VersionedClause<OMPC_FirstPrivate>, 2382 VersionedClause<OMPC_If>, 2383 VersionedClause<OMPC_LastPrivate>, 2384 VersionedClause<OMPC_Linear>, 2385 VersionedClause<OMPC_NonTemporal>, 2386 VersionedClause<OMPC_Private>, 2387 VersionedClause<OMPC_Reduction>, 2388 VersionedClause<OMPC_Shared>, 2389 ]; 2390 let allowedOnceClauses = [ 2391 VersionedClause<OMPC_Collapse>, 2392 VersionedClause<OMPC_Default>, 2393 VersionedClause<OMPC_DistSchedule>, 2394 VersionedClause<OMPC_NumTeams>, 2395 VersionedClause<OMPC_NumThreads>, 2396 VersionedClause<OMPC_Order, 50>, 2397 VersionedClause<OMPC_ProcBind>, 2398 VersionedClause<OMPC_SafeLen>, 2399 VersionedClause<OMPC_Schedule>, 2400 VersionedClause<OMPC_SimdLen>, 2401 VersionedClause<OMPC_ThreadLimit>, 2402 ]; 2403 let leafConstructs = [OMP_Teams, OMP_Distribute, OMP_Parallel, OMP_Do, OMP_Simd]; 2404 let category = CA_Executable; 2405} 2406def OMP_TeamsDistributeParallelFor : 2407 Directive<"teams distribute parallel for"> { 2408 let allowedClauses = [ 2409 VersionedClause<OMPC_Allocate>, 2410 VersionedClause<OMPC_Collapse>, 2411 VersionedClause<OMPC_Copyin>, 2412 VersionedClause<OMPC_Default>, 2413 VersionedClause<OMPC_DistSchedule>, 2414 VersionedClause<OMPC_FirstPrivate>, 2415 VersionedClause<OMPC_If>, 2416 VersionedClause<OMPC_LastPrivate>, 2417 VersionedClause<OMPC_NumTeams>, 2418 VersionedClause<OMPC_NumThreads>, 2419 VersionedClause<OMPC_OMPX_Attribute>, 2420 VersionedClause<OMPC_Order, 50>, 2421 VersionedClause<OMPC_Private>, 2422 VersionedClause<OMPC_ProcBind>, 2423 VersionedClause<OMPC_Reduction>, 2424 VersionedClause<OMPC_Schedule>, 2425 VersionedClause<OMPC_Shared>, 2426 VersionedClause<OMPC_ThreadLimit>, 2427 ]; 2428 let leafConstructs = [OMP_Teams, OMP_Distribute, OMP_Parallel, OMP_For]; 2429 let category = CA_Executable; 2430} 2431def OMP_TeamsDistributeParallelForSimd : 2432 Directive<"teams distribute parallel for simd"> { 2433 let allowedClauses = [ 2434 VersionedClause<OMPC_Aligned>, 2435 VersionedClause<OMPC_Allocate>, 2436 VersionedClause<OMPC_Collapse>, 2437 VersionedClause<OMPC_Default>, 2438 VersionedClause<OMPC_DistSchedule>, 2439 VersionedClause<OMPC_FirstPrivate>, 2440 VersionedClause<OMPC_If>, 2441 VersionedClause<OMPC_LastPrivate>, 2442 VersionedClause<OMPC_Linear>, 2443 VersionedClause<OMPC_NonTemporal, 50>, 2444 VersionedClause<OMPC_NumTeams>, 2445 VersionedClause<OMPC_NumThreads>, 2446 VersionedClause<OMPC_OMPX_Attribute>, 2447 VersionedClause<OMPC_Order, 50>, 2448 VersionedClause<OMPC_Private>, 2449 VersionedClause<OMPC_ProcBind>, 2450 VersionedClause<OMPC_Reduction>, 2451 VersionedClause<OMPC_SafeLen>, 2452 VersionedClause<OMPC_Schedule>, 2453 VersionedClause<OMPC_Shared>, 2454 VersionedClause<OMPC_SimdLen>, 2455 VersionedClause<OMPC_ThreadLimit>, 2456 ]; 2457 let leafConstructs = [OMP_Teams, OMP_Distribute, OMP_Parallel, OMP_For, OMP_Simd]; 2458 let category = CA_Executable; 2459} 2460def OMP_TeamsDistributeSimd : Directive<"teams distribute simd"> { 2461 let allowedClauses = [ 2462 VersionedClause<OMPC_Aligned>, 2463 VersionedClause<OMPC_Allocate>, 2464 VersionedClause<OMPC_FirstPrivate>, 2465 VersionedClause<OMPC_If, 50>, 2466 VersionedClause<OMPC_LastPrivate>, 2467 VersionedClause<OMPC_Linear>, 2468 VersionedClause<OMPC_NonTemporal, 50>, 2469 VersionedClause<OMPC_OMPX_Attribute>, 2470 VersionedClause<OMPC_Private>, 2471 VersionedClause<OMPC_Reduction>, 2472 VersionedClause<OMPC_Shared>, 2473 ]; 2474 let allowedOnceClauses = [ 2475 VersionedClause<OMPC_Collapse>, 2476 VersionedClause<OMPC_Default>, 2477 VersionedClause<OMPC_DistSchedule>, 2478 VersionedClause<OMPC_NumTeams>, 2479 VersionedClause<OMPC_Order, 50>, 2480 VersionedClause<OMPC_SafeLen>, 2481 VersionedClause<OMPC_SimdLen>, 2482 VersionedClause<OMPC_ThreadLimit>, 2483 ]; 2484 let leafConstructs = [OMP_Teams, OMP_Distribute, OMP_Simd]; 2485 let category = CA_Executable; 2486} 2487def OMP_teams_loop : Directive<"teams loop"> { 2488 let allowedClauses = [ 2489 VersionedClause<OMPC_Allocate>, 2490 VersionedClause<OMPC_FirstPrivate>, 2491 VersionedClause<OMPC_LastPrivate>, 2492 VersionedClause<OMPC_OMPX_Attribute>, 2493 VersionedClause<OMPC_Private>, 2494 VersionedClause<OMPC_Reduction>, 2495 VersionedClause<OMPC_Shared>, 2496 ]; 2497 let allowedOnceClauses = [ 2498 VersionedClause<OMPC_Bind, 50>, 2499 VersionedClause<OMPC_Collapse>, 2500 VersionedClause<OMPC_Default>, 2501 VersionedClause<OMPC_NumTeams>, 2502 VersionedClause<OMPC_Order>, 2503 VersionedClause<OMPC_ThreadLimit>, 2504 ]; 2505 let leafConstructs = [OMP_Teams, OMP_loop]; 2506 let category = CA_Executable; 2507} 2508