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 414FE385087B; Wed, 14 Sep 2022 16:48:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 414FE385087B 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.93,315,1654588800"; d="scan'208";a="82985348" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 14 Sep 2022 08:47:57 -0800 IronPort-SDR: FQBsjiNf9K3gW6U8K0Vu+a08ZSpHsl244twix/klW6UcOfhggT98oB4WsyVtWFVjCo5J0+cDG2 aCdQUZVsdTJBwBuWoABOea1pXblFNh/Fvet3ZW6w3EYDwL+NSZ5jQ4YGVHdp0Jz8Fg1dxVbz4b v9TUJFaHIfSrqiuXqktoaMByZwX7k9oHByzeHXCMrmvzA1qGtVTSl5rargAaNlVS2TTb7mWqLR iiEO1ZO6AOjPg/QNY1mBdmB62Qv1nPnNFq96HLyEXgwCJlqFzVDhvGAlMeSW8KKbJtvlvmd3L1 wLk= Date: Wed, 14 Sep 2022 17:32:39 +0100 From: Julian Brown To: Jakub Jelinek CC: , , , Subject: Re: [PATCH v3 11/11] FYI/unfinished: OpenMP 5.0 "declare mapper" support for C++ Message-ID: <20220914173239.1d01987d@squid.athome> In-Reply-To: References: <2d52a6cf5ba904abd98d028a163c1012becf95a6.1663101299.git.julian@codesourcery.com> 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-10.mgc.mentorg.com (147.34.90.210) To svr-ies-mbx-11.mgc.mentorg.com (139.181.222.11) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,KAM_SHORT,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: On Wed, 14 Sep 2022 16:58:28 +0200 Jakub Jelinek wrote: > On Tue, Sep 13, 2022 at 02:04:30PM -0700, Julian Brown wrote: > > This patch implements OpenMP 5.0 "declare mapper" support for C++. > > This hasn't been fully revised yet following previous review > > comments, but I am including it in this series to demonstrate the > > new approach to gimplifying map clauses after "declare mapper" > > instantiation. > > > > The "gimplify_scan_omp_clauses" function is still called twice: > > firstly (before scanning the offload region's body) with > > SUPPRESS_GIMPLIFICATION set to true. This sets up variables in the > > splay tree, etc. but does not gimplify anything. > > > > Then, implicit "declare mappers" are instantiated after scanning the > > region's body, then "gimplify_scan_omp_clauses" is called again, and > > does the rest of its previous tasks -- builds struct sibling lists, > > and gimplifies clauses. Then gimplify_adjust_omp_clauses is called, > > and compilation continues. > > > > Does this approach seem OK? > > As I wrote in > https://gcc.gnu.org/pipermail/gcc-patches/2022-June/596444.html I > don't see a reason for this 3 passes approach and it will be a > maintainance problem. Ack. I'll have another go at refactoring those bits when reworking this patch. Thanks, Julian