From patchwork Tue Jul 21 10:19:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 498141 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 07C8714076E for ; Tue, 21 Jul 2015 20:19:58 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=ecFIuzJ3; 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=j6YArC5VIz9p4yuK HkSJEXRLHZGTlIZIGZF9W1hSgcpI+Yb9LtVn1Ig+4KMM5ny5xfuYlbP2u7TDJInT Ql3Bg3qQ3RHPJMxNGVTMwl3xoXNqekHMDolMUKXqXv1BjwsVgOueNtaLqqdOO64Y zLUyA+09eGw9xHY8R5lgRNBi6/U= 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=ragsdqVQE3LiJTmv3jtozJ zo//4=; b=ecFIuzJ3IaeczQPNbiYl5nLBfOpv3FeygGYUDGLBgfN8K/ghr5/+kQ kJmxK3S3Mano1CtoEtXlH0Hi1ZtuRNBjhlgODXHhC9GSEDS8aYFliFmrEJ2Mb1Tt 90dtD5mXQZkuNMxcO5U5lmgszozIH57tMQjEH6P8vEOOXu28FdmGs= Received: (qmail 58986 invoked by alias); 21 Jul 2015 10:19:51 -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 58976 invoked by uid 89); 21 Jul 2015 10:19:50 -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; Tue, 21 Jul 2015 10:19:48 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1ZHUeG-0000L8-KK from Thomas_Schwinge@mentor.com for gcc-patches@gcc.gnu.org; Tue, 21 Jul 2015 03:19:44 -0700 Received: from feldtkeller.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.224.2; Tue, 21 Jul 2015 11:19:41 +0100 From: Thomas Schwinge To: Nathan Sidwell , Tom de Vries CC: GCC Patches Subject: Re: [gomp4] remove kernel-specific launch In-Reply-To: <55ACC568.8060503@mentor.com> References: <55AB97C0.4080303@acm.org> <87y4ibubyj.fsf@kepler.schwinge.homeip.net> <55AC11B1.4020407@acm.org> <55ACC568.8060503@mentor.com> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) Date: Tue, 21 Jul 2015 12:19:34 +0200 Message-ID: <87twsxu821.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Hi! Thanks for the cleanup! On Mon, 20 Jul 2015 11:54:48 +0200, Tom de Vries wrote: > On 19/07/15 23:08, Nathan Sidwell wrote: > > On 07/19/15 16:30, Thomas Schwinge wrote: > >> Does it make sense then to rename GOACC_kernels_internal to > >> GOACC_kernels? > > [...] perhaps it should be an internal fn? IIUC those > > are for pseudo-funcs that should be converted to something else before > > the end of compilation. > > Turning it into an internal fn will make it harder to convert a > GOACC_kernels_internal call into a GOACC_parallel call, which we're > doing here in omp-low.c: > ... > tree fndecl = builtin_decl_explicit (BUILT_IN_GOACC_PARALLEL); > gimple_call_set_fndecl (call, fndecl); > gimple_call_set_fntype (call, TREE_TYPE (fndecl)); > gimple_call_reset_alias_info (call); > ... ..., and also a similar transformation in gcc/tree-parloops.c, I think, which I've not been too fond of ;-) anyway, because of: > --- a/gcc/tree-parloops.c > +++ b/gcc/tree-parloops.c > @@ -2045,11 +2045,12 @@ create_parallel_loop (struct loop *loop, tree loop_fn, tree data, > } > else > { > - /* Create oacc parallel pragma based on oacc kernels pragma. */ > + /* Create oacc parallel pragma based on oacc kernels pragma and > + GOAC_kernels_internal call. */ > gomp_target *kernels = as_a (gsi_stmt (gsi)); > > gsi_prev (&gsi); > - gcall *goacc_kernels = as_a (gsi_stmt (gsi)); > + gcall *goacc_kernels_internal = as_a (gsi_stmt (gsi)); > > tree clauses = gimple_omp_target_clauses (kernels); > /* FIXME: We need a more intelligent mapping onto vector, gangs, > @@ -2070,7 +2071,8 @@ create_parallel_loop (struct loop *loop, tree loop_fn, tree data, > gimple_omp_target_set_child_fn (stmt, child_fn); > tree data_arg = gimple_omp_target_data_arg (kernels); > gimple_omp_target_set_data_arg (stmt, data_arg); > - tree ganglocal_size = gimple_call_arg (goacc_kernels, /* TODO */ 9); > + tree ganglocal_size > + = gimple_call_arg (goacc_kernels_internal, /* TODO */ 9); > gimple_omp_target_set_ganglocal_size (stmt, ganglocal_size); ... this "clumsy" argument copying. As I understand it, there is an implicit/non-obvious requirement that the GOACC_kernels_internal and GOACC_parallel function/built-in signatures match? Does it thus make sense to add a comment to the definition of the GOACC_kernels_internal, in gcc/omp-builtins.def, to describe that? Committed in r226035: commit fbf4d5131957d06b12ce19a1b870ec6b383acbfd Author: tschwinge Date: Tue Jul 21 10:18:07 2015 +0000 More GOACC_kernels removal fixes ... for r225994, and r225989. gcc/ * tree-parloops.c (create_parallel_loop): Typo fix. libgomp/ * libgomp_g.h (GOACC_kernels): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gomp-4_0-branch@226035 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog.gomp | 4 ++++ gcc/tree-parloops.c | 2 +- libgomp/ChangeLog.gomp | 5 ++++- libgomp/libgomp_g.h | 3 --- 4 files changed, 9 insertions(+), 5 deletions(-) Grüße, Thomas diff --git gcc/ChangeLog.gomp gcc/ChangeLog.gomp index 7bb7c09..2351d85 100644 --- gcc/ChangeLog.gomp +++ gcc/ChangeLog.gomp @@ -1,3 +1,7 @@ +2015-07-21 Thomas Schwinge + + * tree-parloops.c (create_parallel_loop): Typo fix. + 2015-07-20 Nathan Sidwell * config/nvptx/nvptx.c (nvptx_builtins): Delete enum. diff --git gcc/tree-parloops.c gcc/tree-parloops.c index 7111f93..a825e7b 100644 --- gcc/tree-parloops.c +++ gcc/tree-parloops.c @@ -2046,7 +2046,7 @@ create_parallel_loop (struct loop *loop, tree loop_fn, tree data, else { /* Create oacc parallel pragma based on oacc kernels pragma and - GOAC_kernels_internal call. */ + GOACC_kernels_internal call. */ gomp_target *kernels = as_a (gsi_stmt (gsi)); gsi_prev (&gsi); diff --git libgomp/ChangeLog.gomp libgomp/ChangeLog.gomp index 02a84dc..161255b 100644 --- libgomp/ChangeLog.gomp +++ libgomp/ChangeLog.gomp @@ -1,3 +1,7 @@ +2015-07-21 Thomas Schwinge + + * libgomp_g.h (GOACC_kernels): Remove. + 2015-07-20 Nathan Sidwell * oacc-parallel.c (GOACC_parallel): Move variadic handling into @@ -21,7 +25,6 @@ * oacc-parallel.c (GOACC_kernels): Delete. * libgomp.map: Remove GOACC_kernels. - * libgomp_g.h (GOACC_kernels): Remove. 2015-07-17 Nathan Sidwell diff --git libgomp/libgomp_g.h libgomp/libgomp_g.h index 943ee67..63ae972 100644 --- libgomp/libgomp_g.h +++ libgomp/libgomp_g.h @@ -222,9 +222,6 @@ extern void GOACC_data_start (int, size_t, void **, size_t *, extern void GOACC_data_end (void); extern void GOACC_enter_exit_data (int, size_t, void **, size_t *, unsigned short *, int, int, ...); -extern void GOACC_kernels (int, void (*) (void *), size_t, - void **, size_t *, unsigned short *, int, int, int, - size_t, int, int, ...); extern void GOACC_parallel (int, void (*) (void *), size_t, void **, size_t *, unsigned short *, int, int, int, size_t, int, int, ...);