diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2015-10-01 14:13:30 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2015-10-01 14:13:30 +0000 |
commit | 481261380243a1a01b85247285d0cc03a8090540 (patch) | |
tree | 75eb04c466d0a7567a3505c2f451fe856bba34a5 /gcc/builtins.c | |
parent | d878e79bf80f4c7bb0c6dd827e4c4dd37c5385bf (diff) | |
download | gcc-481261380243a1a01b85247285d0cc03a8090540.zip gcc-481261380243a1a01b85247285d0cc03a8090540.tar.gz gcc-481261380243a1a01b85247285d0cc03a8090540.tar.bz2 |
builtins.c: Don't include gomp-constants.h.
* builtins.c: Don't include gomp-constants.h.
(fold_builtin_1): Don't fold acc_on_device here.
* gimple-fold.c: Include gomp-constants.h.
(gimple_fold_builtin_acc_on_device): New.
(gimple_fold_builtin): Call it.
From-SVN: r228340
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r-- | gcc/builtins.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index 2ff1a8c..e20c1f8 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -68,7 +68,6 @@ along with GCC; see the file COPYING3. If not see #include "cgraph.h" #include "tree-chkp.h" #include "rtl-chkp.h" -#include "gomp-constants.h" static tree do_mpc_arg1 (tree, tree, int (*)(mpc_ptr, mpc_srcptr, mpc_rnd_t)); @@ -10234,27 +10233,6 @@ fold_builtin_1 (location_t loc, tree fndecl, tree arg0) return build_empty_stmt (loc); break; - case BUILT_IN_ACC_ON_DEVICE: - /* Don't fold on_device until we know which compiler is active. */ - if (symtab->state == EXPANSION) - { - unsigned val_host = GOMP_DEVICE_HOST; - unsigned val_dev = GOMP_DEVICE_NONE; - -#ifdef ACCEL_COMPILER - val_host = GOMP_DEVICE_NOT_HOST; - val_dev = ACCEL_COMPILER_acc_device; -#endif - tree host = build2 (EQ_EXPR, boolean_type_node, arg0, - build_int_cst (integer_type_node, val_host)); - tree dev = build2 (EQ_EXPR, boolean_type_node, arg0, - build_int_cst (integer_type_node, val_dev)); - - tree result = build2 (TRUTH_OR_EXPR, boolean_type_node, host, dev); - return fold_convert (integer_type_node, result); - } - break; - default: break; } |