[llvm] [Frontend][OpenMP] Sort all the things in OMP.td, NFC (PR #94653)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 6 11:15:59 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-flang-openmp

Author: Krzysztof Parzyszek (kparzysz)

<details>
<summary>Changes</summary>

The file OMP.td is becoming tedious to update by hand due to the seemingly random ordering of various items in it. This patch brings order to it by sorting most of the contents.

The clause definitions are sorted alphabetically with respect to the spelling of the clause.[1]

The directive definitions are split into two leaf directives and compound directives.[2] Within each, definitions are sorted alphabetically with respect to the spelling, with the exception that "end xyz" directives are placed immediately following the definition of "xyz".[3]

Within each directive definition, the lists of clauses are also sorted alphabetically.

[1] All spellings are made of lowercase letters, _, or space. Ordering between non-letters follow the order assumed by `sort` utility. [2] Compound directives refer to the consituent leaf directives, hence the leaf definitions must come first.
[3] Some of the "end xyz" directives have properties derived from the corresponding "xyz" directive. This exception guarantees that "xyz" precedes the "end xyz".

---

Patch is 131.02 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/94653.diff


1 Files Affected:

- (modified) llvm/include/llvm/Frontend/OpenMP/OMP.td (+1548-1518) 


``````````diff
diff --git a/llvm/include/llvm/Frontend/OpenMP/OMP.td b/llvm/include/llvm/Frontend/OpenMP/OMP.td
index 609df6a4c54aa..afb8d5f725753 100644
--- a/llvm/include/llvm/Frontend/OpenMP/OMP.td
+++ b/llvm/include/llvm/Frontend/OpenMP/OMP.td
@@ -28,151 +28,48 @@ def OpenMP : DirectiveLanguage {
 }
 
 //===----------------------------------------------------------------------===//
-// Definition of OpenMP clauses
+// Definitions of OpenMP clauses
+// Sorted alphabetically wrt clause spelling.
 //===----------------------------------------------------------------------===//
 
-def OMPC_Allocator : Clause<"allocator"> {
-  let clangClass = "OMPAllocatorClause";
-  let flangClass = "ScalarIntExpr";
-}
-def OMPC_If : Clause<"if"> {
-  let clangClass = "OMPIfClause";
-  let flangClass = "OmpIfClause";
-}
-def OMPC_Final : Clause<"final"> {
-  let clangClass = "OMPFinalClause";
-  let flangClass = "ScalarLogicalExpr";
-}
-def OMPC_NumThreads : Clause<"num_threads"> {
-  let clangClass = "OMPNumThreadsClause";
-  let flangClass = "ScalarIntExpr";
-}
-def OMPC_SafeLen : Clause<"safelen"> {
-  let clangClass = "OMPSafelenClause";
-  let flangClass = "ScalarIntConstantExpr";
-}
-def OMPC_SimdLen : Clause<"simdlen"> {
-  let clangClass = "OMPSimdlenClause";
-  let flangClass = "ScalarIntConstantExpr";
-}
-def OMPC_Collapse : Clause<"collapse"> {
-  let clangClass = "OMPCollapseClause";
-  let flangClass = "ScalarIntConstantExpr";
-}
-def OMPC_Default : Clause<"default"> {
-  let clangClass = "OMPDefaultClause";
-  let flangClass = "OmpDefaultClause";
-}
-def OMPC_Private : Clause<"private"> {
-  let clangClass = "OMPPrivateClause";
-  let flangClass = "OmpObjectList";
-}
-def OMPC_Sizes: Clause<"sizes"> {
-  let clangClass = "OMPSizesClause";
-  let flangClass = "ScalarIntExpr";
-  let isValueList = true;
-  }
-def OMPC_Full: Clause<"full"> {
-  let clangClass = "OMPFullClause";
-}
-def OMPC_Partial: Clause<"partial"> {
-  let clangClass = "OMPPartialClause";
-  let flangClass = "ScalarIntConstantExpr";
-  let isValueOptional = true;
- }
-def OMPC_FirstPrivate : Clause<"firstprivate"> {
-  let clangClass = "OMPFirstprivateClause";
-  let flangClass = "OmpObjectList";
+def OMPC_Acquire : Clause<"acquire"> {
+  let clangClass = "OMPAcquireClause";
 }
-def OMPC_LastPrivate : Clause<"lastprivate"> {
-  let clangClass = "OMPLastprivateClause";
-  let flangClass = "OmpObjectList";
+def OMPC_AcqRel : Clause<"acq_rel"> {
+  let clangClass = "OMPAcqRelClause";
 }
-def OMPC_Shared : Clause<"shared"> {
-  let clangClass = "OMPSharedClause";
-  let flangClass = "OmpObjectList";
+def OMPC_AdjustArgs : Clause<"adjust_args"> {
 }
-def OMPC_Reduction : Clause<"reduction"> {
-  let clangClass = "OMPReductionClause";
-  let flangClass = "OmpReductionClause";
+def OMPC_Affinity : Clause<"affinity"> {
+  let clangClass = "OMPAffinityClause";
 }
-def OMPC_Linear : Clause<"linear"> {
-  let clangClass = "OMPLinearClause";
-  let flangClass = "OmpLinearClause";
+def OMPC_Align : Clause<"align"> {
+  let clangClass = "OMPAlignClause";
 }
 def OMPC_Aligned : Clause<"aligned"> {
   let clangClass = "OMPAlignedClause";
   let flangClass = "OmpAlignedClause";
 }
-def OMPC_Copyin : Clause<"copyin"> {
-  let clangClass = "OMPCopyinClause";
-  let flangClass = "OmpObjectList";
+def OMPC_Allocate : Clause<"allocate"> {
+  let clangClass = "OMPAllocateClause";
+  let flangClass = "OmpAllocateClause";
 }
-def OMPC_CopyPrivate : Clause<"copyprivate"> {
-  let clangClass = "OMPCopyprivateClause";
-  let flangClass = "OmpObjectList";
+def OMPC_Allocator : Clause<"allocator"> {
+  let clangClass = "OMPAllocatorClause";
+  let flangClass = "ScalarIntExpr";
 }
-def OMP_PROC_BIND_master : ClauseVal<"master",2,1> {}
-def OMP_PROC_BIND_close : ClauseVal<"close",3,1> {}
-def OMP_PROC_BIND_spread : ClauseVal<"spread",4,1> {}
-def OMP_PROC_BIND_primary : ClauseVal<"primary",5,1> {}
-def OMP_PROC_BIND_default : ClauseVal<"default",6,0> {}
-def OMP_PROC_BIND_unknown : ClauseVal<"unknown",7,0> { let isDefault = true; }
-def OMPC_ProcBind : Clause<"proc_bind"> {
-  let clangClass = "OMPProcBindClause";
-  let flangClass = "OmpProcBindClause";
-  let enumClauseValue = "ProcBindKind";
-  let allowedClauseValues = [
-    OMP_PROC_BIND_primary,
-    OMP_PROC_BIND_master,
-    OMP_PROC_BIND_close,
-    OMP_PROC_BIND_spread,
-    OMP_PROC_BIND_default,
-    OMP_PROC_BIND_unknown
-  ];
+def OMPC_AppendArgs : Clause<"append_args"> {
 }
-
-def OMP_SCHEDULE_Static : ClauseVal<"static", 2, 1> {}
-def OMP_SCHEDULE_Dynamic : ClauseVal<"dynamic", 3, 1> {}
-def OMP_SCHEDULE_Guided : ClauseVal<"guided", 4, 1> {}
-def OMP_SCHEDULE_Auto : ClauseVal<"auto", 5, 1> {}
-def OMP_SCHEDULE_Runtime : ClauseVal<"runtime", 6, 1> {}
-def OMP_SCHEDULE_Default : ClauseVal<"default", 7, 0> { let isDefault = 1; }
-
-def OMPC_Schedule : Clause<"schedule"> {
-  let clangClass = "OMPScheduleClause";
-  let flangClass = "OmpScheduleClause";
-  let enumClauseValue = "ScheduleKind";
-  let allowedClauseValues = [
-    OMP_SCHEDULE_Static,
-    OMP_SCHEDULE_Dynamic,
-    OMP_SCHEDULE_Guided,
-    OMP_SCHEDULE_Auto,
-    OMP_SCHEDULE_Runtime,
-    OMP_SCHEDULE_Default
-  ];
+def OMPC_At : Clause<"at"> {
+  let clangClass = "OMPAtClause";
 }
-
-def OMP_MEMORY_ORDER_SeqCst : ClauseVal<"seq_cst", 1, 1> {}
-def OMP_MEMORY_ORDER_AcqRel : ClauseVal<"acq_rel", 2, 1> {}
-def OMP_MEMORY_ORDER_Acquire : ClauseVal<"acquire", 3, 1> {}
-def OMP_MEMORY_ORDER_Release : ClauseVal<"release", 4, 1> {}
-def OMP_MEMORY_ORDER_Relaxed : ClauseVal<"relaxed", 5, 1> {}
-def OMP_MEMORY_ORDER_Default : ClauseVal<"default", 6, 0> {
-  let isDefault = 1;
+def OMPC_AtomicDefaultMemOrder : Clause<"atomic_default_mem_order"> {
+  let clangClass = "OMPAtomicDefaultMemOrderClause";
+  let flangClass = "OmpAtomicDefaultMemOrderClause";
 }
-def OMPC_MemoryOrder : Clause<"memory_order"> {
-  let enumClauseValue = "MemoryOrderKind";
-  let allowedClauseValues = [
-    OMP_MEMORY_ORDER_SeqCst,
-    OMP_MEMORY_ORDER_AcqRel,
-    OMP_MEMORY_ORDER_Acquire,
-    OMP_MEMORY_ORDER_Release,
-    OMP_MEMORY_ORDER_Relaxed,
-    OMP_MEMORY_ORDER_Default
-  ];
+def OMPC_Bind : Clause<"bind"> {
+  let clangClass = "OMPBindClause";
 }
-
 def OMP_CANCELLATION_CONSTRUCT_Parallel : ClauseVal<"parallel", 1, 1> {}
 def OMP_CANCELLATION_CONSTRUCT_Loop : ClauseVal<"loop", 2, 1> {}
 def OMP_CANCELLATION_CONSTRUCT_Sections : ClauseVal<"sections", 3, 1> {}
@@ -180,7 +77,6 @@ def OMP_CANCELLATION_CONSTRUCT_Taskgroup : ClauseVal<"taskgroup", 4, 1> {}
 def OMP_CANCELLATION_CONSTRUCT_None : ClauseVal<"none", 5, 0> {
   let isDefault = 1;
 }
-
 def OMPC_CancellationConstructType : Clause<"cancellation_construct_type"> {
   let enumClauseValue = "CancellationConstructType";
   let allowedClauseValues = [
@@ -191,35 +87,46 @@ def OMPC_CancellationConstructType : Clause<"cancellation_construct_type"> {
     OMP_CANCELLATION_CONSTRUCT_None
   ];
 }
-
-def OMPC_Ordered : Clause<"ordered"> {
-  let clangClass = "OMPOrderedClause";
+def OMPC_Capture : Clause<"capture"> {
+  let clangClass = "OMPCaptureClause";
+}
+def OMPC_Collapse : Clause<"collapse"> {
+  let clangClass = "OMPCollapseClause";
   let flangClass = "ScalarIntConstantExpr";
-  let isValueOptional = true;
 }
-def OMPC_NoWait : Clause<"nowait"> {
-  let clangClass = "OMPNowaitClause";
+def OMPC_Compare : Clause<"compare"> {
+  let clangClass = "OMPCompareClause";
 }
-def OMPC_Untied : Clause<"untied"> { let clangClass = "OMPUntiedClause"; }
-def OMPC_Mergeable : Clause<"mergeable"> {
-  let clangClass = "OMPMergeableClause";
+def OMPC_Copyin : Clause<"copyin"> {
+  let clangClass = "OMPCopyinClause";
+  let flangClass = "OmpObjectList";
+}
+def OMPC_CopyPrivate : Clause<"copyprivate"> {
+  let clangClass = "OMPCopyprivateClause";
+  let flangClass = "OmpObjectList";
+}
+def OMPC_Default : Clause<"default"> {
+  let clangClass = "OMPDefaultClause";
+  let flangClass = "OmpDefaultClause";
+}
+def OMPC_DefaultMap : Clause<"defaultmap"> {
+  let clangClass = "OMPDefaultmapClause";
+  let flangClass = "OmpDefaultmapClause";
 }
-def OMPC_Read : Clause<"read"> { let clangClass = "OMPReadClause"; }
-def OMPC_Write : Clause<"write"> { let clangClass = "OMPWriteClause"; }
-def OMPC_Update : Clause<"update"> { let clangClass = "OMPUpdateClause"; }
-def OMPC_Capture : Clause<"capture"> { let clangClass = "OMPCaptureClause"; }
-def OMPC_Compare : Clause<"compare"> { let clangClass = "OMPCompareClause"; }
-def OMPC_Fail : Clause<"fail"> { let clangClass = "OMPFailClause"; }
-def OMPC_SeqCst : Clause<"seq_cst"> { let clangClass = "OMPSeqCstClause"; }
-def OMPC_AcqRel : Clause<"acq_rel"> { let clangClass = "OMPAcqRelClause"; }
-def OMPC_Acquire : Clause<"acquire"> { let clangClass = "OMPAcquireClause"; }
-def OMPC_Release : Clause<"release"> { let clangClass = "OMPReleaseClause"; }
-def OMPC_Relaxed : Clause<"relaxed"> { let clangClass = "OMPRelaxedClause"; }
-def OMPC_Weak : Clause<"weak"> { let clangClass = "OMPWeakClause"; }
 def OMPC_Depend : Clause<"depend"> {
   let clangClass = "OMPDependClause";
   let flangClass = "OmpDependClause";
 }
+def OMPC_Depobj : Clause<"depobj"> {
+  let clangClass = "OMPDepobjClause";
+  let isImplicit = true;
+}
+def OMPC_Destroy : Clause<"destroy"> {
+  let clangClass = "OMPDestroyClause";
+}
+def OMPC_Detach : Clause<"detach"> {
+  let clangClass = "OMPDetachClause";
+}
 def OMPC_Device : Clause<"device"> {
   let clangClass = "OMPDeviceClause";
   let flangClass = "OmpDeviceClause";
@@ -227,28 +134,51 @@ def OMPC_Device : Clause<"device"> {
 def OMPC_DeviceType : Clause<"device_type"> {
   let flangClass = "OmpDeviceTypeClause";
 }
-def OMPC_Threads : Clause<"threads"> { let clangClass = "OMPThreadsClause"; }
-def OMPC_Simd : Clause<"simd"> { let clangClass = "OMPSIMDClause"; }
-def OMPC_Map : Clause<"map"> {
-  let clangClass = "OMPMapClause";
-  let flangClass = "OmpMapClause";
-}
-def OMPC_NumTeams : Clause<"num_teams"> {
-  let clangClass = "OMPNumTeamsClause";
+def OMPC_DistSchedule : Clause<"dist_schedule"> {
+  let clangClass = "OMPDistScheduleClause";
   let flangClass = "ScalarIntExpr";
+  let isValueOptional = true;
 }
-def OMPC_ThreadLimit : Clause<"thread_limit"> {
-  let clangClass = "OMPThreadLimitClause";
-  let flangClass = "ScalarIntExpr";
+def OMPC_Doacross : Clause<"doacross"> {
+  let clangClass = "OMPDoacrossClause";
 }
-def OMPC_Priority : Clause<"priority"> {
-  let clangClass = "OMPPriorityClause";
+def OMPC_DynamicAllocators : Clause<"dynamic_allocators"> {
+  let clangClass = "OMPDynamicAllocatorsClause";
+}
+def OMPC_Enter : Clause<"enter"> {
+  let flangClass = "OmpObjectList";
+}
+def OMPC_Exclusive : Clause<"exclusive"> {
+  let clangClass = "OMPExclusiveClause";
+}
+def OMPC_Fail : Clause<"fail"> {
+  let clangClass = "OMPFailClause";
+}
+def OMPC_Filter : Clause<"filter"> {
+  let clangClass = "OMPFilterClause";
   let flangClass = "ScalarIntExpr";
 }
-
+def OMPC_Final : Clause<"final"> {
+  let clangClass = "OMPFinalClause";
+  let flangClass = "ScalarLogicalExpr";
+}
+def OMPC_FirstPrivate : Clause<"firstprivate"> {
+  let clangClass = "OMPFirstprivateClause";
+  let flangClass = "OmpObjectList";
+}
+def OMPC_Flush : Clause<"flush"> {
+  let clangClass = "OMPFlushClause";
+  let isImplicit = true;
+}
+def OMPC_From : Clause<"from"> {
+  let clangClass = "OMPFromClause";
+  let flangClass = "OmpObjectList";
+}
+def OMPC_Full: Clause<"full"> {
+  let clangClass = "OMPFullClause";
+}
 def OMP_GRAINSIZE_Strict : ClauseVal<"strict", 1, 1> {}
 def OMP_GRAINSIZE_Unknown : ClauseVal<"unkonwn", 2, 0> { let isDefault = 1; }
-
 def OMPC_GrainSize : Clause<"grainsize"> {
   let clangClass = "OMPGrainsizeClause";
   let flangClass = "ScalarIntExpr";
@@ -258,101 +188,128 @@ def OMPC_GrainSize : Clause<"grainsize"> {
     OMP_GRAINSIZE_Unknown
   ];
 }
-def OMPC_NoGroup : Clause<"nogroup"> {
-  let clangClass = "OMPNogroupClause";
-}
-
-def OMP_NUMTASKS_Strict : ClauseVal<"strict", 1, 1> {}
-def OMP_NUMTASKS_Unknown : ClauseVal<"unkonwn", 2, 0> { let isDefault = 1; }
-
-def OMPC_NumTasks : Clause<"num_tasks"> {
-  let clangClass = "OMPNumTasksClause";
-  let flangClass = "ScalarIntExpr";
-  let enumClauseValue = "NumTasksType";
-  let allowedClauseValues = [
-    OMP_NUMTASKS_Strict,
-    OMP_NUMTASKS_Unknown
-  ];
+def OMPC_HasDeviceAddr : Clause<"has_device_addr"> {
+  let clangClass = "OMPHasDeviceAddrClause";
+  let flangClass = "OmpObjectList";
 }
 def OMPC_Hint : Clause<"hint"> {
   let clangClass = "OMPHintClause";
   let flangClass = "ConstantExpr";
 }
-def OMPC_DistSchedule : Clause<"dist_schedule"> {
-  let clangClass = "OMPDistScheduleClause";
-  let flangClass = "ScalarIntExpr";
-  let isValueOptional = true;
+def OMPC_If : Clause<"if"> {
+  let clangClass = "OMPIfClause";
+  let flangClass = "OmpIfClause";
 }
-def OMPC_DefaultMap : Clause<"defaultmap"> {
-  let clangClass = "OMPDefaultmapClause";
-  let flangClass = "OmpDefaultmapClause";
+def OMPC_Inbranch : Clause<"inbranch"> {
 }
-def OMPC_To : Clause<"to"> {
-  let clangClass = "OMPToClause";
-  let flangClass = "OmpObjectList";
+def OMPC_Inclusive : Clause<"inclusive"> {
+  let clangClass = "OMPInclusiveClause";
 }
-def OMPC_Enter : Clause<"enter"> {
-  let flangClass = "OmpObjectList";
+def OMPC_Indirect : Clause<"indirect"> {
 }
-def OMPC_From : Clause<"from"> {
-  let clangClass = "OMPFromClause";
-  let flangClass = "OmpObjectList";
+def OMPC_Init : Clause<"init"> {
+  let clangClass = "OMPInitClause";
 }
-def OMPC_UseDevicePtr : Clause<"use_device_ptr"> {
-  let clangClass = "OMPUseDevicePtrClause";
-  let flangClass = "OmpObjectList";
+def OMPC_InReduction : Clause<"in_reduction"> {
+  let clangClass = "OMPInReductionClause";
+  let flangClass = "OmpInReductionClause";
 }
 def OMPC_IsDevicePtr : Clause<"is_device_ptr"> {
   let clangClass = "OMPIsDevicePtrClause";
   let flangClass = "OmpObjectList";
 }
-def OMPC_HasDeviceAddr : Clause<"has_device_addr"> {
-  let clangClass = "OMPHasDeviceAddrClause";
+def OMPC_LastPrivate : Clause<"lastprivate"> {
+  let clangClass = "OMPLastprivateClause";
   let flangClass = "OmpObjectList";
 }
-def OMPC_TaskReduction : Clause<"task_reduction"> {
-  let clangClass = "OMPTaskReductionClause";
-  let flangClass = "OmpReductionClause";
-}
-def OMPC_InReduction : Clause<"in_reduction"> {
-  let clangClass = "OMPInReductionClause";
-  let flangClass = "OmpInReductionClause";
-}
-def OMPC_UnifiedAddress : Clause<"unified_address"> {
-  let clangClass = "OMPUnifiedAddressClause";
+def OMPC_Linear : Clause<"linear"> {
+  let clangClass = "OMPLinearClause";
+  let flangClass = "OmpLinearClause";
 }
-def OMPC_UnifiedSharedMemory : Clause<"unified_shared_memory"> {
-  let clangClass = "OMPUnifiedSharedMemoryClause";
+def OMPC_Link : Clause<"link"> {
+  let flangClass = "OmpObjectList";
 }
-def OMPC_ReverseOffload : Clause<"reverse_offload"> {
-  let clangClass = "OMPReverseOffloadClause";
+def OMPC_Map : Clause<"map"> {
+  let clangClass = "OMPMapClause";
+  let flangClass = "OmpMapClause";
 }
-def OMPC_DynamicAllocators : Clause<"dynamic_allocators"> {
-  let clangClass = "OMPDynamicAllocatorsClause";
+def OMPC_Match : Clause<"match"> {
 }
-def OMPC_AtomicDefaultMemOrder : Clause<"atomic_default_mem_order"> {
-  let clangClass = "OMPAtomicDefaultMemOrderClause";
-  let flangClass = "OmpAtomicDefaultMemOrderClause";
+def OMP_MEMORY_ORDER_SeqCst : ClauseVal<"seq_cst", 1, 1> {}
+def OMP_MEMORY_ORDER_AcqRel : ClauseVal<"acq_rel", 2, 1> {}
+def OMP_MEMORY_ORDER_Acquire : ClauseVal<"acquire", 3, 1> {}
+def OMP_MEMORY_ORDER_Release : ClauseVal<"release", 4, 1> {}
+def OMP_MEMORY_ORDER_Relaxed : ClauseVal<"relaxed", 5, 1> {}
+def OMP_MEMORY_ORDER_Default : ClauseVal<"default", 6, 0> {
+  let isDefault = 1;
 }
-def OMPC_At : Clause<"at"> {
-  let clangClass = "OMPAtClause";
+def OMPC_MemoryOrder : Clause<"memory_order"> {
+  let enumClauseValue = "MemoryOrderKind";
+  let allowedClauseValues = [
+    OMP_MEMORY_ORDER_SeqCst,
+    OMP_MEMORY_ORDER_AcqRel,
+    OMP_MEMORY_ORDER_Acquire,
+    OMP_MEMORY_ORDER_Release,
+    OMP_MEMORY_ORDER_Relaxed,
+    OMP_MEMORY_ORDER_Default
+  ];
 }
-def OMPC_Severity : Clause<"severity"> {
-  let clangClass = "OMPSeverityClause";
+def OMPC_Mergeable : Clause<"mergeable"> {
+  let clangClass = "OMPMergeableClause";
 }
 def OMPC_Message : Clause<"message"> {
   let clangClass = "OMPMessageClause";
 }
-def OMPC_Allocate : Clause<"allocate"> {
-  let clangClass = "OMPAllocateClause";
-  let flangClass = "OmpAllocateClause";
+def OMPC_Nocontext : Clause<"nocontext"> {
+  let clangClass = "OMPNocontextClause";
+  let flangClass = "ScalarLogicalExpr";
+}
+def OMPC_NoGroup : Clause<"nogroup"> {
+  let clangClass = "OMPNogroupClause";
 }
 def OMPC_NonTemporal : Clause<"nontemporal"> {
   let clangClass = "OMPNontemporalClause";
   let flangClass = "Name";
   let isValueList = true;
 }
-
+def OMPC_Notinbranch : Clause<"notinbranch"> {
+}
+def OMPC_Novariants : Clause<"novariants"> {
+  let clangClass = "OMPNovariantsClause";
+  let flangClass = "ScalarLogicalExpr";
+}
+def OMPC_NoWait : Clause<"nowait"> {
+  let clangClass = "OMPNowaitClause";
+}
+def OMP_NUMTASKS_Strict : ClauseVal<"strict", 1, 1> {}
+def OMP_NUMTASKS_Unknown : ClauseVal<"unkonwn", 2, 0> { let isDefault = 1; }
+def OMPC_NumTasks : Clause<"num_tasks"> {
+  let clangClass = "OMPNumTasksClause";
+  let flangClass = "ScalarIntExpr";
+  let enumClauseValue = "NumTasksType";
+  let allowedClauseValues = [
+    OMP_NUMTASKS_Strict,
+    OMP_NUMTASKS_Unknown
+  ];
+}
+def OMPC_NumTeams : Clause<"num_teams"> {
+  let clangClass = "OMPNumTeamsClause";
+  let flangClass = "ScalarIntExpr";
+}
+def OMPC_NumThreads : Clause<"num_threads"> {
+  let clangClass = "OMPNumThreadsClause";
+  let flangClass = "ScalarIntExpr";
+}
+def OMPC_OMPX_Attribute : Clause<"ompx_attribute"> {
+  let clangClass = "OMPXAttributeClause";
+}
+def OMPC_OMX_Bare : Clause<"ompx_bare"> {
+  let clangClass = "OMPXBareClause";
+}
+def OMPC_OMPX_DynCGroupMem : Clause<"ompx_dyn_cgroup_mem"> {
+  let clangClass = "OMPXDynCGroupMemClause";
+  let flangClass = "ScalarIntExpr";
+}
 def OMP_ORDER_concurrent : ClauseVal<"concurrent",1,1> {}
 def OMP_ORDER_unknown : ClauseVal<"unknown",2,0> { let isDefault = 1; }
 def OMPC_Order : Clause<"order"> {
@@ -364,362 +321,467 @@ def OMPC_Order : Clause<"order"> {
     OMP_ORDER_concurrent
   ];
 }
-def OMPC_Init : Clause<"init"> {
-  let clangClass = "OMPInitClause";
+def OMPC_Ordered : Clause<"ordered"> {
+  let clangClass = "OMPOrderedClause";
+  let flangClass = "ScalarIntConstantExpr";
+  let isValueOptional = true;
 }
-def OMPC_Use : Clause<"use"> {
-  let clangClass = "OMPUseClause";
+def OMPC_Partial: Clause<"partial"> {
+  let clangClass = "OMPPartialClause";
+  let flangClass = "ScalarIntConstantExpr";
+  let isValueOptional = true;
 }
-def OMPC_Destroy : Clause<"destroy"> {
-  let clangClass = "OMPDestroyClause";
+def OMPC_Priority : Clause<"priority"> {
+  let clangClass = "OMPPriorityClause";
+  let flangClass = "ScalarIntExpr";
 }
-def OMPC_Novariants : Clause<"novariants"> {
-  let clangClass = "OMPNovariantsClause";
-  let flangClass = "ScalarLogicalExpr";
+def OMPC_Private : Clause<"private"> {
+  let clangClass = "OMPPrivateClause";
+  let flangClass = "OmpObjectList";
 }
-def OMPC_Nocontext : Clause<"nocontext"> {
-  let clangClass = "OMPNocontextClause";
-  let flangClass = "ScalarLogicalExpr";
+def OMP_PROC_BIND_master : ClauseVal<"master",2,1> {}
+def OMP_PROC_BIND_close : ClauseVal<"close",3,1> {}
+def OMP_PROC_BIND_spread : ClauseVal<"spread",4,1> {}
+def OMP_PROC_BIND_primary : ClauseVal<"primary",5,1> {}
+def OMP_PROC_BIND_default : ClauseVal<"default",6,0> {}
+def OMP_PROC_BIND_unknown : ClauseVal<"unknown",7,0> { let isDefault = true; }
+def OMPC_ProcBind : Clause<"proc_bind"> {
+  let clangClass = "OMPProcBindClause";
+  let flangClass = "OmpProcBindClause";
+  let enumClauseValue = "ProcBindKind";
+  let allowedClauseValues = [
+    OMP_PROC_BIND_primary,
+    OMP_PROC_BIND_master,
+    OMP_PROC_BIND_close,
+    OMP_PROC_BIND_spread,
+    OMP_PROC_BIND_default,
+    OMP_PROC_BIND_unknown
+  ];
 }
-def OMPC_Detach : Clause<"detach"> {
-  let clangClass = "OMPDetachClause";
+def OMPC_Read : Clause<"read"> {
+  let clangClass = "OMPReadClause";
 }
-def OMPC_Inclusive : Clause<"inclusive"> {
-  let clangClass = "OMPInclusiveClause";
+def OMPC_Reduction : Clause<"reduction"> {
+  let clangClass = "OMPReductionClause";
+  let flangClass = "OmpReductionClause";
...
[truncated]

``````````

</details>


https://github.com/llvm/llvm-project/pull/94653


More information about the llvm-commits mailing list