public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Julian Brown <julian@codesourcery.com>
To: <gcc-patches@gcc.gnu.org>
Cc: <fortran@gcc.gnu.org>, <tobias@codesourcery.com>, <jakub@redhat.com>
Subject: [PATCH 0/5] OpenMP: Array-shaping operator and strided/rectangular 'target update' support
Date: Wed, 6 Sep 2023 02:34:29 -0700	[thread overview]
Message-ID: <cover.1693991758.git.julian@codesourcery.com> (raw)

This patch series provides support for the OpenMP 5.0+ array-shaping
operator and for strided/rectangular updates for 'target update'
directives.  Each of C, C++ and Fortran is supported (using existing
base language syntax for the last).

This series applies on top of the "infrastructure" support series:

  https://gcc.gnu.org/pipermail/gcc-patches/2023-August/627895.html

and the lvalue parsing/declare mapper series:

  https://gcc.gnu.org/pipermail/gcc-patches/2023-September/629363.html

The og13 version of this series was posted here:

  https://gcc.gnu.org/pipermail/gcc-patches/2023-July/623502.html

This version of the series contains several follow-up fixes relative
to the og13 version, and omits some parts that are only present on the
branch for now.  Further comments on individual patches.

Tested with offloading to NVPTX and bootstrapped. OK?

