diff options
author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-09-29 20:03:33 +0000 |
---|---|---|
committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-09-29 20:03:33 +0000 |
commit | 1ae4e7aa58ac0b5835fc7513b7cb9a42e1a7974f (patch) | |
tree | e164e8279e772b6cb877f619ba62bc39753aee68 /libgomp | |
parent | 2a8bddc882029c96e40d388c5ad2c17c1f5af21f (diff) | |
download | gcc-1ae4e7aa58ac0b5835fc7513b7cb9a42e1a7974f.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228267 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp')
-rw-r--r-- | libgomp/ChangeLog | 4 | ||||
-rw-r--r-- | libgomp/oacc-init.c | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 88a25fcb8bf..8fbd6c59dee 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 2258a72bbe5..28b9e7a90f1 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); } |