This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gomp4] Remove more gang local bits


Hi!

On Thu, 10 Sep 2015 13:48:56 -0400, Nathan Sidwell <nathan@acm.org> wrote:
> I've committed this to gomp4 branch.  It removes more now-obsolete bits of gang 
> local handling.

> --- libgomp/target.c	(revision 227633)
> +++ libgomp/target.c	(working copy)
> @@ -373,12 +373,7 @@ gomp_map_vars (struct gomp_device_descr
>  		k->tgt_offset = tgt_size;
>  		tgt_size += k->host_end - k->host_start;
>  		k->copy_from = GOMP_MAP_COPY_FROM_P (kind & typemask);
> -		k->dealloc_host = (kind & typemask)
> -		  == GOMP_MAP_FORCE_TO_GANGLOCAL;
> -		if (GOMP_MAP_POINTER_P (kind & typemask) && i < 0 &&
> -		    (get_kind (is_openacc, kinds, i-1) & typemask)
> -		    == GOMP_MAP_FORCE_TO_GANGLOCAL)
> -		  k->dealloc_host = true;
> +		k->dealloc_host = false;
>  		k->refcount = 1;
>  		k->async_refcount = 0;
>  		tgt->refcount++;

The dealloc_host flag had only been used in the "ganglocal"
implementation, which is now gone, so this can now also go; committed to
gomp-4_0-branch in r227900:

commit 108d67ade49b25931ba14788e39d6fd91259c37d
Author: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Fri Sep 18 09:11:54 2015 +0000

    libgomp: Remove dealloc_host member of struct splay_tree_key_s
    
    	libgomp/
    	* libgomp.h (struct splay_tree_key_s): Remove dealloc_host member.
    	Adjust all users.
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gomp-4_0-branch@227900 138bc75d-0d04-0410-961f-82ee72b054a4
---
 libgomp/ChangeLog.gomp |    3 +++
 libgomp/libgomp.h      |    2 --
 libgomp/target.c       |    5 -----
 3 files changed, 3 insertions(+), 7 deletions(-)

diff --git libgomp/ChangeLog.gomp libgomp/ChangeLog.gomp
index 0c0e697..12cf8aa 100644
--- libgomp/ChangeLog.gomp
+++ libgomp/ChangeLog.gomp
@@ -1,5 +1,8 @@
 2015-09-18  Thomas Schwinge  <thomas@codesourcery.com>
 
+	* libgomp.h (struct splay_tree_key_s): Remove dealloc_host member.
+	Adjust all users.
+
 	* testsuite/libgomp.oacc-fortran/reduction-5.f90: Extend.  XFAIL
 	execution test for -O0.
 
diff --git libgomp/libgomp.h libgomp/libgomp.h
index e976850..d51b08b 100644
--- libgomp/libgomp.h
+++ libgomp/libgomp.h
@@ -678,8 +678,6 @@ struct splay_tree_key_s {
   uintptr_t async_refcount;
   /* True if data should be copied from device to host at the end.  */
   bool copy_from;
-  /* True if data should be freed on the host, e.g. for ganglocal vars.  */
-  bool dealloc_host;
 };
 
 #include "splay-tree.h"
diff --git libgomp/target.c libgomp/target.c
index 5b77f3c..6ca80ad 100644
--- libgomp/target.c
+++ libgomp/target.c
@@ -373,7 +373,6 @@ gomp_map_vars (struct gomp_device_descr *devicep, size_t mapnum,
 		k->tgt_offset = tgt_size;
 		tgt_size += k->host_end - k->host_start;
 		k->copy_from = GOMP_MAP_COPY_FROM_P (kind & typemask);
-		k->dealloc_host = false;
 		k->refcount = 1;
 		k->async_refcount = 0;
 		tgt->refcount++;
@@ -569,8 +568,6 @@ gomp_unmap_vars (struct target_mem_desc *tgt, bool do_copyfrom)
 	  devicep->dev2host_func (devicep->target_id, (void *) k->host_start,
 				  (void *) (k->tgt->tgt_start + k->tgt_offset),
 				  k->host_end - k->host_start);
-	if (k->dealloc_host)
-	  free ((void *)k->host_start);
 	splay_tree_remove (&devicep->mem_map, k);
 	if (k->tgt->refcount > 1)
 	  k->tgt->refcount--;
@@ -712,7 +709,6 @@ gomp_load_image_to_device (struct gomp_device_descr *devicep, unsigned version,
       k->refcount = 1;
       k->async_refcount = 0;
       k->copy_from = false;
-      k->dealloc_host = false;
       tgt->list[i] = k;
       tgt->refcount++;
       array->left = NULL;
@@ -741,7 +737,6 @@ gomp_load_image_to_device (struct gomp_device_descr *devicep, unsigned version,
       k->refcount = 1;
       k->async_refcount = 0;
       k->copy_from = false;
-      k->dealloc_host = false;
       tgt->list[i] = k;
       tgt->refcount++;
       array->left = NULL;


GrÃÃe,
 Thomas

Attachment: signature.asc
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]