Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/OpenMPIR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1348,11 +1348,15 @@ OpenMPClause *OpenMPDirective::addOpenMPClause(int k, ...) {
case OMPC_no_openmp_constructs:
case OMPC_no_openmp_routines:
case OMPC_no_parallelism:
case OMPC_graph_id:
case OMPC_graph_reset:
case OMPC_replayable:
case OMPC_indirect:
case OMPC_transparent:
case OMPC_threadset:
case OMPC_safesync:
case OMPC_device_safesync:
case OMPC_memscope:
case OMPC_local:
case OMPC_init:
case OMPC_init_complete:
Expand Down Expand Up @@ -3014,7 +3018,12 @@ std::string OpenMPGraphIdClause::toString() {
return "graph_id(" + expressionToString() + ") ";
}

std::string OpenMPGraphResetClause::toString() { return "graph_reset "; }
std::string OpenMPGraphResetClause::toString() {
std::string str = expressionToString();
if (str.empty())
return "graph_reset ";
return "graph_reset(" + str + ") ";
}

std::string OpenMPTransparentClause::toString() {
std::string str = expressionToString();
Expand Down
9 changes: 8 additions & 1 deletion src/ompparser.yy
Original file line number Diff line number Diff line change
Expand Up @@ -1659,8 +1659,13 @@ otherwise_clause : OTHERWISE {
// OpenMP 6.0 clause implementations
graph_id_clause : GRAPH_ID { current_clause = addClauseAt(current_directive, @1.first_line, @1.first_column, OMPC_graph_id); } '(' expression ')'
;
graph_reset_clause : GRAPH_RESET { current_clause = addClauseAt(current_directive, @1.first_line, @1.first_column, OMPC_graph_reset); }
graph_reset_clause : GRAPH_RESET {
current_clause = addClauseAt(current_directive, @1.first_line, @1.first_column, OMPC_graph_reset);
} opt_graph_reset_parens
;
opt_graph_reset_parens : /* empty */
| '(' expression ')'
;
transparent_clause : TRANSPARENT { current_clause = addClauseAt(current_directive, @1.first_line, @1.first_column, OMPC_transparent); } opt_transparent_parens
;

Expand Down Expand Up @@ -2391,6 +2396,7 @@ taskgraph_clause : graph_id_clause
| replayable_clause
| threadset_clause
| if_taskgraph_clause
| nogroup_clause
;
task_iteration_clause_seq : task_iteration_clause
| task_iteration_clause_seq task_iteration_clause
Expand Down Expand Up @@ -2590,6 +2596,7 @@ target_clause: if_target_clause
| thread_limit_clause
| private_clause
| firstprivate_clause
| shared_clause
| in_reduction_clause
| map_clause
| is_device_ptr_clause
Expand Down