Hi! On 2018-06-19T10:01:20-0700, Cesar Philippidis <ce...@codesourcery.com> wrote: > This patch implements the OpenACC 2.5 data clause semantics in libgomp.
> --- a/libgomp/libgomp.h > +++ b/libgomp/libgomp.h > @@ -853,6 +853,8 @@ struct splay_tree_key_s { > uintptr_t tgt_offset; > /* Reference count. */ > uintptr_t refcount; > + /* Dynamic reference count. */ > + uintptr_t dynamic_refcount; > /* Pointer to the original mapping of "omp declare target link" object. */ > splay_tree_key link_key; > }; See attached "[OpenACC] Initialize 'dynamic_refcount' whenever we initialize 'refcount'" for 'Cases missed in r261813 "Update OpenACC data clause semantics to the 2.5 behavior"'; committed to trunk in r279230, and backported to gcc-9-branch in r279238. Grüße Thomas
From 20d0998b970ba693b23ee24bd0c94ecb57adf281 Mon Sep 17 00:00:00 2001 From: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Wed, 11 Dec 2019 16:48:44 +0000 Subject: [PATCH] [OpenACC] Initialize 'dynamic_refcount' whenever we initialize 'refcount' Cases missed in r261813 "Update OpenACC data clause semantics to the 2.5 behavior". libgomp/ * target.c (gomp_load_image_to_device, omp_target_associate_ptr): Initialize 'dynamic_refcount' whenever we initialize 'refcount'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@279230 138bc75d-0d04-0410-961f-82ee72b054a4 --- libgomp/ChangeLog | 6 ++++++ libgomp/target.c | 3 +++ 2 files changed, 9 insertions(+) diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 6cefeba5f5f..6635ed7b44b 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,9 @@ +2019-12-11 Thomas Schwinge <tho...@codesourcery.com> + Julian Brown <jul...@codesourcery.com> + + * target.c (gomp_load_image_to_device, omp_target_associate_ptr): + Initialize 'dynamic_refcount' whenever we initialize 'refcount'. + 2019-12-11 Tobias Burnus <tob...@codesourcery.com> * omp_lib.h.in: Fix spelling of function declaration diff --git a/libgomp/target.c b/libgomp/target.c index 39a24f56395..1151debf256 100644 --- a/libgomp/target.c +++ b/libgomp/target.c @@ -1334,6 +1334,7 @@ gomp_load_image_to_device (struct gomp_device_descr *devicep, unsigned version, k->tgt = tgt; k->tgt_offset = target_table[i].start; k->refcount = REFCOUNT_INFINITY; + k->dynamic_refcount = 0; k->link_key = NULL; array->left = NULL; array->right = NULL; @@ -1366,6 +1367,7 @@ gomp_load_image_to_device (struct gomp_device_descr *devicep, unsigned version, k->tgt = tgt; k->tgt_offset = target_var->start; k->refcount = target_size & link_bit ? REFCOUNT_LINK : REFCOUNT_INFINITY; + k->dynamic_refcount = 0; k->link_key = NULL; array->left = NULL; array->right = NULL; @@ -2627,6 +2629,7 @@ omp_target_associate_ptr (const void *host_ptr, const void *device_ptr, k->tgt = tgt; k->tgt_offset = (uintptr_t) device_ptr + device_offset; k->refcount = REFCOUNT_INFINITY; + k->dynamic_refcount = 0; array->left = NULL; array->right = NULL; splay_tree_insert (&devicep->mem_map, array); -- 2.17.1
From f301776d131dd584f1259a4e6bfa5662451407c4 Mon Sep 17 00:00:00 2001 From: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Wed, 11 Dec 2019 16:51:31 +0000 Subject: [PATCH] [OpenACC, libgomp] Initialize 'dynamic_refcount' whenever we initialize 'refcount' Cases missed in r261813 "Update OpenACC data clause semantics to the 2.5 behavior". libgomp/ * target.c (gomp_load_image_to_device, omp_target_associate_ptr): Initialize 'dynamic_refcount' whenever we initialize 'refcount'. Backport trunk r279230. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-9-branch@279238 138bc75d-0d04-0410-961f-82ee72b054a4 --- libgomp/ChangeLog | 6 ++++++ libgomp/target.c | 3 +++ 2 files changed, 9 insertions(+) diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 70a7f50c22b..c1959a44b8c 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,9 @@ +2019-12-11 Thomas Schwinge <tho...@codesourcery.com> + Julian Brown <jul...@codesourcery.com> + + * target.c (gomp_load_image_to_device, omp_target_associate_ptr): + Initialize 'dynamic_refcount' whenever we initialize 'refcount'. + 2019-12-11 Tobias Burnus <tob...@codesourcery.com> Backported from mainline diff --git a/libgomp/target.c b/libgomp/target.c index 31148003d0a..97fc1ee2ddc 100644 --- a/libgomp/target.c +++ b/libgomp/target.c @@ -1214,6 +1214,7 @@ gomp_load_image_to_device (struct gomp_device_descr *devicep, unsigned version, k->tgt = tgt; k->tgt_offset = target_table[i].start; k->refcount = REFCOUNT_INFINITY; + k->dynamic_refcount = 0; k->link_key = NULL; array->left = NULL; array->right = NULL; @@ -1246,6 +1247,7 @@ gomp_load_image_to_device (struct gomp_device_descr *devicep, unsigned version, k->tgt = tgt; k->tgt_offset = target_var->start; k->refcount = target_size & link_bit ? REFCOUNT_LINK : REFCOUNT_INFINITY; + k->dynamic_refcount = 0; k->link_key = NULL; array->left = NULL; array->right = NULL; @@ -2501,6 +2503,7 @@ omp_target_associate_ptr (const void *host_ptr, const void *device_ptr, k->tgt = tgt; k->tgt_offset = (uintptr_t) device_ptr + device_offset; k->refcount = REFCOUNT_INFINITY; + k->dynamic_refcount = 0; array->left = NULL; array->right = NULL; splay_tree_insert (&devicep->mem_map, array); -- 2.17.1
signature.asc
Description: PGP signature