summaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-01 14:13:30 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-01 14:13:30 +0000
commit7e3a76de7c496449b187c2688d958631cf21a944 (patch)
tree75eb04c466d0a7567a3505c2f451fe856bba34a5 /gcc/builtins.c
parentd7c2ad68accd2ec49671fba51173baaa8c33c322 (diff)
downloadgcc-7e3a76de7c496449b187c2688d958631cf21a944.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228340 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r--gcc/builtins.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c
index 2ff1a8c82bb..e20c1f8ff99 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;
}