As mentioned in:

https://gcc.gnu.org/ml/gcc-patches/2018-11/msg01773.html

I had a few more changes planned for the reference-counting implementation
for OpenACC in libgomp.  These are embodied in this patch series.
The highlights are:

 - reference counts in the linked memory-mapping splay tree structure can be
   self-checked for consistency using optional (i.e. development-only)
   code.  This survives a libgomp test run (with offloading to nvptx),
   so I'm reasonably confident it's good.

 - the "data_environ" field in the device descriptor -- a linear linked
   list containing a target memory descriptor for each "acc enter data"
   mapping -- has been removed.  This brings OpenACC closer to the OpenMP
   implementation for non-lexically-scoped data mapping
   (GOMP_target_enter_exit_data), and is potentially a performance win
   if lots of data is mapped in this way.

 - the semantics of the "dynamic_refcount" field in the splay_tree_key
   structure have shifted slightly, so I've renamed the field.  It now
   represents references that are excess to those represented by actual
   pointers in the linked splay tree/target-memory descriptor structure.
   That might have been the intention before in fact, but the
   implementation was inconsistent.

I will apply to the og8 branch shortly.

Julian Brown (2):
  [og8] Further OpenACC reference-counting improvements
  [og8] OpenACC reference count consistency checking

 libgomp/libgomp.h                                  |   55 +++--
 libgomp/oacc-async.c                               |   64 +++++
 libgomp/oacc-host.c                                |    2 -
 libgomp/oacc-init.c                                |    6 +-
 libgomp/oacc-int.h                                 |    5 +
 libgomp/oacc-mem.c                                 |  206 ++++------------
 libgomp/oacc-parallel.c                            |  160 +++++++-----
 libgomp/target.c                                   |  262 ++++++++++++++++++--
 .../libgomp.oacc-c-c++-common/deep-copy-7.c        |   11 +-
 .../libgomp.oacc-c-c++-common/deep-copy-8.c        |    1 +
 10 files changed, 499 insertions(+), 273 deletions(-)

Reply via email to