From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 68158 invoked by alias); 20 Jun 2018 16:59:37 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 68148 invoked by uid 89); 20 Jun 2018 16:59:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.2 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy= X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 20 Jun 2018 16:59:35 +0000 Received: from svr-orw-mbx-01.mgc.mentorg.com ([147.34.90.201]) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1fVgSC-0007H1-Ka from Cesar_Philippidis@mentor.com ; Wed, 20 Jun 2018 09:59:32 -0700 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Wed, 20 Jun 2018 09:59:30 -0700 Subject: Re: [OpenACC] Update OpenACC data clause semantics to the 2.5 behavior - runtime To: Jakub Jelinek , Chung-Lin Tang CC: "gcc-patches@gcc.gnu.org" References: <7fa7637f-e7f5-d43d-13f1-706c77e8e957@codesourcery.com> <836f376f-513d-dd29-9133-6526bfb59866@codesourcery.com> <20180620164506.GO7166@tucnak> From: Cesar Philippidis Message-ID: <06069b0d-46dd-ec3d-d010-6cca6701bec8@codesourcery.com> Date: Wed, 20 Jun 2018 16:59:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180620164506.GO7166@tucnak> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: svr-orw-mbx-02.mgc.mentorg.com (147.34.90.202) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) X-SW-Source: 2018-06/txt/msg01270.txt.bz2 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 >> 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