Merge BUILT_IN_GOACC_HOST_DATA into BUILT_IN_GOACC_DATA_START
gcc/ * omp-builtins.def (BUILT_IN_GOACC_HOST_DATA): Remove. * omp-low.c (expand_omp_target): Use BUILT_IN_GOACC_DATA_START instead. libgomp/ * libgomp.map (GOACC_2.0): Remove GOACC_host_data. * oacc-parallel.c (GOACC_host_data): Remove function definition. From-SVN: r233074
This commit is contained in:
parent
1a06f5e6a3
commit
18f6014649
@ -1,3 +1,9 @@
|
||||
2016-02-02 Thomas Schwinge <thomas@codesourcery.com>
|
||||
|
||||
* omp-builtins.def (BUILT_IN_GOACC_HOST_DATA): Remove.
|
||||
* omp-low.c (expand_omp_target): Use BUILT_IN_GOACC_DATA_START
|
||||
instead.
|
||||
|
||||
2016-02-02 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/69606
|
||||
|
@ -47,8 +47,6 @@ DEF_GOACC_BUILTIN (BUILT_IN_GOACC_UPDATE, "GOACC_update",
|
||||
DEF_GOACC_BUILTIN (BUILT_IN_GOACC_WAIT, "GOACC_wait",
|
||||
BT_FN_VOID_INT_INT_VAR,
|
||||
ATTR_NOTHROW_LIST)
|
||||
DEF_GOACC_BUILTIN (BUILT_IN_GOACC_HOST_DATA, "GOACC_host_data",
|
||||
BT_FN_VOID_INT_SIZE_PTR_PTR_PTR, ATTR_NOTHROW_LIST)
|
||||
|
||||
DEF_GOACC_BUILTIN_COMPILER (BUILT_IN_ACC_ON_DEVICE, "acc_on_device",
|
||||
BT_FN_INT_INT, ATTR_CONST_NOTHROW_LEAF_LIST)
|
||||
|
@ -13186,6 +13186,7 @@ expand_omp_target (struct omp_region *region)
|
||||
start_ix = BUILT_IN_GOACC_PARALLEL;
|
||||
break;
|
||||
case GF_OMP_TARGET_KIND_OACC_DATA:
|
||||
case GF_OMP_TARGET_KIND_OACC_HOST_DATA:
|
||||
start_ix = BUILT_IN_GOACC_DATA_START;
|
||||
break;
|
||||
case GF_OMP_TARGET_KIND_OACC_UPDATE:
|
||||
@ -13197,9 +13198,6 @@ expand_omp_target (struct omp_region *region)
|
||||
case GF_OMP_TARGET_KIND_OACC_DECLARE:
|
||||
start_ix = BUILT_IN_GOACC_DECLARE;
|
||||
break;
|
||||
case GF_OMP_TARGET_KIND_OACC_HOST_DATA:
|
||||
start_ix = BUILT_IN_GOACC_HOST_DATA;
|
||||
break;
|
||||
default:
|
||||
gcc_unreachable ();
|
||||
}
|
||||
@ -13324,7 +13322,6 @@ expand_omp_target (struct omp_region *region)
|
||||
case BUILT_IN_GOACC_DATA_START:
|
||||
case BUILT_IN_GOACC_DECLARE:
|
||||
case BUILT_IN_GOMP_TARGET_DATA:
|
||||
case BUILT_IN_GOACC_HOST_DATA:
|
||||
break;
|
||||
case BUILT_IN_GOMP_TARGET:
|
||||
case BUILT_IN_GOMP_TARGET_UPDATE:
|
||||
|
@ -1,5 +1,8 @@
|
||||
2016-02-02 Thomas Schwinge <thomas@codesourcery.com>
|
||||
|
||||
* libgomp.map (GOACC_2.0): Remove GOACC_host_data.
|
||||
* oacc-parallel.c (GOACC_host_data): Remove function definition.
|
||||
|
||||
* testsuite/lib/libgomp.exp: Skip hsa offloading for OpenACC test
|
||||
cases.
|
||||
|
||||
|
@ -394,7 +394,6 @@ GOACC_2.0.1 {
|
||||
global:
|
||||
GOACC_declare;
|
||||
GOACC_parallel_keyed;
|
||||
GOACC_host_data;
|
||||
} GOACC_2.0;
|
||||
|
||||
GOMP_PLUGIN_1.0 {
|
||||
|
@ -490,46 +490,6 @@ GOACC_wait (int async, int num_waits, ...)
|
||||
goacc_thread ()->dev->openacc.async_wait_all_async_func (acc_async_noval);
|
||||
}
|
||||
|
||||
void
|
||||
GOACC_host_data (int device, size_t mapnum,
|
||||
void **hostaddrs, size_t *sizes, unsigned short *kinds)
|
||||
{
|
||||
bool host_fallback = device == GOMP_DEVICE_HOST_FALLBACK;
|
||||
struct target_mem_desc *tgt;
|
||||
|
||||
#ifdef HAVE_INTTYPES_H
|
||||
gomp_debug (0, "%s: mapnum=%"PRIu64", hostaddrs=%p, size=%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
|
||||
|
||||
goacc_lazy_initialize ();
|
||||
|
||||
struct goacc_thread *thr = goacc_thread ();
|
||||
struct gomp_device_descr *acc_dev = thr->dev;
|
||||
|
||||
/* Host fallback or 'do nothing'. */
|
||||
if ((acc_dev->capabilities & GOMP_OFFLOAD_CAP_SHARED_MEM)
|
||||
|| host_fallback)
|
||||
{
|
||||
tgt = gomp_map_vars (NULL, 0, NULL, NULL, NULL, NULL, true,
|
||||
GOMP_MAP_VARS_OPENACC);
|
||||
tgt->prev = thr->mapped_data;
|
||||
thr->mapped_data = tgt;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
gomp_debug (0, " %s: prepare mappings\n", __FUNCTION__);
|
||||
tgt = gomp_map_vars (acc_dev, mapnum, hostaddrs, NULL, sizes, kinds, true,
|
||||
GOMP_MAP_VARS_OPENACC);
|
||||
gomp_debug (0, " %s: mappings prepared\n", __FUNCTION__);
|
||||
tgt->prev = thr->mapped_data;
|
||||
thr->mapped_data = tgt;
|
||||
}
|
||||
|
||||
int
|
||||
GOACC_get_num_threads (void)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user