From patchwork Thu Aug 10 13:33:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Brown X-Patchwork-Id: 1819853 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RM7DT0Jv1z1yYC for ; Thu, 10 Aug 2023 23:33:44 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9B1F33853D0D for ; Thu, 10 Aug 2023 13:33:40 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id C6E683857700; Thu, 10 Aug 2023 13:33:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C6E683857700 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,162,1684828800"; d="scan'208";a="14111536" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 10 Aug 2023 05:33:21 -0800 IronPort-SDR: mHhfxnT/Lw9lfKGZfkjdNUlg2VgsJjzGbM1VOG4PwOvWG7HNXI3AD5b89QxRxCZbeN1OnT3EpC 3oFC4MSCz0asm0Rq0LaDyI/F1+vPBlQREGvfJ2YNaSomxED+QMo6nv1jEA70Tna+NN70lqHWwd yBiKXfGxqsKd5RLnJN5oxFgCD6AchbMmN+KEi9Y45Qbv+uOs3xfXKC0O9dJ38fvgH0xiqNw0CW KxvRywDVNh+zaQeoPN+xtJZTvXVQCDus0gZZIJxHX1ElejbfD7gVSHiplBscIyU56bZxbcSz/4 HjA= From: Julian Brown To: CC: , , Subject: [PATCH 0/5] [og13] OpenMP: Implement 'declare mapper' for 'target update' directives Date: Thu, 10 Aug 2023 13:33:01 +0000 Message-ID: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-14.mgc.mentorg.com (139.181.222.14) To svr-ies-mbx-11.mgc.mentorg.com (139.181.222.11) X-Spam-Status: No, score=-5.8 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" This series (for the og13 branch) implements 'declare mapper' support for 'target update' directives, and improves diagnostic behaviour relating to mapper expansion (mostly for Fortran) in several ways. Tested with offloading to AMD GCN. Further comments on individual patches. I will apply (to the og13 branch) shortly. Julian Brown (5): OpenMP: Move Fortran 'declare mapper' instantiation code OpenMP: Reprocess expanded clauses after 'declare mapper' instantiation OpenMP: Introduce C_ORT_{,OMP_}DECLARE_MAPPER c_omp_region_type types OpenMP: Look up 'declare mapper' definitions at resolution time not parse time OpenMP: Enable 'declare mapper' mappers for 'target update' directives gcc/c-family/c-common.h | 4 + gcc/c-family/c-omp.cc | 117 +- gcc/c/c-parser.cc | 152 +- gcc/cp/parser.cc | 160 +- gcc/cp/pt.cc | 4 +- gcc/fortran/gfortran.h | 20 + gcc/fortran/match.cc | 4 +- gcc/fortran/module.cc | 6 + gcc/fortran/openmp.cc | 1803 +++++++++++------ gcc/fortran/trans-openmp.cc | 408 +--- .../c-c++-common/gomp/declare-mapper-17.c | 38 + .../c-c++-common/gomp/declare-mapper-19.c | 40 + .../gfortran.dg/gomp/declare-mapper-24.f90 | 43 + .../gfortran.dg/gomp/declare-mapper-26.f90 | 28 + .../gfortran.dg/gomp/declare-mapper-27.f90 | 25 + .../gfortran.dg/gomp/declare-mapper-29.f90 | 22 + .../gfortran.dg/gomp/declare-mapper-31.f90 | 34 + .../libgomp.c-c++-common/declare-mapper-18.c | 33 + .../libgomp.fortran/declare-mapper-25.f90 | 44 + .../libgomp.fortran/declare-mapper-28.f90 | 38 + .../libgomp.fortran/declare-mapper-30.f90 | 24 + .../libgomp.fortran/declare-mapper-4.f90 | 18 +- 22 files changed, 2031 insertions(+), 1034 deletions(-) create mode 100644 gcc/testsuite/c-c++-common/gomp/declare-mapper-17.c create mode 100644 gcc/testsuite/c-c++-common/gomp/declare-mapper-19.c create mode 100644 gcc/testsuite/gfortran.dg/gomp/declare-mapper-24.f90 create mode 100644 gcc/testsuite/gfortran.dg/gomp/declare-mapper-26.f90 create mode 100644 gcc/testsuite/gfortran.dg/gomp/declare-mapper-27.f90 create mode 100644 gcc/testsuite/gfortran.dg/gomp/declare-mapper-29.f90 create mode 100644 gcc/testsuite/gfortran.dg/gomp/declare-mapper-31.f90 create mode 100644 libgomp/testsuite/libgomp.c-c++-common/declare-mapper-18.c create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-25.f90 create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-28.f90 create mode 100644 libgomp/testsuite/libgomp.fortran/declare-mapper-30.f90