From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.intec.unl.edu.ar (intec.santafe-conicet.gob.ar [200.9.237.140]) by sourceware.org (Postfix) with ESMTPS id 09AAF3865C2D; Tue, 2 Feb 2021 14:29:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 09AAF3865C2D Received: from localhost (localhost [127.0.0.1]) by mail.intec.unl.edu.ar (Postfix) with ESMTP id 169EE28343F; Tue, 2 Feb 2021 11:32:49 -0300 (ART) Received: from mail.intec.unl.edu.ar ([127.0.0.1]) by localhost (mail.intec.unl.edu.ar [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id vrjokHzVza-C; Tue, 2 Feb 2021 11:32:47 -0300 (ART) Received: from localhost (localhost [127.0.0.1]) by mail.intec.unl.edu.ar (Postfix) with ESMTP id 28BD1283B98; Tue, 2 Feb 2021 11:32:47 -0300 (ART) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.intec.unl.edu.ar 28BD1283B98 X-Virus-Scanned: amavisd-new at intec.unl.edu.ar Received: from mail.intec.unl.edu.ar ([127.0.0.1]) by localhost (mail.intec.unl.edu.ar [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ptCOeyIkqYm7; Tue, 2 Feb 2021 11:32:47 -0300 (ART) Received: from mail.intec.unl.edu.ar (mail.intranet [192.168.0.134]) by mail.intec.unl.edu.ar (Postfix) with ESMTP id DF84528343F; Tue, 2 Feb 2021 11:32:46 -0300 (ART) Date: Tue, 2 Feb 2021 11:32:46 -0300 (ART) From: Jorge D'Elia Reply-To: Jorge D'Elia To: Tobias Burnus Cc: Thomas Koenig , Gfortran List , GCC Patches Message-ID: <1297682030.3862.1612276366200.JavaMail.zimbra@intec.unl.edu.ar> In-Reply-To: <4fc42e9c-676d-f3fc-57ab-f665a679bfbb@codesourcery.com> References: <121178681.597.1612108263047.JavaMail.zimbra@intec.unl.edu.ar> <9d298701-38a5-c2c5-1daf-7a2dad754369@netcologne.de> <4fc42e9c-676d-f3fc-57ab-f665a679bfbb@codesourcery.com> Subject: Re: [Patch] Fortran: Fix Array dependency with local coarrays [PR98913] (was: Re: A question about coarrays and -Warray-temporaries) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Mailer: Zimbra 8.8.12_GA_3803 (ZimbraWebClient - FF85 (Linux)/8.8.12_GA_3794) Thread-Topic: Fortran: Fix Array dependency with local coarrays [PR98913] (was: Re: A question about coarrays and -Warray-temporaries) Thread-Index: mGwiazlMHcihT8HwC9PiOPvZlrHuEw== X-Spam-Status: No, score=1.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FOREIGN_BODY1, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: fortran@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Fortran mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2021 14:29:58 -0000 Hi Tobias,, ----- Mensaje original ----- > De: "Tobias Burnus"=20 > Para: "Thomas Koenig" , "jdelia" , "Gfortran Lis= t" > gcc.gnu.org>, "GCC Patches" > Enviados: Martes, 2 de Febrero 2021 8:46:00 > Asunto: [Patch] Fortran: Fix Array dependency with local coarrays [PR9891= 3] (was: Re: A question about coarrays and > -Warray-temporaries) > > Hi all, >=20 > the attached patch now handles -fcoarray=3Dsingle and access to the local > image like no coarray access, using the same check a before. I would like to apply the patch but, sorry, how do I proceed?=20 Where in the gcc tree to apply the patch file?=20 Should I use git apply or diff? e.g. it does not work with $ pwd /home/bigpack/gcc-paq/sources/gcc-11.0-20210202 $ git apply dep-caf.diff error: patch failed: gcc/fortran/dependency.c:30 error: gcc/fortran/dependency.c: patch does not apply > Actually, I think we could remove the if (..coarray..) check completely: > For 'single', it is like no coarrays; for 'lib' both AA[remote] =3D... an= d > "AA =3D ... AA[remove]" will create a function call and uses already > temporaries. I don't know what 'native'/'threads' does =E2=80=93 but eith= er it > the image index is different, then no temporary is needed at all =E2=80= =93 or it > is the same (in particular: this_image / not present), but then the > noncoarray analysis would work. >=20 > (Knowing that for i !=3D this_image(), AA and AA[i] =E2=80=93 or i /=3D j= for AA[i] > and AA[j] =E2=80=93 we could further relax the checks, but I don't think = that > that's needed.) >=20 > Hence: Is the patch OK for the trunk? Or should we completely get rid of > if-conditional block? Thanks for the fast work with this code optimization issue. Regards, Jorge. > -- > On 01.02.21 12:52, Tobias Burnus wrote: >=20 >> On 01.02.21 08:42, Thomas Koenig via Fortran wrote: >>>> I have a question with -Warray-temporaries in the test below. >>>> With the AA coarray that warning appears in the first loop (on its >>>> local part), >>>> but not with the BB array with the same task, i.e. [...] >>> It seems that dependency checking does not detect that no overlap >>> can exist in that case, and so generates a temporary. Probably, >>> dependency checking was not updated when coarrays were introduced. >>> This is a missed optimization, not a correctness issue. >> I have now filled https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98913 > ----------------- > Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 M=C3=BCnchen > Registergericht M=C3=BCnchen HRB 106955, Gesch=C3=A4ftsf=C3=BChrer: Thoma= s Heurung, Frank > Th=C3=BCrauf