These two patches follow on from:

https://gcc.gnu.org/pipermail/gcc-patches/2020-June/548908.html

and:

https://gcc.gnu.org/pipermail/gcc-patches/2020-June/549178.html

The first patch has been rethought somewhat -- we can factor out
the common parts of goacc_enter_datum/goacc_enter_data_internal and
goacc_exit_datum/goacc_exit_data_internal into two new functions.
Doing it this way avoids overloading the return type of the "enter data"
function (i.e. returning NULL for multiple mappings -- I really don't
like that "overloading"), and is less problematic wrt. the profiling API,
I think.

The second patch has been adjusted to account for the first (using the
newly factored-out helper functions as appropriate), and I've also fixed
some locking thinkos and added code to fix the new struct-3-1-1.c test.

Currently re-testing with offloading to NVPTX -- the patches have been
tested in combination with others previously though.

OK now?

Julian

Julian Brown (2):
  openacc: Helper functions for enter/exit data using single mapping
  openacc: Adjust dynamic reference count semantics

 libgomp/libgomp.h                             |   8 +-
 libgomp/oacc-mem.c                            | 355 +++++++++++-------
 libgomp/target.c                              |  38 +-
 .../libgomp.oacc-c-c++-common/pr92843-1.c     |   6 +-
 .../libgomp.oacc-c-c++-common/refcounting-1.c |  31 ++
 .../libgomp.oacc-c-c++-common/refcounting-2.c |  31 ++
 .../libgomp.oacc-c-c++-common/struct-3-1-1.c  |  34 ++
 .../structured-dynamic-lifetimes-4.c          |   2 -
 .../libgomp.oacc-fortran/deep-copy-6.f90      |   8 -
 .../dynamic-incr-structural-1.f90             |  48 +++
 .../mdc-refcount-1-1-1.f90                    |   8 -
 .../mdc-refcount-1-1-2.F90                    |   3 -
 .../mdc-refcount-1-2-1.f90                    |   8 -
 .../mdc-refcount-1-2-2.f90                    |   8 -
 .../mdc-refcount-1-3-1.f90                    |   8 -
 .../mdc-refcount-1-4-1.f90                    |   3 +-
 16 files changed, 382 insertions(+), 217 deletions(-)
 create mode 100644 libgomp/testsuite/libgomp.oacc-c-c++-common/refcounting-1.c
 create mode 100644 libgomp/testsuite/libgomp.oacc-c-c++-common/refcounting-2.c
 create mode 100644 libgomp/testsuite/libgomp.oacc-c-c++-common/struct-3-1-1.c
 create mode 100644 
libgomp/testsuite/libgomp.oacc-fortran/dynamic-incr-structural-1.f90

-- 
2.23.0

Reply via email to