From patchwork Fri Sep 18 09:12:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 519199 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 8703714017E for ; Fri, 18 Sep 2015 19:13:08 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=kbWHmxOJ; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; q=dns; s=default; b=wgqlXCKU6OURNtdn AdeVSVAedag20/DhxZJ0UHU56Op+T/j8pIzrpJqYmttd35rnv1p2a+PKFukrsAMx HtsyoDVJj8baAVBIPA4r0W7ox2IiCqhu4mmOJiEaafLTdi06+Q4ZfkxeDeJPF6Kc heX+uASnaH9acjMNuiyryXAUoy0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=default; bh=Ylyk41augD3n8lKvRg8dVY F+e8w=; b=kbWHmxOJ0RyKGOTpNkSSBZNwAXTyiHn7eYKTUlfGT+cKYenU6CGFTl P8OkCxPzbpWt6xgTmM+cdSEUGjc8TjIBq8DiZqep3Yf47AJv5xgcTpxwXFfPoWAp 7lf0qjfwxxpcaWKh9cdI5nob9giTpIf960v5ZTqAbnjvHx1HfJcX8= Received: (qmail 69518 invoked by alias); 18 Sep 2015 09:13:00 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 69484 invoked by uid 89); 18 Sep 2015 09:12:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 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; Fri, 18 Sep 2015 09:12:58 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-02.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1Zcriw-0005Sn-Sf from Thomas_Schwinge@mentor.com for gcc-patches@gcc.gnu.org; Fri, 18 Sep 2015 02:12:55 -0700 Received: from feldtkeller.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-02.mgc.mentorg.com (137.202.0.106) with Microsoft SMTP Server id 14.3.224.2; Fri, 18 Sep 2015 10:12:54 +0100 From: Thomas Schwinge To: GCC Patches CC: Nathan Sidwell Subject: Re: [gomp4] Remove more gang local bits In-Reply-To: <55F1C288.5090504@acm.org> References: <55F1C288.5090504@acm.org> User-Agent: Notmuch/0.9-125-g4686d11 (http://notmuchmail.org) Emacs/24.5.1 (i586-pc-linux-gnu) Date: Fri, 18 Sep 2015 11:12:48 +0200 Message-ID: <87twqs146n.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Hi! On Thu, 10 Sep 2015 13:48:56 -0400, Nathan Sidwell wrote: > I've committed this to gomp4 branch. It removes more now-obsolete bits of gang > local handling. > --- libgomp/target.c (revision 227633) > +++ libgomp/target.c (working copy) > @@ -373,12 +373,7 @@ gomp_map_vars (struct gomp_device_descr > k->tgt_offset = tgt_size; > tgt_size += k->host_end - k->host_start; > k->copy_from = GOMP_MAP_COPY_FROM_P (kind & typemask); > - k->dealloc_host = (kind & typemask) > - == GOMP_MAP_FORCE_TO_GANGLOCAL; > - if (GOMP_MAP_POINTER_P (kind & typemask) && i < 0 && > - (get_kind (is_openacc, kinds, i-1) & typemask) > - == GOMP_MAP_FORCE_TO_GANGLOCAL) > - k->dealloc_host = true; > + k->dealloc_host = false; > k->refcount = 1; > k->async_refcount = 0; > tgt->refcount++; The dealloc_host flag had only been used in the "ganglocal" implementation, which is now gone, so this can now also go; committed to gomp-4_0-branch in r227900: commit 108d67ade49b25931ba14788e39d6fd91259c37d Author: tschwinge Date: Fri Sep 18 09:11:54 2015 +0000 libgomp: Remove dealloc_host member of struct splay_tree_key_s libgomp/ * libgomp.h (struct splay_tree_key_s): Remove dealloc_host member. Adjust all users. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gomp-4_0-branch@227900 138bc75d-0d04-0410-961f-82ee72b054a4 --- libgomp/ChangeLog.gomp | 3 +++ libgomp/libgomp.h | 2 -- libgomp/target.c | 5 ----- 3 files changed, 3 insertions(+), 7 deletions(-) Grüße, Thomas diff --git libgomp/ChangeLog.gomp libgomp/ChangeLog.gomp index 0c0e697..12cf8aa 100644 --- libgomp/ChangeLog.gomp +++ libgomp/ChangeLog.gomp @@ -1,5 +1,8 @@ 2015-09-18 Thomas Schwinge + * libgomp.h (struct splay_tree_key_s): Remove dealloc_host member. + Adjust all users. + * testsuite/libgomp.oacc-fortran/reduction-5.f90: Extend. XFAIL execution test for -O0. diff --git libgomp/libgomp.h libgomp/libgomp.h index e976850..d51b08b 100644 --- libgomp/libgomp.h +++ libgomp/libgomp.h @@ -678,8 +678,6 @@ struct splay_tree_key_s { uintptr_t async_refcount; /* True if data should be copied from device to host at the end. */ bool copy_from; - /* True if data should be freed on the host, e.g. for ganglocal vars. */ - bool dealloc_host; }; #include "splay-tree.h" diff --git libgomp/target.c libgomp/target.c index 5b77f3c..6ca80ad 100644 --- libgomp/target.c +++ libgomp/target.c @@ -373,7 +373,6 @@ gomp_map_vars (struct gomp_device_descr *devicep, size_t mapnum, k->tgt_offset = tgt_size; tgt_size += k->host_end - k->host_start; k->copy_from = GOMP_MAP_COPY_FROM_P (kind & typemask); - k->dealloc_host = false; k->refcount = 1; k->async_refcount = 0; tgt->refcount++; @@ -569,8 +568,6 @@ gomp_unmap_vars (struct target_mem_desc *tgt, bool do_copyfrom) devicep->dev2host_func (devicep->target_id, (void *) k->host_start, (void *) (k->tgt->tgt_start + k->tgt_offset), k->host_end - k->host_start); - if (k->dealloc_host) - free ((void *)k->host_start); splay_tree_remove (&devicep->mem_map, k); if (k->tgt->refcount > 1) k->tgt->refcount--; @@ -712,7 +709,6 @@ gomp_load_image_to_device (struct gomp_device_descr *devicep, unsigned version, k->refcount = 1; k->async_refcount = 0; k->copy_from = false; - k->dealloc_host = false; tgt->list[i] = k; tgt->refcount++; array->left = NULL; @@ -741,7 +737,6 @@ gomp_load_image_to_device (struct gomp_device_descr *devicep, unsigned version, k->refcount = 1; k->async_refcount = 0; k->copy_from = false; - k->dealloc_host = false; tgt->list[i] = k; tgt->refcount++; array->left = NULL;