From patchwork Wed Jun 29 09:19:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 641937 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 3rfcZF0zKTz9t0n for ; Wed, 29 Jun 2016 19:19:32 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=BU6c+GCy; 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:from :to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type:content-transfer-encoding; q=dns; s= default; b=AmY2QliL12EshDfXmWO+m2sRefWsQHYvP8y8TccljDlKG0JPkjG+Y xHZ1SkyxAE2wWws1ixOyA2F5kRX49iKDQrYGTsYJ0iDShdiy+tEoZ4HbEqc60B6p 2V2dUAn3kAK3yAfk803BXG4sBJK7pG3M/wwBKeUABqIU2YGifLbFe0= 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:from :to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type:content-transfer-encoding; s=default; bh=igBwoGdEiBcWyLW/gybkl2Oxlrk=; b=BU6c+GCyiHaB5dhT+AO5X3qwtedY HEf9Q0xqwr4Awx7D14ECgi9qAwXTojVStI87H3lfFx9iPSgf+bLmyPKxpjrlxINy t5NcgT2Tp96kYoIs39/eCnwRpkW5XCjGpPW+bouyFrkY+5n+UEBwgZ+GUYuuTQeX ryI8fzALVNy1VeE= Received: (qmail 100753 invoked by alias); 29 Jun 2016 09:19:19 -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 100728 invoked by uid 89); 29 Jun 2016 09:19:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=anticipated, tschwinge X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 29 Jun 2016 09:19:07 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1bIBeD-0004BO-KH from Thomas_Schwinge@mentor.com ; Wed, 29 Jun 2016 02:19:05 -0700 Received: from hertz.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.224.2; Wed, 29 Jun 2016 10:19:04 +0100 From: Thomas Schwinge To: Jakub Jelinek , CC: Subject: Rename PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE (was: Clarify PRAGMA_OACC_* and PRAGMA_OMP_*) In-Reply-To: <20160628122026.GY7387@tucnak.redhat.com> References: <8737nxpl3v.fsf@hertz.schwinge.homeip.net> <20160628122026.GY7387@tucnak.redhat.com> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu) Date: Wed, 29 Jun 2016 11:19:03 +0200 Message-ID: <87r3bgnyig.fsf@hertz.schwinge.homeip.net> MIME-Version: 1.0 Hi! On Tue, 28 Jun 2016 14:20:26 +0200, Jakub Jelinek wrote: > On Tue, Jun 28, 2016 at 02:13:24PM +0200, Thomas Schwinge wrote: > > Looking at how OpenMP declare simd is handled in the C++ front end, I ran > > into it being parsed for PRAGMA_OMP_DECLARE_REDUCTION, which got me > > confused. OK to commit the following to un-confuse this, in that > > PRAGMA_OACC_* and PRAGMA_OMP_* don't describe what *eventually* is to be > > parsed (which (nowadays?) is wrong for PRAGMA_OMP_DECLARE_REDUCTION, > > anyway), but instead they describe what *so far* has been parsed. > > I think I'd prefer if anything just to change PRAGMA_OMP_DECLARE_REDUCTION > to PRAGMA_OMP_DECLARE (as the only case where there is any ambiguity) and > nothing else, the rest would be more confusing than it is now. I anticipated that you would say something along these lines... Thanks at least for permitting to clarify PRAGMA_OMP_DECLARE_REDUCTION. > > commit fa557f6ad39992052decb413501c713db8ec59f0 > > Author: Thomas Schwinge > > Date: Tue Jun 28 14:12:23 2016 +0200 > > > > Clarify PRAGMA_OACC_* and PRAGMA_OMP_* > > > > gcc/c-family/ > > * c-pragma.h (enum pragma_kind): Rename PRAGMA_OACC_ENTER_DATA to > > PRAGMA_OACC_ENTER, PRAGMA_OACC_EXIT_DATA to PRAGMA_OACC_EXIT, > > PRAGMA_OMP_CANCELLATION_POINT to PRAGMA_OMP_CANCELLATION, > > PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE, > > PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END. Adjust all > > users. Committed in r237842: commit a4dd89cbd9a89bf7b4544cf0576b3607a0a7f281 Author: tschwinge Date: Wed Jun 29 09:07:52 2016 +0000 Rename PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE gcc/c-family/ * c-pragma.h (enum pragma_kind): Rename PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all users. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@237842 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/c-family/ChangeLog | 6 ++++++ gcc/c-family/c-pragma.c | 2 +- gcc/c-family/c-pragma.h | 2 +- gcc/c/c-parser.c | 4 ++-- gcc/cp/parser.c | 4 ++-- 5 files changed, 12 insertions(+), 6 deletions(-) Grüße Thomas diff --git gcc/c-family/ChangeLog gcc/c-family/ChangeLog index d5b8395..679cb6b 100644 --- gcc/c-family/ChangeLog +++ gcc/c-family/ChangeLog @@ -1,3 +1,9 @@ +2016-06-29 Thomas Schwinge + + * c-pragma.h (enum pragma_kind): Rename + PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all + users. + 2016-06-29 Richard Biener PR middle-end/71002 diff --git gcc/c-family/c-pragma.c gcc/c-family/c-pragma.c index c73aa82..277bc56 100644 --- gcc/c-family/c-pragma.c +++ gcc/c-family/c-pragma.c @@ -1286,7 +1286,7 @@ static const struct omp_pragma_def omp_pragmas[] = { { "threadprivate", PRAGMA_OMP_THREADPRIVATE } }; static const struct omp_pragma_def omp_pragmas_simd[] = { - { "declare", PRAGMA_OMP_DECLARE_REDUCTION }, + { "declare", PRAGMA_OMP_DECLARE }, { "distribute", PRAGMA_OMP_DISTRIBUTE }, { "for", PRAGMA_OMP_FOR }, { "parallel", PRAGMA_OMP_PARALLEL }, diff --git gcc/c-family/c-pragma.h gcc/c-family/c-pragma.h index 65f10db..6d9cb08 100644 --- gcc/c-family/c-pragma.h +++ gcc/c-family/c-pragma.h @@ -46,7 +46,7 @@ enum pragma_kind { PRAGMA_OMP_CANCEL, PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_CRITICAL, - PRAGMA_OMP_DECLARE_REDUCTION, + PRAGMA_OMP_DECLARE, PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_FLUSH, diff --git gcc/c/c-parser.c gcc/c/c-parser.c index 7f491f1..1d2dac7 100644 --- gcc/c/c-parser.c +++ gcc/c/c-parser.c @@ -10215,7 +10215,7 @@ c_parser_pragma (c_parser *parser, enum pragma_context context, bool *if_p) c_parser_skip_until_found (parser, CPP_PRAGMA_EOL, NULL); return false; - case PRAGMA_OMP_DECLARE_REDUCTION: + case PRAGMA_OMP_DECLARE: c_parser_omp_declare (parser, context); return false; @@ -16381,7 +16381,7 @@ c_parser_omp_declare_simd (c_parser *parser, enum pragma_context context) while (c_parser_next_token_is (parser, CPP_PRAGMA)) { if (c_parser_peek_token (parser)->pragma_kind - != PRAGMA_OMP_DECLARE_REDUCTION + != PRAGMA_OMP_DECLARE || c_parser_peek_2nd_token (parser)->type != CPP_NAME || strcmp (IDENTIFIER_POINTER (c_parser_peek_2nd_token (parser)->value), diff --git gcc/cp/parser.c gcc/cp/parser.c index d1f06fd..739fca0 100644 --- gcc/cp/parser.c +++ gcc/cp/parser.c @@ -37203,7 +37203,7 @@ cp_parser_pragma (cp_parser *parser, enum pragma_context context, bool *if_p) parser->lexer->in_pragma = true; id = cp_parser_pragma_kind (pragma_tok); - if (id != PRAGMA_OMP_DECLARE_REDUCTION && id != PRAGMA_OACC_ROUTINE) + if (id != PRAGMA_OMP_DECLARE && id != PRAGMA_OACC_ROUTINE) cp_ensure_no_omp_declare_simd (parser); switch (id) { @@ -37310,7 +37310,7 @@ cp_parser_pragma (cp_parser *parser, enum pragma_context context, bool *if_p) cp_parser_omp_threadprivate (parser, pragma_tok); return false; - case PRAGMA_OMP_DECLARE_REDUCTION: + case PRAGMA_OMP_DECLARE: cp_parser_omp_declare (parser, pragma_tok, context); return false;