Message ID | 87twsxu821.fsf@kepler.schwinge.homeip.net |
---|---|
State | New |
Headers | show |
On 21/07/15 12:19, Thomas Schwinge wrote: > Hi! > > Thanks for the cleanup! > > On Mon, 20 Jul 2015 11:54:48 +0200, Tom de Vries <Tom_deVries@mentor.com> 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, That's not a similar transformation. The GOACC_kernels_internal call is removed. > 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 <gomp_target *> (gsi_stmt (gsi)); >> >> gsi_prev (&gsi); >> - gcall *goacc_kernels = as_a <gcall *> (gsi_stmt (gsi)); >> + gcall *goacc_kernels_internal = as_a <gcall *> (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? It's not a hard requirement, but it's probably a good idea. Thanks, - Tom
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 <thomas@codesourcery.com> + + * tree-parloops.c (create_parallel_loop): Typo fix. + 2015-07-20 Nathan Sidwell <nathan@codesourcery.com> * 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 <gomp_target *> (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 <thomas@codesourcery.com> + + * libgomp_g.h (GOACC_kernels): Remove. + 2015-07-20 Nathan Sidwell <nathan@codesourcery.com> * 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 <nathan@codesourcery.com> 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, ...);