On 06/20/2018 09:45 AM, Jakub Jelinek wrote:
> On Tue, Jun 19, 2018 at 10:01:20AM -0700, Cesar Philippidis wrote:

>> >From 53ee03231c5e6e4747b4ef01335079a2d4a98480 Mon Sep 17 00:00:00 2001
>> From: Cesar Philippidis <ce...@codesourcery.com>
>> Date: Tue, 19 Jun 2018 09:33:04 -0700
>> Subject: [PATCH 7/7] runtime changes
>>
>> ---
>>  libgomp/libgomp.h       |   7 +-
>>  libgomp/libgomp.map     |  12 +++
>>  libgomp/oacc-mem.c      | 196 ++++++++++++++++++++++++++++++++-------
>>  libgomp/oacc-parallel.c | 198 ++++++++++++++++++++++++++++++++++------
>>  libgomp/openacc.f90     | 112 +++++++++++++++++++++++
>>  libgomp/openacc.h       |   6 ++
>>  libgomp/openacc_lib.h   |  40 ++++++++
>>  libgomp/target.c        |  41 ++++-----
>>  8 files changed, 528 insertions(+), 84 deletions(-)
>>
>> diff --git a/libgomp/libgomp.h b/libgomp/libgomp.h
>> index 10ea8940c96..3a8cc2bd7d6 100644
>> --- 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;
>>  };
> 
> I'm not entirely happy about this, it grows the structure for not just
> OpenACC, but also OpenMP which will never use it.  Are there any fields
> not used by OpenACC?  E.g. is link_key used?
> Or could the dynamic refcounts be an array allocated (for OpenACC mappings
> only) after the tgt->array array, accessed using
> key->tgt->dynamic_refcounts[key - key->tgt->array] ?
Sorry, I mistakenly committed this patch with the front end changes. Can
I address this issue in a follow up patch?

If it means anything, we have a significant async change that removes
the async_refcount field in that struct.

Cesar

Reply via email to