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, ...);