From patchwork Mon Oct 12 00:02:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Sidwell X-Patchwork-Id: 528871 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 6CAED1401F0 for ; Mon, 12 Oct 2015 11:03:04 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=dNTlypU+; 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=XxpDfTRjVJ9Ku+5IljdTMtXkRE5lPZAFC1zbWzSEX3Jv6RaSak W0pecz4xaTsqQpfgPxhVbVHDUFz0kpj92DP45P8pNNFEdlPKGifQCxmHpMm5eI4k htnIYGEeVB3w7xrAGV1JHuQGZJrSTOoY+ZzIx8V8QDGypb6SfaVF/2hS0= 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=tY6a40Ag3crA45BVouhcAGxG/VM=; b=dNTlypU++/EMZ7BjiFJQ PPfFdbaeAeiswdJSviS3/+nPeBnlBpGK3TOLsal5Me0aV5PM2xcARwELV5zMpApo WgsCJRpLSKqrFdnPemQQ/icncXVDFglEJL2hIs+WMRNKqdDwvmrTnZ0qyD0ObXez +517k6uh1AxlPNQosHO69X8= Received: (qmail 92652 invoked by alias); 12 Oct 2015 00:02:57 -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 92642 invoked by uid 89); 12 Oct 2015 00:02:56 -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-qk0-f181.google.com Received: from mail-qk0-f181.google.com (HELO mail-qk0-f181.google.com) (209.85.220.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 12 Oct 2015 00:02:55 +0000 Received: by qkas79 with SMTP id s79so52993520qka.0 for ; Sun, 11 Oct 2015 17:02:53 -0700 (PDT) X-Received: by 10.55.23.140 with SMTP id 12mr28943905qkx.90.1444608173232; Sun, 11 Oct 2015 17:02:53 -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 f66sm6109505qkf.33.2015.10.11.17.02.52 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Oct 2015 17:02:52 -0700 (PDT) To: GCC Patches From: Nathan Sidwell Subject: [gomp4] internal fn cleanup Message-ID: <561AF8AC.6090200@acm.org> Date: Sun, 11 Oct 2015 20:02:52 -0400 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 gomp4 1) move IFN_UNIQUE constants to the IFN_UNIQUE function definition 2) Update IFN_GOACC_REDUCTION_* comments to match the renamed oacc_device_lower pass. nathan 2015-10-11 Nathan Sidwell * internal-fn.def (IFN_UNIQUE_UNSPEC, IFN_UNIQUE_OACC_FORK, IFN_UNIQUE_OACC_JOIN): Move to IFN_UNIQUE definition. * internal-fn.c (expand_GOACC_REDUCTION_*): Correct comments. Index: internal-fn.c =================================================================== --- internal-fn.c (revision 228677) +++ internal-fn.c (working copy) @@ -2026,7 +2026,7 @@ expand_GOACC_DIM_POS (gcall *ARG_UNUSED #endif } -/* This should get expanded in oacc_transform. */ +/* All the GOACC_REDUCTION variants get expanded in oacc_device_lower. */ static void expand_GOACC_REDUCTION_SETUP (gcall *stmt ATTRIBUTE_UNUSED) @@ -2034,24 +2034,18 @@ expand_GOACC_REDUCTION_SETUP (gcall *stm gcc_unreachable (); } -/* This should get expanded in oacc_transform. */ - static void expand_GOACC_REDUCTION_INIT (gcall *stmt ATTRIBUTE_UNUSED) { gcc_unreachable (); } -/* This should get expanded in oacc_transform. */ - static void expand_GOACC_REDUCTION_FINI (gcall *stmt ATTRIBUTE_UNUSED) { gcc_unreachable (); } -/* This should get expanded in oacc_transform. */ - static void expand_GOACC_REDUCTION_TEARDOWN (gcall *stmt ATTRIBUTE_UNUSED) { Index: internal-fn.def =================================================================== --- internal-fn.def (revision 228677) +++ internal-fn.def (working copy) @@ -67,10 +67,17 @@ DEF_INTERNAL_FN (GOACC_DATA_END_WITH_ARG /* An unduplicable, uncombinable function. Generally used to preserve a CFG property in the face of jump threading, tail merging or - other such optimizations. The optional first argument distinguishes + other such optimizations. The first argument distinguishes between uses. Other arguments are as needed for use. The return - type depends on use too. */ + type depends on use too. */ DEF_INTERNAL_FN (UNIQUE, ECF_NOTHROW | ECF_LEAF, NULL) +#define IFN_UNIQUE_UNSPEC 0 /* Undifferentiated UNIQUE. */ + +/* FORK and JOIN mark the points at which OpenACC partitioned + execution is entered or exited. They take an INTEGER_CST argument, + indicating the axis of forking or joining and return nothing. */ +#define IFN_UNIQUE_OACC_FORK 1 +#define IFN_UNIQUE_OACC_JOIN 2 /* DIM_SIZE and DIM_POS return the size of a particular compute dimension and the executing thread's position within that @@ -99,11 +106,3 @@ DEF_INTERNAL_FN (GOACC_REDUCTION_INIT, E DEF_INTERNAL_FN (GOACC_REDUCTION_FINI, ECF_NOTHROW, NULL) DEF_INTERNAL_FN (GOACC_REDUCTION_TEARDOWN, ECF_NOTHROW, NULL) -/* IFN_UNIQUE uses an INTEGER_CST first argument to discriminate use. */ -#define IFN_UNIQUE_UNSPEC 0 - -/* FORK and JOIN mark the points at which partitioned execution is - entered or exited. They take an INTEGER_CST argument, indicating - the axis of forking or joining and return nothing. */ -#define IFN_UNIQUE_OACC_FORK 1 -#define IFN_UNIQUE_OACC_JOIN 2