aboutsummaryrefslogtreecommitdiff
path: root/gcc/omp-low.c
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2015-01-19 13:03:35 +0100
committerThomas Schwinge <tschwinge@gcc.gnu.org>2015-01-19 13:03:35 +0100
commit128b26dceb824d7760c2100cd6845c72be5a1422 (patch)
tree0dedf360229e98ec8dd3a80062bd72e0cad0cde5 /gcc/omp-low.c
parent3d36be01e4f9bd4d99750d93f44ef7d8f3a3cc4e (diff)
downloadgcc-128b26dceb824d7760c2100cd6845c72be5a1422.zip
gcc-128b26dceb824d7760c2100cd6845c72be5a1422.tar.gz
gcc-128b26dceb824d7760c2100cd6845c72be5a1422.tar.bz2
[PR libgomp/64625] Remove __OFFLOAD_TABLE__ variable/formal parameter.
gcc/ * omp-low.c (offload_symbol_decl): Remove variable. (get_offload_symbol_decl): Remove function. (expand_omp_target): For BUILT_IN_GOMP_TARGET, BUILT_IN_GOMP_TARGET_DATA, BUILT_IN_GOMP_TARGET_UPDATE pass NULL instead of &__OFFLOAD_TABLE__, for BUILT_IN_GOACC_DATA_START, BUILT_IN_GOACC_ENTER_EXIT_DATA, BUILT_IN_GOACC_PARALLEL, BUILT_IN_GOACC_UPDATE don't pass it at all. libgomp/ * libgomp_g.h (GOACC_data_start, GOACC_enter_exit_data) (GOACC_parallel, GOACC_update): Remove const_void *offload_table formal parameter. Update all users. * target.c (GOMP_target, GOMP_target_data, GOMP_target_update): Document unused formal parameter. From-SVN: r219836
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r--gcc/omp-low.c45
1 files changed, 18 insertions, 27 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index b7bf338..1589310 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -340,30 +340,6 @@ oacc_max_threads (omp_context *ctx)
/* Holds offload tables with decls. */
vec<tree, va_gc> *offload_funcs, *offload_vars;
-/* Holds a decl for __OFFLOAD_TABLE__. */
-static GTY(()) tree offload_symbol_decl;
-
-/* Get the __OFFLOAD_TABLE__ symbol. */
-static tree
-get_offload_symbol_decl (void)
-{
- if (!offload_symbol_decl)
- {
- tree decl = build_decl (UNKNOWN_LOCATION, VAR_DECL,
- get_identifier ("__OFFLOAD_TABLE__"),
- ptr_type_node);
- TREE_ADDRESSABLE (decl) = 1;
- TREE_PUBLIC (decl) = 1;
- DECL_EXTERNAL (decl) = 1;
- DECL_WEAK (decl) = 1;
- DECL_ATTRIBUTES (decl)
- = tree_cons (get_identifier ("weak"),
- NULL_TREE, DECL_ATTRIBUTES (decl));
- offload_symbol_decl = decl;
- }
- return offload_symbol_decl;
-}
-
/* Convenience function for calling scan_omp_1_op on tree operands. */
static inline tree
@@ -9119,16 +9095,31 @@ expand_omp_target (struct omp_region *region)
}
gimple g;
- tree offload_table = get_offload_symbol_decl ();
vec<tree> *args;
/* The maximum number used by any start_ix, without varargs. */
- unsigned int argcnt = 12;
+ unsigned int argcnt = 11;
vec_alloc (args, argcnt);
args->quick_push (device);
if (offloaded)
args->quick_push (build_fold_addr_expr (child_fn));
- args->quick_push (build_fold_addr_expr (offload_table));
+ switch (start_ix)
+ {
+ case BUILT_IN_GOMP_TARGET:
+ case BUILT_IN_GOMP_TARGET_DATA:
+ case BUILT_IN_GOMP_TARGET_UPDATE:
+ /* This const void * is part of the current ABI, but we're not actually
+ using it. */
+ args->quick_push (build_zero_cst (ptr_type_node));
+ break;
+ case BUILT_IN_GOACC_DATA_START:
+ case BUILT_IN_GOACC_ENTER_EXIT_DATA:
+ case BUILT_IN_GOACC_PARALLEL:
+ case BUILT_IN_GOACC_UPDATE:
+ break;
+ default:
+ gcc_unreachable ();
+ }
args->quick_push (t1);
args->quick_push (t2);
args->quick_push (t3);