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: 13458 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp424391vqi; Thu, 10 Aug 2023 06:34:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGxX4e6wXZ8j1muhzjsoJTrGY+7cklfZuk0nBIuNLMoh5ownJkvjzfC3VMiBRcFkE4Riv8s X-Received: by 2002:a17:907:7d8a:b0:978:2b56:d76e with SMTP id oz10-20020a1709077d8a00b009782b56d76emr2562487ejc.12.1691674495452; Thu, 10 Aug 2023 06:34:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691674495; cv=none; d=google.com; s=arc-20160816; b=H4t5cmZAuXyjbYZAj1mNElbwoku3fs53ZXMrt9vnalvoDRe7ol722yjKS+lbQWAY72 vvtpAh9ZTo92X2z0jQA+RhqNUahlbXz5TsH1MugRkwOxuZXc+0jd4FRuvyXFa6chTbNO r3GDTO30jMxRgxRGrQYt850uIzGomC0twvnphoxlEGV4xMQmeBiuojyy0qNgXLV0cHB6 m8A8SdfN9OCx+6ZBoKNIr7aQOTkRLu9vaOJ3228+0vsFeq6IxFkJ2b/fnn1WY3OPQUL1 nzfQXLB6MWXXSgL3xWKyk/BDiymKKzklusf5JO+A8aFITZm/bmeO1Mbl0cM9g3a1T8Xz bkXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:ironport-sdr :dmarc-filter:delivered-to; bh=T+ZDcMFAb66fSHA4vDHUk8IVu2A+0PQMXfNhNGYvxXM=; fh=6entJIlBX3Lqynes5VYRRY4zgfJfSDVLFnUjulEf2Vo=; b=TIj3D87bSPUpnBnjjMvkc9lCoK4VcyE6ztMCll5W2hrjXYYuVOBk1bUtSNYYZEt0ta ALqerPJRDojKRzPN0o7wnJ11VTX4Ldal5f2Fb/dwXZAjkkazxyXo8A8L40jSEp+RalGF YMCLFFKDvPmNa50NhRuPr3S0ERutZ7oX12kygcwElYjnlRA6Y1DtCEMFp+OO3CjJIsaJ 66doue/sEvKE3q5qbUxMckc260UeTd4g3XQEF6XGY+bPBhm6pi4wbTO0thCx/qjtK7U4 ZczUPiqzQ5MVx440jgqXyd0RIUq02/nytM3rqfQXfc6GFFdEUl1g7DrCVo5L/4SrfvL/ 5n8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id h10-20020a170906718a00b00994b9b22346si1362915ejk.887.2023.08.10.06.34.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 06:34:55 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9406D3882008 for ; Thu, 10 Aug 2023 13:33:53 +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+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773849275608333423 X-GMAIL-MSGID: 1773849275608333423 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