Subversion Repositories QNX 8.QNX8 LLVM/Clang compiler suite

Rev

Details | Last modification | View Log | RSS feed

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