From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 115538 invoked by alias); 10 Sep 2015 17:49:02 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 115516 invoked by uid 89); 10 Sep 2015 17:49:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_ASCII_DIVIDERS,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-qg0-f43.google.com Received: from mail-qg0-f43.google.com (HELO mail-qg0-f43.google.com) (209.85.192.43) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 10 Sep 2015 17:49:00 +0000 Received: by qgx61 with SMTP id 61so42010429qgx.3 for ; Thu, 10 Sep 2015 10:48:58 -0700 (PDT) X-Received: by 10.140.150.213 with SMTP id 204mr56235116qhw.104.1441907338832; Thu, 10 Sep 2015 10:48:58 -0700 (PDT) Received: from ?IPv6:2601:181:c000:c497:a2a8:cdff:fe3e:b48? ([2601:181:c000:c497:a2a8:cdff:fe3e:b48]) by smtp.googlemail.com with ESMTPSA id v10sm6366648qgv.32.2015.09.10.10.48.57 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Sep 2015 10:48:58 -0700 (PDT) To: GCC Patches From: Nathan Sidwell Subject: [gomp4] Remove more gang local bits Message-ID: <55F1C288.5090504@acm.org> Date: Thu, 10 Sep 2015 17:54:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030507070205020103090608" X-SW-Source: 2015-09/txt/msg00710.txt.bz2 This is a multi-part message in MIME format. --------------030507070205020103090608 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-length: 105 I've committed this to gomp4 branch. It removes more now-obsolete bits of gang local handling. nathan --------------030507070205020103090608 Content-Type: text/x-patch; name="gomp4-ganglocal.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gomp4-ganglocal.patch" Content-length: 4366 2015-09-10 Nathan Sidwell include/ * gomp-constants.h (GOMP_MAP_FLAG_GANGLOCAL): Delete. (enum gomp_map_kind): Remove GOMP_MAP_GANGLOCAL, GOMP_MAP_FORCE_TO_GANGLOCAL). libgomp/ * oacc-parallel.c (alloc_ganglocal_addrs): Delete. (GOACC_parallel_keyed): Do not call it. (GOACC_update): Remove GOMP_MAP_FORCE_TO_GANGLOCAL case. * target.c (gomp_map_vars): Remove GOMP_MAP_FORCE_TO_GANGLOCAL handling. Index: libgomp/oacc-parallel.c =================================================================== --- libgomp/oacc-parallel.c (revision 227633) +++ libgomp/oacc-parallel.c (working copy) @@ -57,33 +57,6 @@ find_pointer (int pos, size_t mapnum, un return 0; } -static void -alloc_ganglocal_addrs (size_t mapnum, void **hostaddrs, size_t *sizes, - unsigned short *kinds) -{ - int i; - const int typemask = 0xff; - void *t; - - for (i = 0; i < mapnum; i++) - { - if ((kinds[i] & typemask) == GOMP_MAP_FORCE_TO_GANGLOCAL) - { - t = malloc (sizes[i]); - memcpy (t, hostaddrs[i], sizes[i]); - hostaddrs[i] = t; - - if (i + 1 < mapnum && GOMP_MAP_POINTER_P (kinds[i+1] & typemask)) - { - size_t *ptr = (size_t *) malloc (sizeof (size_t *)); - *ptr = (size_t)t; - hostaddrs[i+1] = ptr; - i++; - } - } - } -} - static struct oacc_static { void *addr; @@ -176,8 +149,6 @@ GOACC_parallel_keyed (int device, void ( __FUNCTION__, (unsigned long) mapnum, hostaddrs, sizes, kinds); #endif - alloc_ganglocal_addrs (mapnum, hostaddrs, sizes, kinds); - goacc_lazy_initialize (); thr = goacc_thread (); @@ -617,7 +588,6 @@ GOACC_update (int device, size_t mapnum, break; case GOMP_MAP_FORCE_TO: - case GOMP_MAP_FORCE_TO_GANGLOCAL: acc_update_device (hostaddrs[i], sizes[i]); break; Index: libgomp/target.c =================================================================== --- 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++; @@ -395,7 +390,6 @@ gomp_map_vars (struct gomp_device_descr case GOMP_MAP_TO: case GOMP_MAP_TOFROM: case GOMP_MAP_FORCE_TO: - case GOMP_MAP_FORCE_TO_GANGLOCAL: case GOMP_MAP_FORCE_TOFROM: /* FIXME: Perhaps add some smarts, like if copying several adjacent fields from host to target, use some Index: include/gomp-constants.h =================================================================== --- include/gomp-constants.h (revision 227633) +++ include/gomp-constants.h (working copy) @@ -36,7 +36,6 @@ #define GOMP_MAP_FLAG_TO (1 << 0) #define GOMP_MAP_FLAG_FROM (1 << 1) -#define GOMP_MAP_FLAG_GANGLOCAL (1 << 4) /* Special map kinds, enumerated starting here. */ #define GOMP_MAP_FLAG_SPECIAL_0 (1 << 2) #define GOMP_MAP_FLAG_SPECIAL_1 (1 << 3) @@ -55,8 +54,6 @@ enum gomp_map_kind GOMP_MAP_FROM = (GOMP_MAP_ALLOC | GOMP_MAP_FLAG_FROM), /* ..., and copy to and from device. */ GOMP_MAP_TOFROM = (GOMP_MAP_TO | GOMP_MAP_FROM), - /* OpenACC Gang-local. */ - GOMP_MAP_GANGLOCAL = (GOMP_MAP_ALLOC | GOMP_MAP_FLAG_GANGLOCAL), /* The following kind is an internal only map kind, used for pointer based array sections. OMP_CLAUSE_SIZE for these is not the pointer size, which is implicitly POINTER_SIZE_UNITS, but the bias. */ @@ -84,9 +81,7 @@ enum gomp_map_kind /* ..., and copy from device. */ GOMP_MAP_FORCE_FROM = (GOMP_MAP_FLAG_FORCE | GOMP_MAP_FROM), /* ..., and copy to and from device. */ - GOMP_MAP_FORCE_TOFROM = (GOMP_MAP_FLAG_FORCE | GOMP_MAP_TOFROM), - /* Flag to allocate, copy to device and also make gang-local. */ - GOMP_MAP_FORCE_TO_GANGLOCAL = (GOMP_MAP_FORCE_TO | GOMP_MAP_GANGLOCAL) + GOMP_MAP_FORCE_TOFROM = (GOMP_MAP_FLAG_FORCE | GOMP_MAP_TOFROM) }; #define GOMP_MAP_COPY_TO_P(X) \ --------------030507070205020103090608--