Julian Brown (5):
  OpenMP, NVPTX: memcpy[23]D bias correction
  OpenMP: Allow complete replacement of clause during map/to/from
    expansion
  OpenMP: Support strided and shaped-array updates for C++
  OpenMP: Array shaping operator and strided "target update" for C
  OpenMP: Noncontiguous "target update" for Fortran

 gcc/c-family/c-common.h                       |  12 +-
 gcc/c-family/c-omp.cc                         | 277 ++++++++--
 gcc/c-family/c-pretty-print.cc                |   5 +
 gcc/c/c-parser.cc                             | 330 +++++++++++-
 gcc/c/c-tree.h                                |   6 +-
 gcc/c/c-typeck.cc                             | 281 ++++++++--
 gcc/cp/cp-objcp-common.cc                     |   1 +
 gcc/cp/cp-tree.def                            |   1 +
 gcc/cp/cp-tree.h                              |  13 +-
 gcc/cp/decl.cc                                |  75 +++
 gcc/cp/decl2.cc                               |  19 +-
 gcc/cp/error.cc                               |   5 +
 gcc/cp/mangle.cc                              |   1 +
 gcc/cp/operators.def                          |   1 +
 gcc/cp/parser.cc                              | 303 ++++++++++-
 gcc/cp/parser.h                               |   7 +
 gcc/cp/pt.cc                                  |  39 +-
 gcc/cp/semantics.cc                           | 289 ++++++++--
 gcc/cp/typeck.cc                              |  12 +-
 gcc/fortran/openmp.cc                         |   5 +-
 gcc/fortran/trans-openmp.cc                   | 499 ++++++++++++++++++
 gcc/gimplify.cc                               |  54 +-
 gcc/omp-general.cc                            |  47 ++
 gcc/omp-general.h                             |   4 +-
 gcc/omp-low.cc                                | 476 ++++++++++++++++-
 gcc/testsuite/g++.dg/gomp/array-shaping-1.C   |  22 +
 gcc/testsuite/g++.dg/gomp/array-shaping-2.C   | 134 +++++
 .../g++.dg/gomp/bad-array-shaping-1.C         |  47 ++
 .../g++.dg/gomp/bad-array-shaping-2.C         |  52 ++
 .../g++.dg/gomp/bad-array-shaping-3.C         |  53 ++
 .../g++.dg/gomp/bad-array-shaping-4.C         |  60 +++
 .../g++.dg/gomp/bad-array-shaping-5.C         |  55 ++
 .../g++.dg/gomp/bad-array-shaping-6.C         |  59 +++
 .../g++.dg/gomp/bad-array-shaping-7.C         |  48 ++
 .../g++.dg/gomp/bad-array-shaping-8.C         |  50 ++
 .../gcc.dg/gomp/bad-array-shaping-c-1.c       |  26 +
 .../gcc.dg/gomp/bad-array-shaping-c-2.c       |  24 +
 .../gcc.dg/gomp/bad-array-shaping-c-3.c       |  30 ++
 .../gcc.dg/gomp/bad-array-shaping-c-4.c       |  27 +
 .../gcc.dg/gomp/bad-array-shaping-c-5.c       |  17 +
 .../gcc.dg/gomp/bad-array-shaping-c-6.c       |  26 +
 .../gcc.dg/gomp/bad-array-shaping-c-7.c       |  15 +
 .../gfortran.dg/gomp/noncontig-updates-1.f90  |  19 +
 .../gfortran.dg/gomp/noncontig-updates-2.f90  |  16 +
 .../gfortran.dg/gomp/noncontig-updates-3.f90  |  16 +
 .../gfortran.dg/gomp/noncontig-updates-4.f90  |  15 +
 gcc/tree-pretty-print.cc                      |  17 +
 gcc/tree.def                                  |   2 +-
 include/gomp-constants.h                      |   7 +-
 libgomp/libgomp.h                             |  15 +
 libgomp/plugin/plugin-nvptx.c                 |  67 +++
 libgomp/target.c                              | 271 +++++++---
 .../testsuite/libgomp.c++/array-shaping-1.C   | 469 ++++++++++++++++
 .../testsuite/libgomp.c++/array-shaping-10.C  |  61 +++
 .../testsuite/libgomp.c++/array-shaping-11.C  |  63 +++
 .../testsuite/libgomp.c++/array-shaping-12.C  |  65 +++
 .../testsuite/libgomp.c++/array-shaping-13.C  |  89 ++++
 .../testsuite/libgomp.c++/array-shaping-2.C   |  38 ++
 .../testsuite/libgomp.c++/array-shaping-3.C   |  38 ++
 .../testsuite/libgomp.c++/array-shaping-4.C   |  38 ++
 .../testsuite/libgomp.c++/array-shaping-5.C   |  38 ++
 .../testsuite/libgomp.c++/array-shaping-6.C   |  54 ++
 .../testsuite/libgomp.c++/array-shaping-7.C   |  54 ++
 .../testsuite/libgomp.c++/array-shaping-8.C   |  65 +++
 .../testsuite/libgomp.c++/array-shaping-9.C   |  95 ++++
 .../libgomp.c-c++-common/array-shaping-14.c   |  34 ++
 libgomp/testsuite/libgomp.c/array-shaping-1.c | 236 +++++++++
 libgomp/testsuite/libgomp.c/array-shaping-2.c |  39 ++
 libgomp/testsuite/libgomp.c/array-shaping-3.c |  42 ++
 libgomp/testsuite/libgomp.c/array-shaping-4.c |  36 ++
 libgomp/testsuite/libgomp.c/array-shaping-5.c |  38 ++
 libgomp/testsuite/libgomp.c/array-shaping-6.c |  45 ++
 .../libgomp.fortran/noncontig-updates-1.f90   |  54 ++
 .../libgomp.fortran/noncontig-updates-10.f90  |  29 +
 .../libgomp.fortran/noncontig-updates-11.f90  |  51 ++
 .../libgomp.fortran/noncontig-updates-12.f90  |  59 +++
 .../libgomp.fortran/noncontig-updates-13.f90  |  42 ++
 .../libgomp.fortran/noncontig-updates-2.f90   | 101 ++++
 .../libgomp.fortran/noncontig-updates-3.f90   |  47 ++
 .../libgomp.fortran/noncontig-updates-4.f90   |  78 +++
 .../libgomp.fortran/noncontig-updates-5.f90   |  55 ++
 .../libgomp.fortran/noncontig-updates-6.f90   |  34 ++
 .../libgomp.fortran/noncontig-updates-7.f90   |  36 ++
 .../libgomp.fortran/noncontig-updates-8.f90   |  39 ++
 .../libgomp.fortran/noncontig-updates-9.f90   |  34 ++
 85 files changed, 5933 insertions(+), 315 deletions(-)
 create mode 100644 gcc/testsuite/g++.dg/gomp/array-shaping-1.C
 create mode 100644 gcc/testsuite/g++.dg/gomp/array-shaping-2.C
 create mode 100644 gcc/testsuite/g++.dg/gomp/bad-array-shaping-1.C
 create mode 100644 gcc/testsuite/g++.dg/gomp/bad-array-shaping-2.C
 create mode 100644 gcc/testsuite/g++.dg/gomp/bad-array-shaping-3.C
 create mode 100644 gcc/testsuite/g++.dg/gomp/bad-array-shaping-4.C
 create mode 100644 gcc/testsuite/g++.dg/gomp/bad-array-shaping-5.C
 create mode 100644 gcc/testsuite/g++.dg/gomp/bad-array-shaping-6.C
 create mode 100644 gcc/testsuite/g++.dg/gomp/bad-array-shaping-7.C
 create mode 100644 gcc/testsuite/g++.dg/gomp/bad-array-shaping-8.C
 create mode 100644 gcc/testsuite/gcc.dg/gomp/bad-array-shaping-c-1.c
 create mode 100644 gcc/testsuite/gcc.dg/gomp/bad-array-shaping-c-2.c
 create mode 100644 gcc/testsuite/gcc.dg/gomp/bad-array-shaping-c-3.c
 create mode 100644 gcc/testsuite/gcc.dg/gomp/bad-array-shaping-c-4.c
 create mode 100644 gcc/testsuite/gcc.dg/gomp/bad-array-shaping-c-5.c
 create mode 100644 gcc/testsuite/gcc.dg/gomp/bad-array-shaping-c-6.c
 create mode 100644 gcc/testsuite/gcc.dg/gomp/bad-array-shaping-c-7.c
 create mode 100644 gcc/testsuite/gfortran.dg/gomp/noncontig-updates-1.f90
 create mode 100644 gcc/testsuite/gfortran.dg/gomp/noncontig-updates-2.f90
 create mode 100644 gcc/testsuite/gfortran.dg/gomp/noncontig-updates-3.f90
 create mode 100644 gcc/testsuite/gfortran.dg/gomp/noncontig-updates-4.f90
 create mode 100644 libgomp/testsuite/libgomp.c++/array-shaping-1.C
 create mode 100644 libgomp/testsuite/libgomp.c++/array-shaping-10.C
 create mode 100644 libgomp/testsuite/libgomp.c++/array-shaping-11.C
 create mode 100644 libgomp/testsuite/libgomp.c++/array-shaping-12.C
 create mode 100644 libgomp/testsuite/libgomp.c++/array-shaping-13.C
 create mode 100644 libgomp/testsuite/libgomp.c++/array-shaping-2.C
 create mode 100644 libgomp/testsuite/libgomp.c++/array-shaping-3.C
 create mode 100644 libgomp/testsuite/libgomp.c++/array-shaping-4.C
 create mode 100644 libgomp/testsuite/libgomp.c++/array-shaping-5.C
 create mode 100644 libgomp/testsuite/libgomp.c++/array-shaping-6.C
 create mode 100644 libgomp/testsuite/libgomp.c++/array-shaping-7.C
 create mode 100644 libgomp/testsuite/libgomp.c++/array-shaping-8.C
 create mode 100644 libgomp/testsuite/libgomp.c++/array-shaping-9.C
 create mode 100644 libgomp/testsuite/libgomp.c-c++-common/array-shaping-14.c
 create mode 100644 libgomp/testsuite/libgomp.c/array-shaping-1.c
 create mode 100644 libgomp/testsuite/libgomp.c/array-shaping-2.c
 create mode 100644 libgomp/testsuite/libgomp.c/array-shaping-3.c
 create mode 100644 libgomp/testsuite/libgomp.c/array-shaping-4.c
 create mode 100644 libgomp/testsuite/libgomp.c/array-shaping-5.c
 create mode 100644 libgomp/testsuite/libgomp.c/array-shaping-6.c
 create mode 100644 libgomp/testsuite/libgomp.fortran/noncontig-updates-1.f90
 create mode 100644 libgomp/testsuite/libgomp.fortran/noncontig-updates-10.f90
 create mode 100644 libgomp/testsuite/libgomp.fortran/noncontig-updates-11.f90
 create mode 100644 libgomp/testsuite/libgomp.fortran/noncontig-updates-12.f90
 create mode 100644 libgomp/testsuite/libgomp.fortran/noncontig-updates-13.f90
 create mode 100644 libgomp/testsuite/libgomp.fortran/noncontig-updates-2.f90
 create mode 100644 libgomp/testsuite/libgomp.fortran/noncontig-updates-3.f90
 create mode 100644 libgomp/testsuite/libgomp.fortran/noncontig-updates-4.f90
 create mode 100644 libgomp/testsuite/libgomp.fortran/noncontig-updates-5.f90
 create mode 100644 libgomp/testsuite/libgomp.fortran/noncontig-updates-6.f90
 create mode 100644 libgomp/testsuite/libgomp.fortran/noncontig-updates-7.f90
 create mode 100644 libgomp/testsuite/libgomp.fortran/noncontig-updates-8.f90
 create mode 100644 libgomp/testsuite/libgomp.fortran/noncontig-updates-9.f90

-- 
2.41.0


             reply	other threads:[~2023-09-06  9:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-06  9:34 Julian Brown [this message]
2023-09-06  9:34 ` [PATCH 1/5] OpenMP, NVPTX: memcpy[23]D bias correction Julian Brown
2023-09-26 22:57   ` Thomas Schwinge
2023-10-02 14:53     ` Julian Brown
2023-12-19 20:45       ` Tobias Burnus
2023-09-06  9:34 ` [PATCH 2/5] OpenMP: Allow complete replacement of clause during map/to/from expansion Julian Brown
2023-09-06  9:34 ` [PATCH 3/5] OpenMP: Support strided and shaped-array updates for C++ Julian Brown
2023-09-06  9:34 ` [PATCH 4/5] OpenMP: Array shaping operator and strided "target update" for C Julian Brown
2023-09-06  9:34 ` [PATCH 5/5] OpenMP: Noncontiguous "target update" for Fortran Julian Brown

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.1693991758.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).