From patchwork Fri Aug 21 18:34:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Sidwell X-Patchwork-Id: 509621 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 7B9331401CB for ; Sat, 22 Aug 2015 04:35:02 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=IedLZkAo; 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=rEXt+11ewKA7QpJ54eX1wQtcG7jezvFNKCvTbbgBTa2cdSeLFO fKWnREW3X+KWW5HH0spvrA0AkMeMA9THB+VHRLoH/hdGhRdL/uxVMcy2C0fqOD7g 33QD2eujCiYxUmMdhwYZWhUhRhjfTIWWZ4WG8O5WaS0emUmd7F50yoTPY= 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=0/uuM9Yux9tldZbT/yyt1GEYc+k=; b=IedLZkAo9O/HIqpcRvlI UBL4+1lwZTJxDaUlKlOlItGvmtB+cFwu3AJSbsAHktMUyENGjhMdbdZfM/ulMG3z NFwC42HXnoMO1tXKuKmkMBn7gFlJRVKJ5fBQHaDWYAQf1hJFqM0Yv1t03N8ndlM/ uYgnI7OHMEmQqizRCrTL19w= Received: (qmail 48101 invoked by alias); 21 Aug 2015 18:34:56 -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 48091 invoked by uid 89); 21 Aug 2015 18:34:55 -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-f41.google.com Received: from mail-qg0-f41.google.com (HELO mail-qg0-f41.google.com) (209.85.192.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 21 Aug 2015 18:34:54 +0000 Received: by qgj62 with SMTP id 62so52038005qgj.2 for ; Fri, 21 Aug 2015 11:34:52 -0700 (PDT) X-Received: by 10.141.28.146 with SMTP id f140mr21750840qhe.101.1440182092103; Fri, 21 Aug 2015 11:34:52 -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 m6sm4901820qkl.35.2015.08.21.11.34.51 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Aug 2015 11:34:51 -0700 (PDT) To: GCC Patches From: Nathan Sidwell Subject: [gomp4] fix breakage Message-ID: <55D76F4A.6090205@acm.org> Date: Fri, 21 Aug 2015 14:34:50 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 Alas, I broke gomp4 nvptx build. Fixed thusly. nathan 2015-08-21 Nathan Sidwell * config/nvptx/nvptx.md (oacc_fork, oacc_join): Adjust expand calls. * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining): New. Broken out of ... (nvptx_expand_oacc_fork, nvptx_expand_oacc_join): ... here. Restore to take mode. Index: config/nvptx/nvptx.c =================================================================== --- config/nvptx/nvptx.c (revision 227080) +++ config/nvptx/nvptx.c (working copy) @@ -1165,11 +1165,10 @@ nvptx_expand_compare (rtx compare) return gen_rtx_NE (BImode, pred, const0_rtx); } +/* Emit forking instructions for MASK. */ -/* Expand the oacc fork & join primitive into ptx-required unspecs. */ - -void -nvptx_expand_oacc_fork (unsigned mask) +static void +nvptx_emit_forking (unsigned mask) { mask &= (GOMP_DIM_MASK (GOMP_DIM_WORKER) | GOMP_DIM_MASK (GOMP_DIM_VECTOR)); @@ -1184,8 +1183,10 @@ nvptx_expand_oacc_fork (unsigned mask) } } -void -nvptx_expand_oacc_join (unsigned mask) +/* Emit joining instructions for MASK. */ + +static void +nvptx_emit_joining (unsigned mask) { mask &= (GOMP_DIM_MASK (GOMP_DIM_WORKER) | GOMP_DIM_MASK (GOMP_DIM_VECTOR)); @@ -1199,6 +1200,20 @@ nvptx_expand_oacc_join (unsigned mask) } } +/* Expand the oacc fork & join primitive into ptx-required unspecs. */ + +void +nvptx_expand_oacc_fork (unsigned mode) +{ + nvptx_emit_forking (GOMP_DIM_MASK (mode)); +} + +void +nvptx_expand_oacc_join (unsigned mode) +{ + nvptx_emit_joining (GOMP_DIM_MASK (mode)); +} + /* Expander for reduction locking and unlocking. We expect SRC to be gang or worker level. */ Index: config/nvptx/nvptx.md =================================================================== --- config/nvptx/nvptx.md (revision 227080) +++ config/nvptx/nvptx.md (working copy) @@ -1418,7 +1418,7 @@ UNSPECV_FORKED)] "" { - nvptx_expand_oacc_fork (GOMP_DIM_MASK (INTVAL (operands[0]))); + nvptx_expand_oacc_fork (INTVAL (operands[0])); DONE; }) @@ -1427,7 +1427,7 @@ UNSPECV_JOIN)] "" { - nvptx_expand_oacc_join (GOMP_DIM_MASK (INTVAL (operands[0]))); + nvptx_expand_oacc_join (INTVAL (operands[0])); DONE; })