From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 43486 invoked by alias); 19 Jul 2015 12:27:50 -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 43477 invoked by uid 89); 19 Jul 2015 12:27:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_ASCII_DIVIDERS,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-qg0-f42.google.com Received: from mail-qg0-f42.google.com (HELO mail-qg0-f42.google.com) (209.85.192.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sun, 19 Jul 2015 12:27:48 +0000 Received: by qged69 with SMTP id d69so33646615qge.0 for ; Sun, 19 Jul 2015 05:27:46 -0700 (PDT) X-Received: by 10.140.86.137 with SMTP id p9mr39423071qgd.89.1437308866421; Sun, 19 Jul 2015 05:27:46 -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 w68sm9122092qge.18.2015.07.19.05.27.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Jul 2015 05:27:45 -0700 (PDT) To: Tom de Vries Cc: GCC Patches From: Nathan Sidwell Subject: [gomp4] remove kernel-specific launch Message-ID: <55AB97C0.4080303@acm.org> Date: Sun, 19 Jul 2015 16:14:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050508010607070005080305" X-SW-Source: 2015-07/txt/msg01609.txt.bz2 This is a multi-part message in MIME format. --------------050508010607070005080305 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-length: 170 Tom, as we discussed this patch removes the GOACC_kernels call, which forwards to GOACC_parallel. We simply call GOACC_parallel directly. ok for gomp4 branch? nathan --------------050508010607070005080305 Content-Type: text/x-patch; name="gomp4-kernel.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gomp4-kernel.patch" Content-length: 4146 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. 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: 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: 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) { --------------050508010607070005080305--