aboutsummaryrefslogtreecommitdiff
path: root/libgomp/oacc-init.c
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2015-08-10 18:48:26 +0200
committerThomas Schwinge <tschwinge@gcc.gnu.org>2015-08-10 18:48:26 +0200
commitb97e78b712b21e558a112b7bc683bf05ca7cdcc9 (patch)
tree5b850fb18324259a3fae0131aac6dfa6b6f028fc /libgomp/oacc-init.c
parent44a7d18d95a01b37da666a38188201805c6b578d (diff)
downloadgcc-b97e78b712b21e558a112b7bc683bf05ca7cdcc9.zip
gcc-b97e78b712b21e558a112b7bc683bf05ca7cdcc9.tar.gz
gcc-b97e78b712b21e558a112b7bc683bf05ca7cdcc9.tar.bz2
[PR libgomp/65742, PR middle-end/66332] libgomp: Remove plugin for non-shared memory host execution
gcc/ * builtins.c (expand_builtin_acc_on_device) [ACCEL_COMPILER]: Emit open-coded sequence. * omp-low.c (oacc_process_reduction_data): Remove handline of GOMP_DEVICE_HOST_NONSHM. gcc/testsuite/ * c-c++-common/goacc/acc_on_device-2.c: Remove XFAIL for C. include/ * gomp-constants.c (GOMP_DEVICE_HOST_NONSHM): Remove. libgomp/ * libgomp-plugin.h (enum offload_target_type): Remove OFFLOAD_TARGET_TYPE_HOST_NONSHM. * openacc.f90 (openacc_kinds): Remove acc_device_host_nonshm. * openacc.h (enum acc_device_t): Likewise. * openacc_lib.h: Likewise. * oacc-init.c (name_of_acc_device_t): Don't handle it. (acc_on_device): Just use __builtin_acc_on_device. * testsuite/libgomp.oacc-c-c++-common/if-1.c: Don't forbid usage of acc_on_device builtin. * plugin/plugin-host.h: Remove file. * plugin/plugin-host.c: Likewise, but salvage some content into... * oacc-host.c: ... this file. * plugin/Makefrag.am: Don't build libgomp-plugin-host_nonshm.la. * plugin/configfrag.ac (offload_targets): Don't add host_nonshm. * Makefile.in: Regenerate. * configure: Likewise. * testsuite/lib/libgomp.exp (check_effective_target_openacc_host_nonshm_selected): Remove. * testsuite/libgomp.oacc-c++/c++.exp: Don't handle ACC_DEVICE_TYPE=host_nonshm. * testsuite/libgomp.oacc-c/c.exp: Likewise. * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise. * testsuite/libgomp.oacc-c-c++-common/acc_on_device-1.c: Likewise. * testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90: Likewise. * testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f: Likewise. * testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f: Likewise. From-SVN: r226763
Diffstat (limited to 'libgomp/oacc-init.c')
-rw-r--r--libgomp/oacc-init.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/libgomp/oacc-init.c b/libgomp/oacc-init.c
index 105d9dc..c12f8ad 100644
--- a/libgomp/oacc-init.c
+++ b/libgomp/oacc-init.c
@@ -29,7 +29,6 @@
#include "libgomp.h"
#include "oacc-int.h"
#include "openacc.h"
-#include "plugin/plugin-host.h"
#include <assert.h>
#include <stdlib.h>
#include <strings.h>
@@ -102,7 +101,6 @@ name_of_acc_device_t (enum acc_device_t type)
case acc_device_none: return "none";
case acc_device_default: return "default";
case acc_device_host: return "host";
- case acc_device_host_nonshm: return "host_nonshm";
case acc_device_not_host: return "not_host";
case acc_device_nvidia: return "nvidia";
default: gomp_fatal ("unknown device type %u", (unsigned) type);
@@ -625,18 +623,8 @@ ialias (acc_set_device_num)
int
acc_on_device (acc_device_t dev)
{
- struct goacc_thread *thr = goacc_thread ();
-
- /* We only want to appear to be the "host_nonshm" plugin from "offloaded"
- code -- i.e. within a parallel region. Test a flag set by the
- openacc_parallel hook of the host_nonshm plugin to determine that. */
- if (acc_get_device_type () == acc_device_host_nonshm
- && thr && thr->target_tls
- && ((struct nonshm_thread *)thr->target_tls)->nonshm_exec)
- return dev == acc_device_host_nonshm || dev == acc_device_not_host;
-
- /* For OpenACC, libgomp is only built for the host, so this is sufficient. */
- return dev == acc_device_host || dev == acc_device_none;
+ /* Just rely on the compiler builtin. */
+ return __builtin_acc_on_device (dev);
}
ialias (acc_on_device)