From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id 04B3B3857C56 for ; Fri, 21 May 2021 19:06:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 04B3B3857C56 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Thomas_Schwinge@mentor.com IronPort-SDR: E/24lEY2FiSSxAsqYW3fBlpeHoilN1ve4yEreHlIb6oWTu5y1S1ftdxmuI1Pkvs95GE+ZggtFf LlmXRhX0kOcmtvi5jjhsb4Kpy8SJWQ8WSUaeO4+kW05Yxs1Iuv3iA492TRSvgX4Cegk5BMYdbE Mi9rsy6qCycDI5SEzJAkZgBo5RzZuOvDbVw0f+bnYMqcZsiVGu7sckRklVpx/Ofmmb3ERwAbKs 0hzqo9SAOaPd5LHP2oeZqBDcbnCaHRVoC6oWnmZgk8bQU45q4DbCbWzqukCThB/UzyA57DEeTX fT0= X-IronPort-AV: E=Sophos;i="5.82,319,1613462400"; d="scan'208,223";a="63915323" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 21 May 2021 11:06:03 -0800 IronPort-SDR: wTAyZILeNiz2Pnd+KTkc5uVMaxeuXqm3ljU386pQQc/7Syz4MwKHVCtb7ttgPCfaJoQnz1bh4z 7aJJ1uzXBYLcteg9nC8IDCHvLIjc4RiZpbwy6LX/DBj8ge/ylWBL7+DeGixjEW85bl8njthA8S MRIushcfR16HWzLMJljtgkY6UeIrshYuIq1rPIm6YHY/MJ7F+Q+sLtcH1ioxQZf52AhYU43NMW F10SjNSqf75fA3MDjk93l/cxrqJbwJim//tqRirp0tlVaM7pe4wqUeX+3q7IqRqMeqlXe/aKYx MM0= From: Thomas Schwinge To: Julian Brown , Jakub Jelinek , Subject: Re: [PATCH, OpenACC] Add support for gang local storage allocation in shared memory In-Reply-To: <20190607150837.299df55b@squid.athome> References: <20180813172151.6bfcece3@squid.athome> <524d9017-e7f0-87a2-6a62-9b23abd65ac2@codesourcery.com> <94ac317d-5e4c-7738-4b22-b59d29dc114a@codesourcery.com> <20180815174637.7f7f9666@squid.athome> <1532490C-015A-4F89-8512-FD9751C7EEA4@gmail.com> <20180816164643.01e26476@squid.athome> <20181211150811.47a032cf@squid.athome> <20190603170245.4a62a0ad@squid.athome> <20190603162300.GR19695@tucnak> <20190607150837.299df55b@squid.athome> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/27.1 (x86_64-pc-linux-gnu) Date: Fri, 21 May 2021 21:05:55 +0200 Message-ID: <87a6onzz3g.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-09.mgc.mentorg.com (139.181.222.9) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2021 19:06:06 -0000 --=-=-= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi! On 2019-06-07T15:08:37+0100, Julian Brown wrote: > Hi Jakub, > > Thanks for the review! I believe I've addressed all your comments in > the attached version of the patch. > > On Mon, 3 Jun 2019 18:23:00 +0200 > Jakub Jelinek wrote: >> > +/* Record vars listed in private clauses in CLAUSES in CTX. This inf= ormation >> > + is used to mark up variables that should be made private per-gang.= */ >> > + >> > +static void >> > +oacc_record_private_var_clauses (omp_context *ctx, tree clauses) >> > +{ >> > + [...] >> > +} >> >> You don't want to do this for all GOMP_FOR or GOMP_TARGET context, >> I'd hope you only want to do that for OpenACC contexts. > I've [...] fixed the patch to only call oacc_record_private_var_clauses i= n > OpenACC contexts. > commit 6c2a018b940d0b132395048b0600f7d897319ee2 > Author: Julian Brown > Date: Thu Aug 9 20:27:04 2018 -0700 > > [OpenACC] Add support for gang local storage allocation in shared mem= ory > --- a/gcc/omp-low.c > +++ b/gcc/omp-low.c > @@ -8599,6 +8681,9 @@ lower_omp_for (gimple_stmt_iterator *gsi_p, omp_con= text *ctx) > > push_gimplify_context (); > > + if (is_gimple_omp_oacc (ctx->stmt)) > + oacc_record_private_var_clauses (ctx, gimple_omp_for_clauses (stmt))= ; > + > lower_omp (gimple_omp_for_pre_body_ptr (stmt), ctx); > > block =3D make_node (BLOCK); So, yes -- but then, apparently, that again got lost in a later version of the patch. ;-) I've pushed "[OpenACC privatization] Don't evaluate OpenMP 'for' clauses [PR90115]" to master branch in commit 3a285ebd0cf5ab762726018515d23280fa6dd445, see attached. Gr=C3=BC=C3=9Fe Thomas ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 M=C3=BCnchen R= egistergericht M=C3=BCnchen HRB 106955, Gesch=C3=A4ftsf=C3=BChrer: Thomas H= eurung, Frank Th=C3=BCrauf --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename="0001-OpenACC-privatization-Don-t-evaluate-OpenMP-for-clau.patch" >From 3a285ebd0cf5ab762726018515d23280fa6dd445 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Thu, 20 May 2021 15:22:24 +0200 Subject: [PATCH] [OpenACC privatization] Don't evaluate OpenMP 'for' clauses [PR90115] gcc/ PR middle-end/90115 * omp-low.c (lower_omp_for): Don't evaluate OpenMP 'for' clauses. --- gcc/omp-low.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/omp-low.c b/gcc/omp-low.c index da827ef2e34..a86c6c1e82c 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -11067,7 +11067,8 @@ lower_omp_for (gimple_stmt_iterator *gsi_p, omp_context *ctx) push_gimplify_context (); - oacc_privatization_scan_clause_chain (ctx, gimple_omp_for_clauses (stmt)); + if (is_gimple_omp_oacc (ctx->stmt)) + oacc_privatization_scan_clause_chain (ctx, gimple_omp_for_clauses (stmt)); lower_omp (gimple_omp_for_pre_body_ptr (stmt), ctx); -- 2.30.2 --=-=-=--