aboutsummaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2015-09-29 20:03:33 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2015-09-29 20:03:33 +0000
commit164453bba4c6ef1094ad66d96d338a4d5eeff9a1 (patch)
treee164e8279e772b6cb877f619ba62bc39753aee68 /libgomp
parent89a13632e66017585247c655462681486c36caca (diff)
downloadgcc-164453bba4c6ef1094ad66d96d338a4d5eeff9a1.zip
gcc-164453bba4c6ef1094ad66d96d338a4d5eeff9a1.tar.gz
gcc-164453bba4c6ef1094ad66d96d338a4d5eeff9a1.tar.bz2
builtins.c (expand_builtin_acc_on_device): Delete.
gcc/ * builtins.c (expand_builtin_acc_on_device): Delete. (expand_builtin): Don't call it. (fold_builtin_1): Fold acc_on_device. libgomp/ * oacc-init.c (acc_on_device): Force optimization level. From-SVN: r228267
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog4
-rw-r--r--libgomp/oacc-init.c6
2 files changed, 8 insertions, 2 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index 88a25fc..8fbd6c5 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,5 +1,9 @@
2015-09-29 Nathan Sidwell <nathan@codesourcery.com>
+ * oacc-init.c (acc_on_device): Force optimization level.
+
+2015-09-29 Nathan Sidwell <nathan@codesourcery.com>
+
* plugin/plugin-nvptx.c (ARRAYSIZE): Delete.
(cuda_errlist): Delete.
(cuda_error): Reimplement.
diff --git a/libgomp/oacc-init.c b/libgomp/oacc-init.c
index 2258a72..28b9e7a 100644
--- a/libgomp/oacc-init.c
+++ b/libgomp/oacc-init.c
@@ -620,10 +620,12 @@ acc_set_device_num (int ord, acc_device_t d)
ialias (acc_set_device_num)
-int
+/* Compile on_device with optimization, so that the compiler expands
+ this, rather than generating infinitely recursive code. */
+
+int __attribute__ ((__optimize__ ("O2")))
acc_on_device (acc_device_t dev)
{
- /* Just rely on the compiler builtin. */
return __builtin_acc_on_device (dev);
}