From patchwork Fri Oct 30 00:35:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Sidwell X-Patchwork-Id: 538088 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id A5B0B141176 for ; Fri, 30 Oct 2015 11:35:33 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=S7R9GISj; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to:cc :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=E9AK8WzGH+5OswGa68GfCG+iC8aVK0wbKt8oAHI6IdvgCooKVq Vj19HHjFuvBYWoRsPzUJJ8LOnPZVrSTrfAlWzVHFXTIhTNb0W/mDC/Eoy0V9zR++ gPg4fVioAAF8dNwC4+qSRHWTC7QGEaKyrsy7KbxUpGBAPpMVWXn+UamUI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to:cc :from:subject:message-id:date:mime-version:content-type; s= default; bh=wR3pcqTchBTgukkFK03rlLH5SC8=; b=S7R9GISjYPL5hMn8XcHW hIaTRo24ouAnelKsMaDlZRse44b389XExCe/VqsI0pyr47oAi99yw+lZ1t5VCCMr Xtoe9ujOXWXmu7vjtYEuc4SHqFsLxClKvai3voLR5SnieXJU2dYfhk7FOIVxsACB SRe7TRBDBzn3DmIfOKWRm6Y= Received: (qmail 124751 invoked by alias); 30 Oct 2015 00:35:24 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 122630 invoked by uid 89); 30 Oct 2015 00:35:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL, BAYES_40, FREEMAIL_FROM, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-pa0-f46.google.com Received: from mail-pa0-f46.google.com (HELO mail-pa0-f46.google.com) (209.85.220.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 30 Oct 2015 00:35:21 +0000 Received: by padhk11 with SMTP id hk11so55687688pad.1 for ; Thu, 29 Oct 2015 17:35:19 -0700 (PDT) X-Received: by 10.66.233.104 with SMTP id tv8mr5219803pac.56.1446165319306; Thu, 29 Oct 2015 17:35:19 -0700 (PDT) Received: from [172.18.5.97] (50-205-143-34-static.hfc.comcastbusiness.net. [50.205.143.34]) by smtp.googlemail.com with ESMTPSA id yp5sm4462891pac.38.2015.10.29.17.35.18 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Oct 2015 17:35:18 -0700 (PDT) To: GCC Patches Cc: Jakub Jelinek From: Nathan Sidwell Subject: [libgomp] remove some unneeded args Message-ID: <5632BB45.2050800@acm.org> Date: Thu, 29 Oct 2015 17:35:17 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 The offload execution function doesn't need the sizes and kinds vectors describing the offloaded data -- that's already been handled and the vector of host and device addresses is sufficient. This patch removes those arguments. As we've already decided that we don't have to deal with version skew between libgomp and its plugins, this doesn't require versioning changes etc. Jakub, not sure if this patch falls under your review or not. Given ptx is the only current plugin, and this doesn't break backwards compatibility I figure it ok. nathan 2015-10-29 Nathan Sidwell * libgomp.h (struct acc_dispatch_t): Remove args from exec_func. * plugin/plugin-nvptx.c (nvptx_exec): Remove sizes & kinds arg. (GOMP_OFFLOAD_openacc_parallel): Likewise. * oacc-host.c (host_openacc_exec): Likewise. * oacc-parallel.c (GOACC_parallel_keyed): Adjust exec_func call. Index: libgomp/libgomp.h =================================================================== --- libgomp/libgomp.h (revision 229565) +++ libgomp/libgomp.h (working copy) @@ -812,8 +813,8 @@ typedef struct acc_dispatch_t struct target_mem_desc *data_environ; /* Execute. */ - void (*exec_func) (void (*) (void *), size_t, void **, void **, size_t *, - unsigned short *, int, unsigned *, void *); + void (*exec_func) (void (*) (void *), size_t, void **, void **, int, + unsigned *, void *); /* Async cleanup callback registration. */ void (*register_async_cleanup_func) (void *); Index: libgomp/plugin/plugin-nvptx.c =================================================================== --- libgomp/plugin/plugin-nvptx.c (revision 229565) +++ libgomp/plugin/plugin-nvptx.c (working copy) @@ -877,8 +877,7 @@ event_add (enum ptx_event_type type, CUe void nvptx_exec (void (*fn), size_t mapnum, void **hostaddrs, void **devaddrs, - size_t *sizes, unsigned short *kinds, int async, unsigned *dims, - void *targ_mem_desc) + int async, unsigned *dims, void *targ_mem_desc) { struct targ_fn_descriptor *targ_fn = (struct targ_fn_descriptor *) fn; CUfunction function; @@ -1653,11 +1652,9 @@ void (*device_run) (int n, void *fn_ptr, void GOMP_OFFLOAD_openacc_parallel (void (*fn) (void *), size_t mapnum, void **hostaddrs, void **devaddrs, - size_t *sizes, unsigned short *kinds, int async, unsigned *dims, void *targ_mem_desc) { - nvptx_exec (fn, mapnum, hostaddrs, devaddrs, sizes, kinds, - async, dims, targ_mem_desc); + nvptx_exec (fn, mapnum, hostaddrs, devaddrs, async, dims, targ_mem_desc); } void Index: libgomp/oacc-host.c =================================================================== --- libgomp/oacc-host.c (revision 229565) +++ libgomp/oacc-host.c (working copy) @@ -135,8 +135,6 @@ host_openacc_exec (void (*fn) (void *), size_t mapnum __attribute__ ((unused)), void **hostaddrs, void **devaddrs __attribute__ ((unused)), - size_t *sizes __attribute__ ((unused)), - unsigned short *kinds __attribute__ ((unused)), int async __attribute__ ((unused)), unsigned *dims __attribute ((unused)), void *targ_mem_desc __attribute__ ((unused))) Index: libgomp/oacc-parallel.c =================================================================== --- libgomp/oacc-parallel.c (revision 229565) +++ libgomp/oacc-parallel.c (working copy) @@ -175,8 +175,8 @@ GOACC_parallel_keyed (int device, void ( devaddrs[i] = (void *) (tgt->list[i].key->tgt->tgt_start + tgt->list[i].key->tgt_offset); - acc_dev->openacc.exec_func (tgt_fn, mapnum, hostaddrs, devaddrs, sizes, - kinds, async, dims, tgt); + acc_dev->openacc.exec_func (tgt_fn, mapnum, hostaddrs, devaddrs, + async, dims, tgt); /* If running synchronously, unmap immediately. */ if (async < acc_async_noval)