From patchwork Wed Nov 18 21:35:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Sidwell X-Patchwork-Id: 546214 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 40A9B141428 for ; Thu, 19 Nov 2015 08:35:58 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=VBenhqEH; 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 :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=ZkQqMksq9UdkoH1NuprLxUk1jj8nvsOzsOk5HUNs7pGQY2nBqQ jDmngrzCsrSFrO+zy5F0z3K81cVCqABe6UhtDhqUePJ3UiPzb/LoEedEYaMvqj+X t5BemXGIIuYYeb18vqdBbO18CDtaUy3DE8Lt7UF4U2iJ9TMOdWmrPsTQA= 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 :from:subject:message-id:date:mime-version:content-type; s= default; bh=oz+UwceENkQjlA9YrMYws++NOb4=; b=VBenhqEHwRFgjojYnKSm RQwtKtU1U1DPZoIj+qXzq2yW3XAZyxmAGRZtrtR0tKxlKObLD09Dhn5WnCbL1uAx 8apbOhVzbnurwRSb/QtXj2n55IAiMbYr+qqda8Rz3DqqnlZAlkbycCRQPbeWRoRZ E4A7CkkenkHG8HfPsET2KaY= Received: (qmail 4108 invoked by alias); 18 Nov 2015 21:35:51 -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 4098 invoked by uid 89); 18 Nov 2015 21:35:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-vk0-f42.google.com Received: from mail-vk0-f42.google.com (HELO mail-vk0-f42.google.com) (209.85.213.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 18 Nov 2015 21:35:49 +0000 Received: by vkfr145 with SMTP id r145so4509343vkf.1 for ; Wed, 18 Nov 2015 13:35:47 -0800 (PST) X-Received: by 10.31.182.212 with SMTP id g203mr1047586vkf.62.1447882547081; Wed, 18 Nov 2015 13:35:47 -0800 (PST) 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 x207sm775118vke.6.2015.11.18.13.35.46 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Nov 2015 13:35:46 -0800 (PST) To: GCC Patches From: Nathan Sidwell Subject: [ptx] remove workaround Message-ID: <564CEF32.7020400@acm.org> Date: Wed, 18 Nov 2015 16:35:46 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 I've committed this to trunk. Primarily it removes code working around the lack of default dimension setting -- I committed the defaulting code a little while ago and missed this piece. Fixed up some whitespace and ARG_UNUSED that I noticed along the way. nathan 2015-11-18 Nathan Sidwell * config/nvptx/nvptx.c (nvptx_process_pars): Fix whitespace. (nvptx_record_offload_symbol): Remove code compensating for lack of default dimension handling. (nvptx_goacc_validate_dims): Remove incorrect ARG_UNUSED markers. Index: gcc/config/nvptx/nvptx.c =================================================================== --- gcc/config/nvptx/nvptx.c (revision 230570) +++ gcc/config/nvptx/nvptx.c (working copy) @@ -3657,7 +3657,7 @@ nvptx_process_pars (parallel *par) if (par->mask & GOMP_DIM_MASK (GOMP_DIM_MAX)) /* No propagation needed for a call. */; - else if (par->mask & GOMP_DIM_MASK (GOMP_DIM_WORKER)) + else if (par->mask & GOMP_DIM_MASK (GOMP_DIM_WORKER)) { nvptx_wpropagate (false, par->forked_block, par->forked_insn); nvptx_wpropagate (true, par->forked_block, par->fork_insn); @@ -3694,7 +3694,7 @@ nvptx_neuter_pars (parallel *par, unsign if ((outer | me) & GOMP_DIM_MASK (mode)) {} /* Mode is partitioned: no neutering. */ else if (!(modes & GOMP_DIM_MASK (mode))) - {} /* Mode is not used: nothing to do. */ + {} /* Mode is not used: nothing to do. */ else if (par->inner_mask & GOMP_DIM_MASK (mode) || !par->forked_insn) /* Partitioned in inner parallels, or we're not a partitioned @@ -3910,31 +3910,17 @@ nvptx_record_offload_symbol (tree decl) case FUNCTION_DECL: { tree attr = get_oacc_fn_attrib (decl); - tree dims = NULL_TREE; + tree dims = TREE_VALUE (attr); unsigned ix; - if (attr) - dims = TREE_VALUE (attr); fprintf (asm_out_file, "//:FUNC_MAP \"%s\"", IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl))); - for (ix = 0; ix != GOMP_DIM_MAX; ix++) + for (ix = 0; ix != GOMP_DIM_MAX; ix++, dims = TREE_CHAIN (dims)) { - int size = 1; + int size = TREE_INT_CST_LOW (TREE_VALUE (dims)); - /* TODO: This check can go away once the dimension default - machinery is merged to trunk. */ - if (dims) - { - tree dim = TREE_VALUE (dims); - - if (dim) - size = TREE_INT_CST_LOW (dim); - - gcc_assert (!TREE_PURPOSE (dims)); - dims = TREE_CHAIN (dims); - } - + gcc_assert (!TREE_PURPOSE (dims)); fprintf (asm_out_file, ", %#x", size); } @@ -4186,8 +4172,7 @@ nvptx_expand_builtin (tree exp, rtx targ routine might spawn a loop. It is negative for non-routines. */ static bool -nvptx_goacc_validate_dims (tree ARG_UNUSED (decl), int *ARG_UNUSED (dims), - int ARG_UNUSED (fn_level)) +nvptx_goacc_validate_dims (tree decl, int dims[], int fn_level) { bool changed = false;