From: Julian Brown <julian@codesourcery.com>
To: <gcc-patches@gcc.gnu.org>
Cc: <fortran@gcc.gnu.org>, <jakub@redhat.com>, <tobias@codesourcery.com>
Subject: [PATCH 0/8] OpenMP: lvalue parsing and "declare mapper" support
Date: Tue, 5 Sep 2023 12:28:20 -0700 [thread overview]
Message-ID: <cover.1693941292.git.julian@codesourcery.com> (raw)
This series implements "lvalue" parsing for C and C++ map/to/from clauses,
and "declare mapper" support for C, C++ and Fortran. This is the latter
part of the series that was previously posted for mainline here:
https://gcc.gnu.org/pipermail/gcc-patches/2022-December/609031.html
and is approximately equivalent to the series posted for the og13
branch here:
https://gcc.gnu.org/pipermail/gcc-patches/2023-June/623352.html
though with several follow-up patches rolled in (as mentioned on the
following patch-specific emails).
This series applies on top of the infrastructural support series posted
here:
https://gcc.gnu.org/pipermail/gcc-patches/2023-August/627895.html
Tested with offloading to NVPTX and bootstrapped. OK?
Julian Brown (8):
OpenMP: lvalue parsing for map/to/from clauses (C++)
OpenMP: lvalue parsing for map/to/from clauses (C)
OpenMP: C++ "declare mapper" support
OpenMP: Support OpenMP 5.0 "declare mapper" directives for C
OpenMP, Fortran: Pass list number to gfc_free_omp_namelist
OpenMP, Fortran: Per-directive control for gfc_trans_omp_clauses
OpenMP, Fortran: Split out OMP clause checking
OpenMP: Fortran "!$omp declare mapper" support
gcc/c-family/c-common.h | 11 +-
gcc/c-family/c-omp.cc | 500 ++-
gcc/c-family/c-pretty-print.cc | 12 +
gcc/c/c-decl.cc | 169 +
gcc/c/c-objc-common.h | 12 +
gcc/c/c-parser.cc | 472 ++-
gcc/c/c-tree.h | 9 +
gcc/c/c-typeck.cc | 124 +-
gcc/cp/constexpr.cc | 10 +
gcc/cp/cp-gimplify.cc | 6 +
gcc/cp/cp-objcp-common.h | 9 +
gcc/cp/cp-tree.h | 19 +-
gcc/cp/decl.cc | 27 +-
gcc/cp/decl2.cc | 54 +-
gcc/cp/error.cc | 34 +
gcc/cp/parser.cc | 514 ++-
gcc/cp/parser.h | 3 +
gcc/cp/pt.cc | 84 +-
gcc/cp/semantics.cc | 260 +-
gcc/cp/typeck.cc | 50 +
gcc/fortran/dump-parse-tree.cc | 4 +
gcc/fortran/f95-lang.cc | 7 +
gcc/fortran/gfortran.h | 76 +-
gcc/fortran/match.cc | 14 +-
gcc/fortran/match.h | 1 +
gcc/fortran/module.cc | 257 +-
gcc/fortran/openmp.cc | 2026 +++++++----
gcc/fortran/parse.cc | 13 +-
gcc/fortran/resolve.cc | 2 +
gcc/fortran/st.cc | 2 +-
gcc/fortran/symbol.cc | 16 +
gcc/fortran/trans-decl.cc | 33 +-
gcc/fortran/trans-openmp.cc | 592 ++-
gcc/fortran/trans-stmt.h | 1 +
gcc/fortran/trans.h | 3 +
gcc/gimplify.cc | 560 ++-
gcc/langhooks-def.h | 13 +
gcc/langhooks.cc | 35 +
gcc/langhooks.h | 16 +
gcc/omp-general.h | 86 +
.../c-c++-common/gomp/declare-mapper-12.c | 22 +
.../c-c++-common/gomp/declare-mapper-15.c | 59 +
.../c-c++-common/gomp/declare-mapper-16.c | 39 +
.../c-c++-common/gomp/declare-mapper-3.c | 30 +
.../c-c++-common/gomp/declare-mapper-4.c | 78 +
.../c-c++-common/gomp/declare-mapper-5.c | 26 +
.../c-c++-common/gomp/declare-mapper-6.c | 23 +
.../c-c++-common/gomp/declare-mapper-7.c | 29 +
.../c-c++-common/gomp/declare-mapper-8.c | 43 +
.../c-c++-common/gomp/declare-mapper-9.c | 34 +
gcc/testsuite/c-c++-common/gomp/map-6.c | 14 +-
gcc/testsuite/g++.dg/gomp/array-section-1.C | 38 +
gcc/testsuite/g++.dg/gomp/array-section-2.C | 63 +
.../g++.dg/gomp/bad-array-section-1.C | 35 +
.../g++.dg/gomp/bad-array-section-10.C | 35 +
.../g++.dg/gomp/bad-array-section-11.C | 36 +
.../g++.dg/gomp/bad-array-section-2.C | 33 +
.../g++.dg/gomp/bad-array-section-3.C | 28 +
.../g++.dg/gomp/bad-array-section-4.C | 50 +
.../g++.dg/gomp/bad-array-section-5.C | 50 +
.../g++.dg/gomp/bad-array-section-6.C | 24 +
.../g++.dg/gomp/bad-array-section-7.C | 36 +
.../g++.dg/gomp/bad-array-section-8.C | 53 +
.../g++.dg/gomp/bad-array-section-9.C | 39 +
gcc/testsuite/g++.dg/gomp/declare-mapper-1.C | 58 +
gcc/testsuite/g++.dg/gomp/declare-mapper-2.C | 30 +
.../gomp/has_device_addr-non-lvalue-1.C | 36 +
gcc/testsuite/g++.dg/gomp/ind-base-3.C | 37 +
gcc/testsuite/g++.dg/gomp/map-assignment-1.C | 12 +
gcc/testsuite/g++.dg/gomp/map-inc-1.C | 10 +
gcc/testsuite/g++.dg/gomp/map-lvalue-ref-1.C | 19 +
gcc/testsuite/g++.dg/gomp/map-ptrmem-1.C | 37 +
gcc/testsuite/g++.dg/gomp/map-ptrmem-2.C | 40 +
.../g++.dg/gomp/map-static-cast-lvalue-1.C | 17 +
gcc/testsuite/g++.dg/gomp/map-ternary-1.C | 20 +
gcc/testsuite/g++.dg/gomp/member-array-2.C | 91 +
gcc/testsuite/g++.dg/gomp/pr67522.C | 2 +-
.../gcc.dg/gomp/bad-array-section-c-1.c | 16 +
.../gcc.dg/gomp/bad-array-section-c-2.c | 13 +
.../gcc.dg/gomp/bad-array-section-c-3.c | 24 +
.../gcc.dg/gomp/bad-array-section-c-4.c | 26 +
.../gcc.dg/gomp/bad-array-section-c-5.c | 15 +
.../gcc.dg/gomp/bad-array-section-c-6.c | 16 +
.../gcc.dg/gomp/bad-array-section-c-7.c | 26 +
.../gcc.dg/gomp/bad-array-section-c-8.c | 21 +
gcc/testsuite/gcc.dg/gomp/declare-mapper-10.c | 61 +
gcc/testsuite/gcc.dg/gomp/declare-mapper-11.c | 33 +
.../gfortran.dg/gomp/declare-mapper-1.f90 | 71 +
.../gfortran.dg/gomp/declare-mapper-14.f90 | 26 +
.../gfortran.dg/gomp/declare-mapper-22-p.f90 | 61 +
.../gfortran.dg/gomp/declare-mapper-22.f90 | 63 +
.../gfortran.dg/gomp/declare-mapper-23.f90 | 25 +
.../gfortran.dg/gomp/declare-mapper-26-p.f90 | 29 +
.../gfortran.dg/gomp/declare-mapper-26.f90 | 34 +
.../gfortran.dg/gomp/declare-mapper-29.f90 | 22 +
.../gfortran.dg/gomp/declare-mapper-31-p.f90 | 35 +
.../gfortran.dg/gomp/declare-mapper-31.f90 | 36 +
.../gfortran.dg/gomp/declare-mapper-5.f90 | 45 +
gcc/tree-core.h | 4 +
gcc/tree-pretty-print.cc | 58 +
gcc/tree.cc | 2 +
gcc/tree.def | 10 +
gcc/tree.h | 19 +
include/gomp-constants.h | 11 +-
libgomp/testsuite/libgomp.c++/baseptrs-4.C | 26 +-
libgomp/testsuite/libgomp.c++/baseptrs-6.C | 3199 +++++++++++++++++
.../testsuite/libgomp.c++/declare-mapper-1.C | 87 +
.../testsuite/libgomp.c++/declare-mapper-2.C | 55 +
.../testsuite/libgomp.c++/declare-mapper-3.C | 63 +
.../testsuite/libgomp.c++/declare-mapper-4.C | 63 +
.../testsuite/libgomp.c++/declare-mapper-5.C | 52 +
.../testsuite/libgomp.c++/declare-mapper-6.C | 37 +
.../testsuite/libgomp.c++/declare-mapper-7.C | 48 +
.../testsuite/libgomp.c++/declare-mapper-8.C | 61 +
libgomp/testsuite/libgomp.c++/ind-base-1.C | 162 +
libgomp/testsuite/libgomp.c++/ind-base-2.C | 93 +
.../testsuite/libgomp.c++/lvalue-tofrom-1.C | 75 +
.../testsuite/libgomp.c++/lvalue-tofrom-2.C | 71 +
libgomp/testsuite/libgomp.c++/map-comma-1.C | 15 +
.../testsuite/libgomp.c++/map-rvalue-ref-1.C | 22 +
libgomp/testsuite/libgomp.c++/struct-ref-1.C | 97 +
.../libgomp.c-c++-common/array-field-1.c | 35 +
.../libgomp.c-c++-common/array-of-struct-1.c | 65 +
.../libgomp.c-c++-common/array-of-struct-2.c | 65 +
.../libgomp.c-c++-common/declare-mapper-10.c | 60 +
.../libgomp.c-c++-common/declare-mapper-11.c | 59 +
.../libgomp.c-c++-common/declare-mapper-12.c | 87 +
.../libgomp.c-c++-common/declare-mapper-13.c | 55 +
.../libgomp.c-c++-common/declare-mapper-14.c | 57 +
.../libgomp.c-c++-common/declare-mapper-9.c | 62 +
.../libgomp.c-c++-common/ind-base-4.c | 50 +
.../libgomp.c-c++-common/unary-ptr-1.c | 16 +
.../libgomp.fortran/declare-mapper-10.f90 | 40 +
.../libgomp.fortran/declare-mapper-11.f90 | 38 +
.../libgomp.fortran/declare-mapper-12.f90 | 33 +
.../libgomp.fortran/declare-mapper-13.f90 | 49 +
.../libgomp.fortran/declare-mapper-15.f90 | 24 +
.../libgomp.fortran/declare-mapper-17.f90 | 92 +
.../libgomp.fortran/declare-mapper-18.f90 | 46 +
.../libgomp.fortran/declare-mapper-19.f90 | 29 +
.../libgomp.fortran/declare-mapper-2.f90 | 32 +
.../libgomp.fortran/declare-mapper-20.f90 | 29 +
.../libgomp.fortran/declare-mapper-21-p.f90 | 25 +
.../libgomp.fortran/declare-mapper-21.f90 | 26 +
.../libgomp.fortran/declare-mapper-3.f90 | 33 +
.../libgomp.fortran/declare-mapper-30-p.f90 | 25 +
.../libgomp.fortran/declare-mapper-30.f90 | 27 +
.../libgomp.fortran/declare-mapper-4-p.f90 | 41 +
.../libgomp.fortran/declare-mapper-4.f90 | 45 +
.../libgomp.fortran/declare-mapper-6.f90 | 28 +
.../libgomp.fortran/declare-mapper-7.f90 | 29 +
.../libgomp.fortran/declare-mapper-8.f90 | 115 +
.../libgomp.fortran/declare-mapper-9.f90 | 27 +
153 files changed, 13081 insertions(+), 853 deletions(-)
create mode 100644 gcc/testsuite/c-c++-common/gomp/declare-mapper-12.c
create mode 100644 gcc/testsuite/c-c++-common/gomp/declare-mapper-15.c
create mode 100644 gcc/testsuite/c-c++-common/gomp/declare-mapper-16.c
create mode 100644 gcc/testsuite/c-c++-common/gomp/declare-mapper-3.c
create mode 100644 gcc/testsuite/c-c++-common/gomp/declare-mapper-4.c
create mode 100644 gcc/testsuite/c-c++-common/gomp/declare-mapper-5.c
create mode 100644 gcc/testsuite/c-c++-common/gomp/declare-mapper-6.c
create mode 100644 gcc/testsuite/c-c++-common/gomp/declare-mapper-7.c
create mode 100644 gcc/testsuite/c-c++-common/gomp/declare-mapper-8.c
create mode 100644 gcc/testsuite/c-c++-common/gomp/declare-mapper-9.c
create mode 100644 gcc/testsuite/g++.dg/gomp/array-section-1.C
create mode 100644 gcc/testsuite/g++.dg/gomp/array-section-2.C
create mode 100644 gcc/testsuite/g++.dg/gomp/bad-array-section-1.C
create mode 100644 gcc/testsuite/g++.dg/gomp/bad-array-section-10.C
create mode 100644 gcc/testsuite/g++.dg/gomp/bad-array-section-11.C
create mode 100644 gcc/testsuite/g++.dg/gomp/bad-array-section-2.C
create mode 100644 gcc/testsuite/g++.dg/gomp/bad-array-section-3.C
create mode 100644 gcc/testsuite/g++.dg/gomp/bad-array-section-4.C
create mode 100644 gcc/testsuite/g++.dg/gomp/bad-array-section-5.C
create mode 100644 gcc/testsuite/g++.dg/gomp/bad-array-section-6.C
create mode 100644 gcc/testsuite/g++.dg/gomp/bad-array-section-7.C
create mode 100644 gcc/testsuite/g++.dg/gomp/bad-array-section-8.C
create mode 100644 gcc/testsuite/g++.dg/gomp/bad-array-section-9.C
create mode 100644 gcc/testsuite/g++.dg/gomp/declare-mapper-1.C
create mode 100644 gcc/testsuite/g++.dg/gomp/declare-mapper-2.C
create mode 100644 gcc/testsuite/g++.dg/gomp/has_device_addr-non-lvalue-1.C
create mode 100644 gcc/testsuite/g++.dg/gomp/ind-base-3.C
create mode 100644 gcc/testsuite/g++.dg/gomp/map-assignment-1.C
create mode 100644 gcc/testsuite/g++.dg/gomp/map-inc-1.C
create mode 100644 gcc/testsuite/g++.dg/gomp/map-lvalue-ref-1.C
create mode 100644 gcc/testsuite/g++.dg/gomp/map-ptrmem-1.C
create mode 100644 gcc/testsuite/g++.dg/gomp/map-ptrmem-2.C
create mode 100644 gcc/testsuite/g++.dg/gomp/map-static-cast-lvalue-1.C
create mode 100644 gcc/testsuite/g++.dg/gomp/map-ternary-1.C
create mode 100644 gcc/testsuite/g++.dg/gomp/member-array-2.C
create mode 100644 gcc/testsuite/gcc.dg/gomp/bad-array-section-c-1.c
create mode 100644 gcc/testsuite/gcc.dg/gomp/bad-array-section-c-2.c
create mode 100644 gcc/testsuite/gcc.dg/gomp/bad-array-section-c-3.c
create mode 100644 gcc/testsuite/gcc.dg/gomp/bad-array-section-c-4.c
create mode 100644 gcc/testsuite/gcc.dg/gomp/bad-array-section-c-5.c
create mode 100644 gcc/testsuite/gcc.dg/gomp/bad-array-section-c-6.c
create mode 100644 gcc/testsuite/gcc.dg/gomp/bad-array-section-c-7.c
create mode 100644 gcc/testsuite/gcc.dg/gomp/bad-array-section-c-8.c
create mode 100644 gcc/testsuite/gcc.dg/gomp/declare-mapper-10.c
create mode 100644 gcc/testsuite/gcc.dg/gomp/declare-mapper-11.c
create mode 100644 gcc/testsuite/gfortran.dg/gomp/declare-mapper-1.f90
create mode 100644 gcc/testsuite/gfortran.dg/gomp/declare-mapper-14.f90
create mode 100644 gcc/testsuite/gfortran.dg/gomp/declare-mapper-22-p.f90
create mode 100644 gcc/testsuite/gfortran.dg/gomp/declare-mapper-22.f90
create mode 100644 gcc/testsuite/gfortran.dg/gomp/declare-mapper-23.f90
create mode 100644 gcc/testsuite/gfortran.dg/gomp/declare-mapper-26-p.f90
create mode 100644 gcc/testsuite/gfortran.dg/gomp/declare-mapper-26.f90
create mode 100644 gcc/testsuite/gfortran.dg/gomp/declare-mapper-29.f90
create mode 100644 gcc/testsuite/gfortran.dg/gomp/declare-mapper-31-p.f90
create mode 100644 gcc/testsuite/gfortran.dg/gomp/declare-mapper-31.f90
create mode 100644 gcc/testsuite/gfortran.dg/gomp/declare-mapper-5.f90
create mode 100644 libgomp/testsuite/libgomp.c++/baseptrs-6.C
create mode 100644 libgomp/testsuite/libgomp.c++/declare-mapper-1.C
create mode 100644 libgomp/testsuite/libgomp.c++/declare-mapper-2.C
create mode 100644 libgomp/testsuite/libgomp.c++/declare-mapper-3.C
create mode 100644 libgomp/testsuite/libgomp.c++/declare-mapper-4.C
create mode 100644 libgomp/testsuite/libgomp.c++/declare-mapper-5.C
create mode 100644 libgomp/testsuite/libgomp.c++/declare-mapper-6.C
create mode 100644 libgomp/testsuite/libgomp.c++/declare-mapper-7.C
create mode 100644 libgomp/testsuite/libgomp.c++/declare-mapper-8.C
create mode 100644 libgomp/testsuite/libgomp.c++/ind-base-1.C
create mode 100644 libgomp/testsuite/libgomp.c++/ind-base-2.C
create mode 100644 libgomp/testsuite/libgomp.c++/lvalue-tofrom-1.C
create mode 100644 libgomp/testsuite/libgomp.c++/lvalue-tofrom-2.C
create mode 100644 libgomp/testsuite/libgomp.c++/map-comma-1.C
create mode 100644 libgomp/testsuite/libgomp.c++/map-rvalue-ref-1.C
create mode 100644 libgomp/testsuite/libgomp.c++/struct-ref-1.C
create mode 100644 libgomp/testsuite/libgomp.c-c++-common/array-field-1.c
create mode 100644 libgomp/testsuite/libgomp.c-c++-common/array-of-struct-1.c
create mode 100644 libgomp/testsuite/libgomp.c-c++-common/array-of-struct-2.c
create mode 100644 libgomp/testsuite/libgomp.c-c++-common/declare-mapper-10.c
create mode 100644 libgomp/testsuite/libgomp.c-c++-common/declare-mapper-11.c
create mode 100644 libgomp/testsuite/libgomp.c-c++-common/declare-mapper-12.c
create mode 100644 libgomp/testsuite/libgomp.c-c++-common/declare-mapper-13.c
create mode 100644 libgomp/testsuite/libgomp.c-c++-common/declare-mapper-14.c
create mode 100644 libgomp/testsuite/libgomp.c-c++-common/declare-mapper-9.c
create mode 100644 libgomp/testsuite/libgomp.c-c++-common/ind-base-4.c
create mode 100644 libgomp/testsuite/libgomp.c-c++-common/unary-ptr-1.c
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-10.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-11.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-12.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-13.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-15.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-17.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-18.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-19.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-2.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-20.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-21-p.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-21.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-3.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-30-p.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-30.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-4-p.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-4.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-6.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-7.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-8.f90
create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-9.f90
--
2.41.0
next reply other threads:[~2023-09-05 19:28 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-05 19:28 Julian Brown [this message]
2023-09-05 19:28 ` [PATCH 1/8] OpenMP: lvalue parsing for map/to/from clauses (C++) Julian Brown
2023-12-20 14:31 ` Tobias Burnus
2024-01-05 12:23 ` Julian Brown
2024-01-07 15:04 ` Tobias Burnus
2024-01-09 23:02 ` Thomas Schwinge
2024-01-10 9:14 ` Jakub Jelinek
2024-01-10 13:17 ` Julian Brown
2023-09-05 19:28 ` [PATCH 2/8] OpenMP: lvalue parsing for map/to/from clauses (C) Julian Brown
2024-01-10 21:31 ` Tobias Burnus
2023-09-05 19:28 ` [PATCH 3/8] OpenMP: C++ "declare mapper" support Julian Brown
2023-09-05 19:28 ` [PATCH 4/8] OpenMP: Support OpenMP 5.0 "declare mapper" directives for C Julian Brown
2023-09-05 19:28 ` [PATCH 5/8] OpenMP, Fortran: Pass list number to gfc_free_omp_namelist Julian Brown
2023-09-05 19:28 ` [PATCH 6/8] OpenMP, Fortran: Per-directive control for gfc_trans_omp_clauses Julian Brown
2023-09-05 19:28 ` [PATCH 7/8] OpenMP, Fortran: Split out OMP clause checking Julian Brown
2023-09-05 19:28 ` [PATCH 8/8] OpenMP: Fortran "!$omp declare mapper" support Julian Brown
2023-09-14 15:13 ` Bernhard Reutner-Fischer
2023-09-18 10:19 ` Julian Brown
2023-09-21 22:52 ` Bernhard Reutner-Fischer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1693941292.git.julian@codesourcery.com \
--to=julian@codesourcery.com \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=tobias@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).