From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 561323858C5E for ; Tue, 11 Jul 2023 07:00:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 561323858C5E 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="6.01,196,1684828800"; d="scan'208";a="11464507" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 10 Jul 2023 23:00:52 -0800 IronPort-SDR: FKzn78k6Aa0Wmb6vb5+RGvwk0yICedfKjyDxQ1UJkL12aNdm7/DyvXecJ7hNl5iN8sfLMQnB5J rgBo6IQJS8WYHo0p8SsBQiq0w7RCobNsTsxFBzhl9INR6ikDEGbe13HVkTJFrQ2Frt5xbICNsa Cr0ArEZ4eVJ9WrYkTw8UFG+OSihCGt+IiGpjBpspsTuWblki31WnMHUqX3Mt0jb52jjc8eR7Fc 5GV7ySgSLMYCKCsBRG9+Fq7r7Z1OtYvw0NtQ6UgSCDL2YvRqg7xfiidTbCH4wbf3ViWmUJS9Nj Hhk= Message-ID: <7c4ddd9c-d70e-2b16-7455-71bb7953817e@codesourcery.com> Date: Tue, 11 Jul 2023 09:00:26 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH, OpenACC 2.7] readonly modifier support in front-ends Content-Language: en-US To: , gcc-patches , Thomas Schwinge References: From: Tobias Burnus CC: Catherine Moore In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) To svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: Hi, just a remark regarding OpenMP. With ...omp ... firstprivate(var) allocator(omp_const_mem_alloc: var) one can al= so create constant memory in OpenMP. Likewise with a custom allocator that uses the memory space omp_const_mem_space, which is then a run-time thing. I don't think that's particular useful on the host as the !PROT_WRITE property is a memory-page thing which requires to allocate a multiple of a page size (and after writing the value, mprotect can make it read only). But I think it can be useful on the device (cf. OpenACC). OpenMP and OpenACC likely differ in terms of whether an entry is in the mapping table (firstprivate vs copy) and in the ref count. In any case, it would be good to have the code written such that both OpenACC's and OpenMP's use case can share as much code as possible, even if only OpenACC is initially supported. Tobias PS: I should eventually have a closer look at your patch! On 10.07.23 20:33, Chung-Lin Tang wrote: > this patch contains support for the 'readonly' modifier in copyin clauses > and the cache directive. > > As we discussed earlier, the work for actually linking this to middle-end > points-to analysis is a somewhat non-trivial issue. This first patch allo= ws > the language feature to be used in OpenACC directives first (with no effe= ct for now). > The middle-end changes are probably going to be a later patch. ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955