diff options
author | Julian Brown <julian@codesourcery.com> | 2019-12-20 01:20:13 +0000 |
---|---|---|
committer | Julian Brown <jules@gcc.gnu.org> | 2019-12-20 01:20:13 +0000 |
commit | 2a656a93597d9ba2444cf5f4b2954734c97fe06d (patch) | |
tree | 7c855a38f4c937efdb01078056ec89930fa3caf3 /libgomp/libgomp.h | |
parent | 8cce8b850470ba92287ffea9b53a46b69ec7dd8e (diff) | |
download | gcc-2a656a93597d9ba2444cf5f4b2954734c97fe06d.tar.gz |
Use aux struct in libgomp for infrequently-used/API-specific data
libgomp/
* libgomp.h (struct splay_tree_aux): New.
(struct splay_tree_key_s): Replace link_key field with aux pointer.
* target.c (gomp_map_vars_internal): Adjust for link_key being moved
to aux struct.
(gomp_remove_var_internal): Free aux block if present.
(gomp_load_image_to_device): Zero-initialise aux field instead of
link_key field.
(omp_target_associate_pointer): Zero-initialise aux field.
Co-Authored-By: Thomas Schwinge <thomas@codesourcery.com>
From-SVN: r279620
Diffstat (limited to 'libgomp/libgomp.h')
-rw-r--r-- | libgomp/libgomp.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libgomp/libgomp.h b/libgomp/libgomp.h index 038e356ab0b..f982ab38af6 100644 --- a/libgomp/libgomp.h +++ b/libgomp/libgomp.h @@ -989,6 +989,13 @@ struct target_mem_desc { #define OFFSET_POINTER (~(uintptr_t) 1) #define OFFSET_STRUCT (~(uintptr_t) 2) +/* Auxiliary structure for infrequently-used or API-specific data. */ + +struct splay_tree_aux { + /* Pointer to the original mapping of "omp declare target link" object. */ + splay_tree_key link_key; +}; + struct splay_tree_key_s { /* Address of the host object. */ uintptr_t host_start; @@ -1002,8 +1009,7 @@ struct splay_tree_key_s { uintptr_t refcount; /* Dynamic reference count. */ uintptr_t dynamic_refcount; - /* Pointer to the original mapping of "omp declare target link" object. */ - splay_tree_key link_key; + struct splay_tree_aux *aux; }; /* The comparison function. */ |