Hi! On 2019-06-07T15:08:37+0100, Julian Brown <jul...@codesourcery.com> 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 <ja...@redhat.com> wrote: >> > +/* Record vars listed in private clauses in CLAUSES in CTX. This >> > information >> > + 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 in > OpenACC contexts. > commit 6c2a018b940d0b132395048b0600f7d897319ee2 > Author: Julian Brown <jul...@codesourcery.com> > Date: Thu Aug 9 20:27:04 2018 -0700 > > [OpenACC] Add support for gang local storage allocation in shared memory > --- a/gcc/omp-low.c > +++ b/gcc/omp-low.c > @@ -8599,6 +8681,9 @@ lower_omp_for (gimple_stmt_iterator *gsi_p, omp_context > *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 = 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üße Thomas ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Frank Thürauf
>From 3a285ebd0cf5ab762726018515d23280fa6dd445 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge <tho...@codesourcery.com> 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