Skip to content

Commit 8b1b36f

Browse files
committed
[OpenMP] Fix Coexecute definitions
1 parent e0dff6a commit 8b1b36f

File tree

1 file changed

+14
-3
lines changed
  • llvm/include/llvm/Frontend/OpenMP

1 file changed

+14
-3
lines changed

llvm/include/llvm/Frontend/OpenMP/OMP.td

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -682,8 +682,15 @@ def OMP_CancellationPoint : Directive<"cancellation point"> {
682682
let association = AS_None;
683683
let category = CA_Executable;
684684
}
685-
def OMP_Coexecute : Directive<"coexecute"> {}
686-
def OMP_EndCoexecute : Directive<"end coexecute"> {}
685+
def OMP_Coexecute : Directive<"coexecute"> {
686+
let association = AS_Block;
687+
let category = CA_Executable;
688+
}
689+
def OMP_EndCoexecute : Directive<"end coexecute"> {
690+
let leafConstructs = OMP_Coexecute.leafConstructs;
691+
let association = OMP_Coexecute.association;
692+
let category = OMP_Coexecute.category;
693+
}
687694
def OMP_Critical : Directive<"critical"> {
688695
let allowedOnceClauses = [
689696
VersionedClause<OMPC_Hint>,
@@ -2224,8 +2231,10 @@ def OMP_TargetTeamsCoexecute : Directive<"target teams coexecute"> {
22242231
VersionedClause<OMPC_NumTeams>,
22252232
VersionedClause<OMPC_ThreadLimit>,
22262233
VersionedClause<OMPC_OMPX_DynCGroupMem>,
2227-
VersionedClause<OMPC_OMX_Bare>,
2234+
VersionedClause<OMPC_OMPX_Bare>,
22282235
];
2236+
let leafConstructs = [OMP_Target, OMP_Teams, OMP_Coexecute];
2237+
let category = CA_Executable;
22292238
}
22302239
def OMP_TargetTeamsDistribute : Directive<"target teams distribute"> {
22312240
let allowedClauses = [
@@ -2528,6 +2537,8 @@ def OMP_TeamsCoexecute : Directive<"teams coexecute"> {
25282537
VersionedClause<OMPC_NumTeams>,
25292538
VersionedClause<OMPC_ThreadLimit>
25302539
];
2540+
let leafConstructs = [OMP_Target, OMP_Teams];
2541+
let category = CA_Executable;
25312542
}
25322543
def OMP_TeamsDistribute : Directive<"teams distribute"> {
25332544
let allowedClauses = [

0 commit comments

Comments
 (0)