From patchwork Tue Feb 2 13:57:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 577191 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 33F36140AD9 for ; Wed, 3 Feb 2016 00:57:40 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=PHlMuQ21; 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=PxqEgk4g9osmoiew Q005ThyQUxvTbOI17DbnDPLZxlnCGM7flaF8pG5uqx8iwzSaUDAcmbDVSJgEgnAY aRKBNr9YGn8KMGwMKFC5cgW8U+1m/TQGBirsYnIj7H2ArkQ/PFu6FkBC1g6jp1OQ DuX8/7PBCO4l9ymfTYi3zFMAWEk= 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=cdGzOZqsTTDUQmAJfzhjza +uUcM=; b=PHlMuQ21bPqc7+NzD0dRpUENNvkNr0DABS1SVSWO1V+BfWSk6Us5Gh wAqynbHFpQPDIk1pLLXzw1Y5ivpHk+Q3zLWoN9+Ow9HN//KIv/8ZfuuanCVwVoZ6 WEgIFGQ0dKOdHZQBN9t41g5P2NQdt0LiBMg6h+svTV1lJD3hvnp6k= Received: (qmail 108805 invoked by alias); 2 Feb 2016 13:57:33 -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 108795 invoked by uid 89); 2 Feb 2016 13:57:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=julian, Julian, gcc_unreachable, thr 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; Tue, 02 Feb 2016 13:57:30 +0000 Received: from svr-orw-fem-04.mgc.mentorg.com ([147.34.97.41]) by relay1.mentorg.com with esmtp id 1aQbSP-00037W-N0 from Thomas_Schwinge@mentor.com ; Tue, 02 Feb 2016 05:57:25 -0800 Received: from tftp-cs (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.3.224.2; Tue, 2 Feb 2016 05:57:25 -0800 Received: by tftp-cs (Postfix, from userid 49978) id 941D2C224D; Tue, 2 Feb 2016 05:57:24 -0800 (PST) From: Thomas Schwinge To: GCC Patches , Jakub Jelinek CC: Julian Brown , James Norris , "Joseph S. Myers" , Nathan Sidwell , Cesar Philippidis Subject: Re: [OpenACC 0/7] host_data construct In-Reply-To: <877fkwn8p6.fsf@kepler.schwinge.homeip.net> References: <56293476.5020801@codesourcery.com> <562A578E.4080907@codesourcery.com> <20151026183422.GW478@tucnak.redhat.com> <20151102183339.365c3d33@octopus> <20151112111621.657650bc@octopus> <20151118124747.30a2ec5d@octopus> <20151119131345.GX5675@tucnak.redhat.com> <20151119142650.5a8842e4@octopus> <20151119155723.GA5675@tucnak.redhat.com> <20151130193034.71143aa4@octopus> <877fkwn8p6.fsf@kepler.schwinge.homeip.net> User-Agent: Notmuch/0.9-125-g4686d11 (http://notmuchmail.org) Emacs/24.5.1 (i586-pc-linux-gnu) Date: Tue, 2 Feb 2016 14:57:17 +0100 Message-ID: <8737tbw6yq.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Hi! On Wed, 2 Dec 2015 16:58:45 +0100, I wrote: > On Mon, 30 Nov 2015 19:30:34 +0000, Julian Brown wrote: > > --- a/libgomp/oacc-parallel.c > > +++ b/libgomp/oacc-parallel.c > > > +void > > +GOACC_host_data (int device, size_t mapnum, > > + void **hostaddrs, size_t *sizes, unsigned short *kinds) > > +{ > > +[...] > > +} > > Isn't that identical to GOACC_data_start? Can we thus get rid of it? Yes, we can. As GOACC_host_data has not been part of GCC 5's libgomp ABI, it's OK to just remove it; committed "as obvious" in r233074: commit 2bf3f448431be10baa9755df5faeed6b2f6508f8 Author: tschwinge Date: Tue Feb 2 13:53:55 2016 +0000 Merge BUILT_IN_GOACC_HOST_DATA into BUILT_IN_GOACC_DATA_START gcc/ * omp-builtins.def (BUILT_IN_GOACC_HOST_DATA): Remove. * omp-low.c (expand_omp_target): Use BUILT_IN_GOACC_DATA_START instead. libgomp/ * libgomp.map (GOACC_2.0): Remove GOACC_host_data. * oacc-parallel.c (GOACC_host_data): Remove function definition. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233074 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/omp-builtins.def | 2 -- gcc/omp-low.c | 5 +---- libgomp/ChangeLog | 3 +++ libgomp/libgomp.map | 1 - libgomp/oacc-parallel.c | 40 ---------------------------------------- 6 files changed, 10 insertions(+), 47 deletions(-) Grüße Thomas diff --git gcc/ChangeLog gcc/ChangeLog index 05741331..9a2cec8 100644 --- gcc/ChangeLog +++ gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-02-02 Thomas Schwinge + + * omp-builtins.def (BUILT_IN_GOACC_HOST_DATA): Remove. + * omp-low.c (expand_omp_target): Use BUILT_IN_GOACC_DATA_START + instead. + 2016-02-02 Richard Biener PR tree-optimization/69606 diff --git gcc/omp-builtins.def gcc/omp-builtins.def index 60199b0..ea012df 100644 --- gcc/omp-builtins.def +++ gcc/omp-builtins.def @@ -47,8 +47,6 @@ DEF_GOACC_BUILTIN (BUILT_IN_GOACC_UPDATE, "GOACC_update", DEF_GOACC_BUILTIN (BUILT_IN_GOACC_WAIT, "GOACC_wait", BT_FN_VOID_INT_INT_VAR, ATTR_NOTHROW_LIST) -DEF_GOACC_BUILTIN (BUILT_IN_GOACC_HOST_DATA, "GOACC_host_data", - BT_FN_VOID_INT_SIZE_PTR_PTR_PTR, ATTR_NOTHROW_LIST) DEF_GOACC_BUILTIN_COMPILER (BUILT_IN_ACC_ON_DEVICE, "acc_on_device", BT_FN_INT_INT, ATTR_CONST_NOTHROW_LEAF_LIST) diff --git gcc/omp-low.c gcc/omp-low.c index 0b70274..d41688b 100644 --- gcc/omp-low.c +++ gcc/omp-low.c @@ -13186,6 +13186,7 @@ expand_omp_target (struct omp_region *region) start_ix = BUILT_IN_GOACC_PARALLEL; break; case GF_OMP_TARGET_KIND_OACC_DATA: + case GF_OMP_TARGET_KIND_OACC_HOST_DATA: start_ix = BUILT_IN_GOACC_DATA_START; break; case GF_OMP_TARGET_KIND_OACC_UPDATE: @@ -13197,9 +13198,6 @@ expand_omp_target (struct omp_region *region) case GF_OMP_TARGET_KIND_OACC_DECLARE: start_ix = BUILT_IN_GOACC_DECLARE; break; - case GF_OMP_TARGET_KIND_OACC_HOST_DATA: - start_ix = BUILT_IN_GOACC_HOST_DATA; - break; default: gcc_unreachable (); } @@ -13324,7 +13322,6 @@ expand_omp_target (struct omp_region *region) case BUILT_IN_GOACC_DATA_START: case BUILT_IN_GOACC_DECLARE: case BUILT_IN_GOMP_TARGET_DATA: - case BUILT_IN_GOACC_HOST_DATA: break; case BUILT_IN_GOMP_TARGET: case BUILT_IN_GOMP_TARGET_UPDATE: diff --git libgomp/ChangeLog libgomp/ChangeLog index 6c9bf6a..250240d 100644 --- libgomp/ChangeLog +++ libgomp/ChangeLog @@ -1,5 +1,8 @@ 2016-02-02 Thomas Schwinge + * libgomp.map (GOACC_2.0): Remove GOACC_host_data. + * oacc-parallel.c (GOACC_host_data): Remove function definition. + * testsuite/lib/libgomp.exp: Skip hsa offloading for OpenACC test cases. diff --git libgomp/libgomp.map libgomp/libgomp.map index ea9344d..4d42c42 100644 --- libgomp/libgomp.map +++ libgomp/libgomp.map @@ -394,7 +394,6 @@ GOACC_2.0.1 { global: GOACC_declare; GOACC_parallel_keyed; - GOACC_host_data; } GOACC_2.0; GOMP_PLUGIN_1.0 { diff --git libgomp/oacc-parallel.c libgomp/oacc-parallel.c index f22ba41..bc24651 100644 --- libgomp/oacc-parallel.c +++ libgomp/oacc-parallel.c @@ -490,46 +490,6 @@ GOACC_wait (int async, int num_waits, ...) goacc_thread ()->dev->openacc.async_wait_all_async_func (acc_async_noval); } -void -GOACC_host_data (int device, size_t mapnum, - void **hostaddrs, size_t *sizes, unsigned short *kinds) -{ - bool host_fallback = device == GOMP_DEVICE_HOST_FALLBACK; - struct target_mem_desc *tgt; - -#ifdef HAVE_INTTYPES_H - gomp_debug (0, "%s: mapnum=%"PRIu64", hostaddrs=%p, size=%p, kinds=%p\n", - __FUNCTION__, (uint64_t) mapnum, hostaddrs, sizes, kinds); -#else - gomp_debug (0, "%s: mapnum=%lu, hostaddrs=%p, sizes=%p, kinds=%p\n", - __FUNCTION__, (unsigned long) mapnum, hostaddrs, sizes, kinds); -#endif - - goacc_lazy_initialize (); - - struct goacc_thread *thr = goacc_thread (); - struct gomp_device_descr *acc_dev = thr->dev; - - /* Host fallback or 'do nothing'. */ - if ((acc_dev->capabilities & GOMP_OFFLOAD_CAP_SHARED_MEM) - || host_fallback) - { - tgt = gomp_map_vars (NULL, 0, NULL, NULL, NULL, NULL, true, - GOMP_MAP_VARS_OPENACC); - tgt->prev = thr->mapped_data; - thr->mapped_data = tgt; - - return; - } - - gomp_debug (0, " %s: prepare mappings\n", __FUNCTION__); - tgt = gomp_map_vars (acc_dev, mapnum, hostaddrs, NULL, sizes, kinds, true, - GOMP_MAP_VARS_OPENACC); - gomp_debug (0, " %s: mappings prepared\n", __FUNCTION__); - tgt->prev = thr->mapped_data; - thr->mapped_data = tgt; -} - int GOACC_get_num_threads (void) {