From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id 048623858C83; Tue, 18 Oct 2022 14:59:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 048623858C83 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.95,193,1661846400"; d="scan'208";a="84970396" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 18 Oct 2022 06:59:39 -0800 IronPort-SDR: XvRfP1S0CxuKhUZNWZqs1MHzgwz+DbExQ+HeO0msm0aITL+JpLf2U6AVxhZ2TVclYvDSeH18a7 DyOZsK0+ct+N/s/M0E79LzZLo9lMgqnf7KZaYr4Qv+S4zWNrjyzZblfm5OJ5ihxXLjEfJTtTWB t5FFifeDqCJFat/iD+qXWnXaI2lOOwRAsdPzpsN4OSK8845KqthsbpqO5JPJx4Hcuir7KTvmlH qfqjyXjaLzznwkCilzS+6SD11EKU9cE9h8h5CvGBqSI7AbmDmW742jflZodC2eiH390jc+YVNC YEU= Date: Tue, 18 Oct 2022 15:59:24 +0100 From: Julian Brown To: Thomas Schwinge CC: Andrew Stubbs , , Subject: Re: [PATCH] [og12] OpenACC: Don't gang-privatize artificial variables Message-ID: <20221018155924.058c4b6c@squid.athome> In-Reply-To: <878rldur4g.fsf@euler.schwinge.homeip.net> References: <20221014133856.3388109-1-julian@codesourcery.com> <20221014133856.3388109-2-julian@codesourcery.com> <878rldur4g.fsf@euler.schwinge.homeip.net> Organization: Mentor Graphics X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: svr-orw-mbx-08.mgc.mentorg.com (147.34.90.208) To svr-ies-mbx-11.mgc.mentorg.com (139.181.222.11) X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Tue, 18 Oct 2022 16:46:07 +0200 Thomas Schwinge wrote: > Hi Julian! > > On 2022-10-14T13:38:56+0000, Julian Brown > wrote: > ..., but to my surprised, that did fire in one occasion: > > > --- a/libgomp/testsuite/libgomp.oacc-fortran/privatized-ref-2.f90 > > +++ b/libgomp/testsuite/libgomp.oacc-fortran/privatized-ref-2.f90 > > @@ -94,9 +94,7 @@ contains > > !$acc parallel copy(array) > > !$acc loop gang private(array) ! { dg-line l_loop[incr c_loop] > > } ! { dg-note {variable 'i' in 'private' clause isn't candidate for > > adjusting OpenACC privatization level: not addressable} "" { target > > *-*-* } l_loop$c_loop } > > - ! { dg-note {variable 'array\.[0-9]+' in 'private' clause is > > candidate for adjusting OpenACC privatization level} "" { target > > *-*-* } l_loop$c_loop } > > - ! { dg-note {variable 'array\.[0-9]+' ought to be adjusted for > > OpenACC privatization level: 'gang'} "" { target *-*-* } > > l_loop$c_loop } > > - ! { dg-note {variable 'array\.[0-9]+' adjusted for OpenACC > > privatization level: 'gang'} "" { target { ! { > > openacc_host_selected || { openacc_nvidia_accel_selected && > > __OPTIMIZE__ } } } } l_loop$c_loop } > > + ! { dg-note {variable 'array\.[0-9]+' in 'private' clause > > isn't candidate for adjusting OpenACC privatization level: > > artificial} "" { target *-*-* } l_loop$c_loop } ! { dg-message > > {sorry, unimplemented: target cannot support alloca} PR65181 { > > target openacc_nvidia_accel_selected } l_loop$c_loop } do i = 1, 10 > > array(i) = 9*i > > ... here. Note "variable 'array\.[0-9]+' in 'private' clause"; > everywhere else we have "declared in block". > > As part of your verification, have you already looked into whether the > new behavior is correct here, or does this one need to continue to be > "adjusted for OpenACC privatization level: 'gang'"? If the latter, > should we check 'if (res && block && DECL_ARTIFICIAL (decl))' instead > of 'if (res && DECL_ARTIFICIAL (decl))', or is there some wrong > setting of 'DECL_ARTIFICIAL' -- or are we maybe looking at an > inappropriate 'decl'? (Thinking of commit > r12-7580-g7a5e036b61aa088e6b8564bc9383d37dfbb4801e "[OpenACC > privatization] Analyze 'lookup_decl'-translated DECL [PR90115, > PR102330, PR104774]", for example.) I haven't looked in detail, but it seems to me that the "artificial" flag isn't appropriate for that decl, which is (derived from?) a user-visible symbol. So, I'm not sure what's going on there (and yes the commit you mention looks like it could be relevant, I think?). There are probably subtleties I'm not aware of... HTH, Julian