diff options
author | iverbin <iverbin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-12-15 14:56:50 +0000 |
---|---|---|
committer | iverbin <iverbin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-12-15 14:56:50 +0000 |
commit | c0998828fe6f9edd4f6e2d7ee140b23340334265 (patch) | |
tree | 3ded94420f4c91b3d08a1e815cabbd436cccb009 /gcc/cgraphunit.c | |
parent | dfea92e17077428d1f38137b6e7fc732c584e696 (diff) | |
download | gcc-c0998828fe6f9edd4f6e2d7ee140b23340334265.tar.gz |
gcc/c-family/
* c-common.c (c_common_attribute_table): Handle "omp declare target
link" attribute.
gcc/
* cgraphunit.c (output_in_order): Do not assemble "omp declare target
link" variables in ACCEL_COMPILER.
* gimplify.c (gimplify_adjust_omp_clauses): Do not remove mapping of
"omp declare target link" variables.
* omp-low.c (scan_sharing_clauses): Do not remove mapping of "omp
declare target link" variables.
(add_decls_addresses_to_decl_constructor): For "omp declare target link"
variables output address of the artificial pointer instead of address of
the variable. Set most significant bit of the size to mark them.
(pass_data_omp_target_link): New pass_data.
(pass_omp_target_link): New class.
(find_link_var_op): New static function.
(make_pass_omp_target_link): New function.
* passes.def: Add pass_omp_target_link.
* tree-pass.h (make_pass_omp_target_link): Declare.
* varpool.c (symbol_table::output_variables): Do not assemble "omp
declare target link" variables in ACCEL_COMPILER.
gcc/lto/
* lto.c: Include stringpool.h and fold-const.h.
(offload_handle_link_vars): New static function.
(lto_main): Call offload_handle_link_vars.
libgomp/
* libgomp.h (REFCOUNT_LINK): Define.
(struct splay_tree_key_s): Add link_key.
* target.c (gomp_map_vars): Treat REFCOUNT_LINK objects as not mapped.
Replace target address of the pointer with target address of newly
mapped object in the splay tree. Set link pointer on target to the
device address of the mapped object.
(gomp_unmap_vars): Restore target address of the pointer in the splay
tree for REFCOUNT_LINK objects after unmapping.
(gomp_load_image_to_device): Set refcount to REFCOUNT_LINK for "omp
declare target link" objects.
(gomp_unload_image_from_device): Replace j with i. Force unmap of all
"omp declare target link" objects, which were mapped for the image.
(gomp_exit_data): Restore target address of the pointer in the splay
tree for REFCOUNT_LINK objects after unmapping.
* testsuite/libgomp.c/target-link-1.c: New file.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231655 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r-- | gcc/cgraphunit.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 3d86c36488e..8443cb092a7 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -2210,6 +2210,13 @@ output_in_order (bool no_reorder) break; case ORDER_VAR: +#ifdef ACCEL_COMPILER + /* Do not assemble "omp declare target link" vars. */ + if (DECL_HAS_VALUE_EXPR_P (nodes[i].u.v->decl) + && lookup_attribute ("omp declare target link", + DECL_ATTRIBUTES (nodes[i].u.v->decl))) + break; +#endif nodes[i].u.v->assemble_decl (); break; |