From b5859e400219c891b81e0788e7e58422706e4a49 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Mon, 9 Dec 2019 12:39:57 +0100 Subject: [PATCH] In 'libgomp/target.c:gomp_exit_data', remove open-coded 'gomp_remove_var' libgomp/ * target.c (gomp_exit_data): Use 'gomp_remove_var'. From-SVN: r279118 --- libgomp/ChangeLog | 4 ++++ libgomp/target.c | 11 +---------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index a0bd25177d1..c5541bcec81 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,7 @@ +2019-12-09 Thomas Schwinge + + * target.c (gomp_exit_data): Use 'gomp_remove_var'. + 2019-12-09 Tobias Burnus * testsuite/libgomp.fortran/use_device_addr-3.f90: Make 'stop' codes diff --git a/libgomp/target.c b/libgomp/target.c index 84d6daa76ca..13f7921651f 100644 --- a/libgomp/target.c +++ b/libgomp/target.c @@ -2095,16 +2095,7 @@ gomp_exit_data (struct gomp_device_descr *devicep, size_t mapnum, - k->host_start), cur_node.host_end - cur_node.host_start); if (k->refcount == 0) - { - splay_tree_remove (&devicep->mem_map, k); - if (k->link_key) - splay_tree_insert (&devicep->mem_map, - (splay_tree_node) k->link_key); - if (k->tgt->refcount > 1) - k->tgt->refcount--; - else - gomp_unmap_tgt (k->tgt); - } + gomp_remove_var (devicep, k); break; default: -- 2.30.2