From patchwork Thu Oct 29 08:22:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 537719 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 B838314031C for ; Thu, 29 Oct 2015 19:23:15 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=PI3vjmjJ; 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; q=dns; s=default; b=Wp8SB5mNZYHBqLFl 2TOCkHa+4uZbWDep/34SiK+gHuPiJ8IU5qddBlWE2q+A5AetzNleNthbQ1QbBWzs hnnHq01dxLugk4Emg74MWVYOxp1l2IpZN7aNpaHEJdj5siWDnz2Lvl+vOFHyNjJJ Kw0zNWRq5zlzx3432EdEteY7u3s= 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; s=default; bh=bwcuORszBNZ/Hl/WEOk3SU uMar8=; b=PI3vjmjJkMFc6vSUSQd6jZSEjxWrgNStpCF7CXMybcGWHJmAroNOd8 YrH+fYoPJQtWDf6kQLszDTy/YrnHGZr5hQeEY3fntI66a6dnDQFiqOP1lpDKRBeG wtmpv4kNuEXNgzI8FRXH5qwGvaDZD+PNT4lnCuCFOhKD1SNtl4cZs= Received: (qmail 50087 invoked by alias); 29 Oct 2015 08:23:08 -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 50069 invoked by uid 89); 29 Oct 2015 08:23:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 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 ESMTP; Thu, 29 Oct 2015 08:23:06 +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 1ZriUB-0007Zu-0t from Thomas_Schwinge@mentor.com for gcc-patches@gcc.gnu.org; Thu, 29 Oct 2015 01:23:03 -0700 Received: from feldtkeller.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; Thu, 29 Oct 2015 08:23:01 +0000 From: Thomas Schwinge To: GCC Patches CC: Nathan Sidwell Subject: Re: [gomp4] OpenACC first private In-Reply-To: <55BF7B19.7000409@acm.org> References: <55BF7B19.7000409@acm.org> User-Agent: Notmuch/0.9-125-g4686d11 (http://notmuchmail.org) Emacs/24.5.1 (i586-pc-linux-gnu) Date: Thu, 29 Oct 2015 09:22:40 +0100 Message-ID: <87mvv23wz3.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Hi! On Mon, 3 Aug 2015 10:30:49 -0400, Nathan Sidwell wrote: > I've committed this patch to gomp4. The existing implementation of firstprivate > presumes the existence of memory at the CTA level. This patch does away with > that, treating firstprivate as thread-private variables initialized from the > host. > --- gcc/fortran/openmp.c (revision 226462) > +++ gcc/fortran/openmp.c (working copy) > @@ -586,22 +586,12 @@ gfc_match_omp_clauses (gfc_omp_clauses * > &c->lists[OMP_LIST_PRIVATE], true) > == MATCH_YES) > continue; > - if (mask & OMP_CLAUSE_FIRSTPRIVATE) > - { > - if (openacc) > - { > - if (gfc_match ("firstprivate ( ") == MATCH_YES > - && gfc_match_omp_map_clause (&c->lists[OMP_LIST_MAP], > - OMP_MAP_GANGLOCAL, false)) Turns out, this has been the last (only?) user of gfc_match_omp_map_clause to specify false for "allow_sections". We once had added the latter; removed on gomp-4_0-branch in r229516: commit 64fec7e145a784ec1e5844a8296e8a39aeea092d Author: tschwinge Date: Thu Oct 29 08:21:11 2015 +0000 Cleanup: gfc_match_omp_map_clause gcc/fortran/ * openmp.c (gfc_match_omp_map_clause): Remove allow_sections formal parameter. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gomp-4_0-branch@229516 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/ChangeLog.gomp | 5 +++++ gcc/fortran/openmp.c | 8 +++----- 2 files changed, 8 insertions(+), 5 deletions(-) Grüße Thomas diff --git gcc/fortran/ChangeLog.gomp gcc/fortran/ChangeLog.gomp index 2cc161a..7fe3eac 100644 --- gcc/fortran/ChangeLog.gomp +++ gcc/fortran/ChangeLog.gomp @@ -1,3 +1,8 @@ +2015-10-29 Thomas Schwinge + + * openmp.c (gfc_match_omp_map_clause): Remove allow_sections + formal parameter. + 2015-10-28 Cesar Philippidis * trans-openmp.c (gfc_filter_oacc_combined_clauses): Don't zero- diff --git gcc/fortran/openmp.c gcc/fortran/openmp.c index afcce9a..a2c5105 100644 --- gcc/fortran/openmp.c +++ gcc/fortran/openmp.c @@ -482,12 +482,10 @@ match_oacc_clause_gang (gfc_omp_clauses *cp) mapping. */ static bool -gfc_match_omp_map_clause (gfc_omp_namelist **list, gfc_omp_map_op map_op, - bool allow_sections = true) +gfc_match_omp_map_clause (gfc_omp_namelist **list, gfc_omp_map_op map_op) { gfc_omp_namelist **head = NULL; - if (gfc_match_omp_variable_list ("", list, false, NULL, &head, - allow_sections) + if (gfc_match_omp_variable_list ("", list, false, NULL, &head, true) == MATCH_YES) { gfc_omp_namelist *n; @@ -592,7 +590,7 @@ gfc_match_omp_clauses (gfc_omp_clauses **cp, uint64_t mask, && gfc_match_omp_variable_list ("firstprivate (", &c->lists[OMP_LIST_FIRSTPRIVATE], true) - == MATCH_YES) + == MATCH_YES) continue; if ((mask & OMP_CLAUSE_LASTPRIVATE) && gfc_match_omp_variable_list ("lastprivate (",