From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25254 invoked by alias); 19 Jul 2015 21:08:08 -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 25245 invoked by uid 89); 19 Jul 2015 21:08:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.9 required=5.0 tests=BAYES_50,FREEMAIL_FROM,KAM_ASCII_DIVIDERS,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-qk0-f169.google.com Received: from mail-qk0-f169.google.com (HELO mail-qk0-f169.google.com) (209.85.220.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sun, 19 Jul 2015 21:08:06 +0000 Received: by qkdv3 with SMTP id v3so102123874qkd.3 for ; Sun, 19 Jul 2015 14:08:03 -0700 (PDT) X-Received: by 10.140.102.144 with SMTP id w16mr22035985qge.82.1437340083868; Sun, 19 Jul 2015 14:08:03 -0700 (PDT) Received: from ?IPv6:2601:181:c000:c497:a2a8:cdff:fe3e:b48? ([2601:181:c000:c497:a2a8:cdff:fe3e:b48]) by smtp.googlemail.com with ESMTPSA id v44sm9768487qgd.21.2015.07.19.14.08.02 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Jul 2015 14:08:03 -0700 (PDT) Subject: Re: [gomp4] remove kernel-specific launch To: Thomas Schwinge , Nathan Sidwell , Tom de Vries References: <55AB97C0.4080303@acm.org> <87y4ibubyj.fsf@kepler.schwinge.homeip.net> Cc: GCC Patches From: Nathan Sidwell Message-ID: <55AC11B1.4020407@acm.org> Date: Sun, 19 Jul 2015 21:10:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <87y4ibubyj.fsf@kepler.schwinge.homeip.net> Content-Type: multipart/mixed; boundary="------------060506030603000704070405" X-SW-Source: 2015-07/txt/msg01622.txt.bz2 This is a multi-part message in MIME format. --------------060506030603000704070405 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-length: 683 On 07/19/15 16:30, Thomas Schwinge wrote: > gcc/tree-parloops.c: /* Remove GOACC_kernels. */ > libgomp/libgomp.map: GOACC_kernels; > libgomp/libgomp_g.h:extern void GOACC_kernels (int, void (*) (void *), size_t, I fixed all byt the parloops comment. That comment didn't really make sense to me -- it seems to be doing something with the pragma not the call. Perhaps Tom could correct/clarify it? > Does it make sense then to rename GOACC_kernels_internal to > GOACC_kernels? I agree with Tom. But 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. nathan --------------060506030603000704070405 Content-Type: text/x-patch; name="gomp4-kernel-2.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gomp4-kernel-2.patch" Content-length: 5223 2015-07-19 Nathan Sidwell gcc/ * omp-low.c (expand_omp_target): Convert to BUILT_IN_GOACC_PARALLEL. Remove BUILT_IN_GOACC_KERNELS cases. * omp-builtins.def (BUILT_IN_GOACC_KERNELS): Delete. libgomp/ * oacc-parallel.c (GOACC_kernels): Delete. * libgomp.map: Remove GOACC_kernels. * libgomp_g.h (GOACC_kernels): Remove. Index: gcc/omp-low.c =================================================================== --- gcc/omp-low.c (revision 225982) +++ gcc/omp-low.c (working copy) @@ -9339,14 +9339,15 @@ expand_omp_target (struct omp_region *re /* Don't emit the library call. We've already done that. */ do_emit_library_call = false; /* Transform BUILT_IN_GOACC_KERNELS_INTERNAL into - BUILT_IN_GOACC_KERNELS_INTERNAL. Now that the function body will be - split off, we can no longer regard the omp_data_array reference as - non-escaping. */ + BUILT_IN_GOACC_PARALLELL. Now that the function + body will be split off, we can no longer regard the + omp_data_array reference as non-escaping. */ gsi = gsi_last_bb (entry_bb); gsi_prev (&gsi); gcall *call = as_a (gsi_stmt (gsi)); - gcc_assert (gimple_call_builtin_p (call, BUILT_IN_GOACC_KERNELS_INTERNAL)); - tree fndecl = builtin_decl_explicit (BUILT_IN_GOACC_KERNELS); + gcc_assert (gimple_call_builtin_p + (call, BUILT_IN_GOACC_KERNELS_INTERNAL)); + 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); @@ -9723,7 +9724,6 @@ expand_omp_target (struct omp_region *re case BUILT_IN_GOACC_DATA_START: case BUILT_IN_GOACC_DECLARE: case BUILT_IN_GOACC_ENTER_EXIT_DATA: - case BUILT_IN_GOACC_KERNELS: case BUILT_IN_GOACC_KERNELS_INTERNAL: case BUILT_IN_GOACC_PARALLEL: case BUILT_IN_GOACC_UPDATE: @@ -9743,7 +9743,6 @@ expand_omp_target (struct omp_region *re case BUILT_IN_GOMP_TARGET_DATA: case BUILT_IN_GOMP_TARGET_UPDATE: break; - case BUILT_IN_GOACC_KERNELS: case BUILT_IN_GOACC_KERNELS_INTERNAL: case BUILT_IN_GOACC_PARALLEL: { Index: gcc/omp-builtins.def =================================================================== --- gcc/omp-builtins.def (revision 225982) +++ gcc/omp-builtins.def (working copy) @@ -48,9 +48,6 @@ DEF_GOACC_BUILTIN_FNSPEC (BUILT_IN_GOACC BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_INT_INT_INT_SIZE_INT_INT_VAR, ATTR_FNSPEC_DOT_DOT_DOT_DOT_r_r_r_NOTHROW_LIST, ATTR_NOTHROW_LIST, "....rrr") -DEF_GOACC_BUILTIN (BUILT_IN_GOACC_KERNELS, "GOACC_kernels", - BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_INT_INT_INT_SIZE_INT_INT_VAR, - ATTR_NOTHROW_LIST) DEF_GOACC_BUILTIN (BUILT_IN_GOACC_PARALLEL, "GOACC_parallel", BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_INT_INT_INT_SIZE_INT_INT_VAR, ATTR_NOTHROW_LIST) Index: libgomp/libgomp.map =================================================================== --- libgomp/libgomp.map (revision 225982) +++ libgomp/libgomp.map (working copy) @@ -331,7 +331,6 @@ GOACC_2.0.GOMP_4_BRANCH { global: GOACC_deviceptr; GOACC_get_ganglocal_ptr; - GOACC_kernels; GOACC_register_static; } GOACC_2.0; Index: libgomp/oacc-parallel.c =================================================================== --- libgomp/oacc-parallel.c (revision 225982) +++ libgomp/oacc-parallel.c (working copy) @@ -530,37 +530,6 @@ GOACC_enter_exit_data (int device, size_ acc_dev->openacc.async_set_async_func (acc_async_sync); } -void -GOACC_kernels (int device, void (*fn) (void *), - size_t mapnum, void **hostaddrs, size_t *sizes, - unsigned short *kinds, - int num_gangs, int num_workers, int vector_length, - size_t shared_size, int async, int num_waits, ...) -{ -#ifdef HAVE_INTTYPES_H - gomp_debug (0, "%s: mapnum=%"PRIu64", hostaddrs=%p, sizes=%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 - - va_list ap; - - goacc_lazy_initialize (); - - va_start (ap, num_waits); - - if (num_waits > 0) - goacc_wait (async, num_waits, ap); - - va_end (ap); - - GOACC_parallel (device, fn, mapnum, hostaddrs, sizes, kinds, - num_gangs, num_workers, vector_length, shared_size, - async, 0); -} - static void goacc_wait (int async, int num_waits, va_list ap) { Index: libgomp_g.h =================================================================== --- libgomp_g.h (revision 225982) +++ libgomp_g.h (working copy) @@ -222,9 +222,6 @@ extern void GOACC_data_start (int, size_ 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, ...); --------------060506030603000704070405--