]> git.ipfire.org Git - thirdparty/gcc.git/commit
OpenMP: Add 'interop' clause to 'dispatch' for C/C++
authorTobias Burnus <tburnus@baylibre.com>
Fri, 22 Nov 2024 15:15:17 +0000 (16:15 +0100)
committerTobias Burnus <tburnus@baylibre.com>
Fri, 22 Nov 2024 15:15:17 +0000 (16:15 +0100)
commitf34422e06c38eb1f69c301ad5d8e2114c46a2796
treedb9f0f76a6ee9779d3f0456b9cae6bbf36819331
parent8f0c8e577a56891fa104c818834ddafe268722bb
OpenMP: Add 'interop' clause to 'dispatch' for C/C++

Will fail with an error if/as no suitable 'append_args' has been specified,
given that 'append_args' is not yet implemented.

gcc/c-family/ChangeLog:

* c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_INTEROP.

gcc/c/ChangeLog:

* c-parser.cc (c_parser_omp_clause_interop): New.
(c_parser_omp_clause_name, c_parser_omp_all_clauses,
c_parser_omp_dispatch_body): Handle 'interop' clause.
* c-typeck.cc (c_finish_omp_clauses): Likewise.

gcc/cp/ChangeLog:

* parser.cc (cp_parser_omp_clause_name, cp_parser_omp_all_clauses,
cp_parser_omp_dispatch_body): Handle 'interop' clause.
* pt.cc (tsubst_omp_clauses): Likewise.
* semantics.cc (finish_omp_clauses): Likewise.

gcc/ChangeLog:

* gimplify.cc (gimplify_call_expr): Add initial support for
dispatch's 'interop' clause.
(gimplify_scan_omp_clauses): Handle interop clause.
* tree-pretty-print.cc (dump_omp_clause): Likewise.
* tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_INTEROP.
* tree.cc (omp_clause_num_ops, omp_clause_code_name): Add interop.

gcc/testsuite/ChangeLog:

* c-c++-common/gomp/dispatch-11.c: New test.
* c-c++-common/gomp/dispatch-12.c: New test.
12 files changed:
gcc/c-family/c-pragma.h
gcc/c/c-parser.cc
gcc/c/c-typeck.cc
gcc/cp/parser.cc
gcc/cp/pt.cc
gcc/cp/semantics.cc
gcc/gimplify.cc
gcc/testsuite/c-c++-common/gomp/dispatch-11.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/gomp/dispatch-12.c [new file with mode: 0644]
gcc/tree-core.h
gcc/tree-pretty-print.cc
gcc/tree.cc