From: Nathan Sidwell <nathan@acm.org>
To: Thomas Schwinge <thomas@codesourcery.com>,
Nathan Sidwell <nathan@codesourcery.com>,
Tom de Vries <tom@codesourcery.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [gomp4] remove kernel-specific launch
Date: Sun, 19 Jul 2015 21:10:00 -0000 [thread overview]
Message-ID: <55AC11B1.4020407@acm.org> (raw)
In-Reply-To: <87y4ibubyj.fsf@kepler.schwinge.homeip.net>
[-- Attachment #1: Type: text/plain, Size: 683 bytes --]
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
[-- Attachment #2: gomp4-kernel-2.patch --]
[-- Type: text/x-patch, Size: 5223 bytes --]
2015-07-19 Nathan Sidwell <nathan@codesourcery.com>
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 <gcall *> (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, ...);
next prev parent reply other threads:[~2015-07-19 21:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-19 16:14 Nathan Sidwell
2015-07-19 17:13 ` Tom de Vries
2015-07-19 21:05 ` Thomas Schwinge
2015-07-19 21:08 ` Tom de Vries
2015-07-19 21:10 ` Nathan Sidwell [this message]
2015-07-20 12:08 ` Tom de Vries
2015-07-20 12:45 ` Nathan Sidwell
2015-07-21 10:23 ` Thomas Schwinge
2015-07-21 12:07 ` Tom de Vries
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55AC11B1.4020407@acm.org \
--to=nathan@acm.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=nathan@codesourcery.com \
--cc=thomas@codesourcery.com \
--cc=tom@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).