From patchwork Sun Oct 6 22:32:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Brown X-Patchwork-Id: 1172583 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-510369-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="k3F04uvT"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46mdft4tJtz9sPF for ; Mon, 7 Oct 2019 09:33:07 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; q=dns; s=default; b=NmX PXZ0bYk5cyH1eP2AtqKY5DepY1IosY6wzHQzb1gR7Oj9kuj8v4up6n/0JI15r4EQ sciGaiDWqA4mW2hnSG0s6q80CJy1re2nFODJoIKXnYXsgZ9fc9Ja86YrPosUk8Bi i4m7hBzqMTFclYWGuLTfNw4lWw2pajXKM6IwNkd4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=default; bh=SVUuC3eK3 0Y5tz9dMoXozMI597o=; b=k3F04uvTMuvtnP1FboZM/bMzAVw7YltIDoKfJWrZD IfK4+NN6BA6y+J2Eb07BbkDFmw1LWhv/mR7YobGPWgJ5U7rRsCkCNqxOwgOiagB1 0ywze8Fwq2G3jfogdjtS1YWpJBLbWugoHJ4tDQE+z5UsojC3u7E2b0QhCaXqAObR Xc= Received: (qmail 20363 invoked by alias); 6 Oct 2019 22:32:58 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 20355 invoked by uid 89); 6 Oct 2019 22:32:58 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-15.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, SPF_PASS autolearn=ham version=3.3.1 spammy=3rd, manual, comprises, counting X-HELO: esa3.mentor.iphmx.com Received: from esa3.mentor.iphmx.com (HELO esa3.mentor.iphmx.com) (68.232.137.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 06 Oct 2019 22:32:56 +0000 IronPort-SDR: dq8bU+NwVCC0JDTTusCuSF7tdOlV8/16KOf00CniyRv7LqPfmY14GBf2d2Ol0GG7qZ3qqUzmvc L172pS3hM8AP1WKuIbOgJBM1d+/9eU5Bk8lRT1Oivvq03ySayhUM32jet9aNa+benO8aAfHm93 jxWg/oAM8CQhzdvEs+tko1HF9JJNdhilWq3X6+8zAZlkOEGj6k8wk5O8It710Sqct+mPcufuAg pV84oHXN2LAb/jsAKjodrVWVxg5iP/3bcDtA3AkEw4LVYIbaXI56WJpGEj1ubJhHdWcgezknrI E/U= Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 06 Oct 2019 14:32:54 -0800 IronPort-SDR: AUl4upVySiwQ1mzqhXbMnHYNijvh911LiJSna9iHuH6EACqnSBJs+mesbOWb8RyypfvDXuWl3a Aw33drLCfGGYolB/Jbn1fiqkTut1b5MrHojd7vL/Z//n4eDZUkhpxhHFw+VGWyZzNwpl144l49 tYvrER2fveUVRy7y7cKfyfxKQUBCi8mgz46gXc5OKRP8JhRolQey4Cv2MTxhDhKVSKV6TdQY7k 3Z3jvFZHGAnWUFFT0QXiH9qqjQAu/kd0oi6jhjVWS8mvABYiNLOUUWEoSXNeB1EzytT8mJgVjW Ems= From: Julian Brown To: CC: , Subject: [PATCH 0/4] OpenACC 2.6 manual deep copy (repost) Date: Sun, 6 Oct 2019 15:32:33 -0700 Message-ID: <20191006223237.81842-1-julian@codesourcery.com> MIME-Version: 1.0 X-IsSubscribed: yes Hi, This patch series comprises an updated version of manual deep copy support for OpenACC 2.6. This was last posted upstream starting here: https://gcc.gnu.org/ml/gcc-patches/2018-11/msg00823.html The reference counting changes from the 3rd patch from that submission have been reposted a few days ago here: https://gcc.gnu.org/ml/gcc-patches/2019-10/msg00238.html Tested with offloading to nvptx (as a series, with the above refcounting patch). OK for trunk? (A couple of these patches were approved already; further commentary will be given on individual patches.) Thanks, Julian Julian Brown (4): Add function for pretty-printing OpenACC clause names Use gomp_map_val for OpenACC host-to-device address translation Factor out duplicate code in gimplify_scan_omp_clauses OpenACC 2.6 manual deep copy support (attach/detach) gcc/c-family/c-common.h | 1 + gcc/c-family/c-omp.c | 33 ++ gcc/c-family/c-pragma.h | 2 + gcc/c/c-parser.c | 52 +- gcc/c/c-typeck.c | 76 ++- gcc/cp/parser.c | 55 +- gcc/cp/semantics.c | 98 +++- gcc/fortran/gfortran.h | 2 + gcc/fortran/openmp.c | 150 +++-- gcc/fortran/trans-expr.c | 184 +++--- gcc/fortran/trans-openmp.c | 290 +++++++--- gcc/fortran/trans.h | 9 + gcc/gimplify.c | 525 ++++++++++++------ gcc/omp-low.c | 3 + .../goacc/deep-copy-arrayofstruct.c | 84 +++ gcc/testsuite/c-c++-common/goacc/mdc-1.c | 55 ++ gcc/testsuite/c-c++-common/goacc/mdc-2.c | 62 +++ gcc/testsuite/g++.dg/goacc/mdc.C | 68 +++ .../gfortran.dg/goacc/data-clauses.f95 | 38 +- .../gfortran.dg/goacc/derived-types-2.f90 | 14 + .../gfortran.dg/goacc/derived-types.f90 | 77 +++ .../gfortran.dg/goacc/enter-exit-data.f95 | 24 +- gcc/tree-pretty-print.c | 18 + include/gomp-constants.h | 16 +- libgomp/libgomp.h | 13 + libgomp/libgomp.map | 10 + libgomp/oacc-mem.c | 82 ++- libgomp/oacc-parallel.c | 201 +++++-- libgomp/openacc.h | 6 + libgomp/target.c | 194 ++++++- .../testsuite/libgomp.oacc-c++/deep-copy-12.C | 72 +++ .../testsuite/libgomp.oacc-c++/deep-copy-13.C | 72 +++ .../libgomp.oacc-c-c++-common/deep-copy-1.c | 24 + .../libgomp.oacc-c-c++-common/deep-copy-10.c | 53 ++ .../libgomp.oacc-c-c++-common/deep-copy-11.c | 72 +++ .../libgomp.oacc-c-c++-common/deep-copy-14.c | 63 +++ .../libgomp.oacc-c-c++-common/deep-copy-2.c | 29 + .../libgomp.oacc-c-c++-common/deep-copy-3.c | 34 ++ .../libgomp.oacc-c-c++-common/deep-copy-4.c | 87 +++ .../libgomp.oacc-c-c++-common/deep-copy-5.c | 81 +++ .../libgomp.oacc-c-c++-common/deep-copy-6.c | 59 ++ .../libgomp.oacc-c-c++-common/deep-copy-7.c | 45 ++ .../libgomp.oacc-c-c++-common/deep-copy-8.c | 54 ++ .../libgomp.oacc-c-c++-common/deep-copy-9.c | 53 ++ .../libgomp.oacc-fortran/deep-copy-1.f90 | 35 ++ .../libgomp.oacc-fortran/deep-copy-2.f90 | 33 ++ .../libgomp.oacc-fortran/deep-copy-3.f90 | 34 ++ .../libgomp.oacc-fortran/deep-copy-4.f90 | 49 ++ .../libgomp.oacc-fortran/deep-copy-5.f90 | 57 ++ .../libgomp.oacc-fortran/deep-copy-6.f90 | 61 ++ .../libgomp.oacc-fortran/deep-copy-7.f90 | 89 +++ .../libgomp.oacc-fortran/deep-copy-8.f90 | 41 ++ .../libgomp.oacc-fortran/derived-type-1.f90 | 28 + .../libgomp.oacc-fortran/derivedtype-1.f95 | 30 + .../libgomp.oacc-fortran/derivedtype-2.f95 | 41 ++ .../libgomp.oacc-fortran/multidim-slice.f95 | 50 ++ .../libgomp.oacc-fortran/update-2.f90 | 284 ++++++++++ 57 files changed, 3598 insertions(+), 474 deletions(-) create mode 100644 gcc/testsuite/c-c++-common/goacc/deep-copy-arrayofstruct.c create mode 100644 gcc/testsuite/c-c++-common/goacc/mdc-1.c create mode 100644 gcc/testsuite/c-c++-common/goacc/mdc-2.c create mode 100644 gcc/testsuite/g++.dg/goacc/mdc.C create mode 100644 gcc/testsuite/gfortran.dg/goacc/derived-types-2.f90 create mode 100644 gcc/testsuite/gfortran.dg/goacc/derived-types.f90 create mode 100644 libgomp/testsuite/libgomp.oacc-c++/deep-copy-12.C create mode 100644 libgomp/testsuite/libgomp.oacc-c++/deep-copy-13.C create mode 100644 libgomp/testsuite/libgomp.oacc-c-c++-common/deep-copy-1.c create mode 100644 libgomp/testsuite/libgomp.oacc-c-c++-common/deep-copy-10.c create mode 100644 libgomp/testsuite/libgomp.oacc-c-c++-common/deep-copy-11.c create mode 100644 libgomp/testsuite/libgomp.oacc-c-c++-common/deep-copy-14.c create mode 100644 libgomp/testsuite/libgomp.oacc-c-c++-common/deep-copy-2.c create mode 100644 libgomp/testsuite/libgomp.oacc-c-c++-common/deep-copy-3.c create mode 100644 libgomp/testsuite/libgomp.oacc-c-c++-common/deep-copy-4.c create mode 100644 libgomp/testsuite/libgomp.oacc-c-c++-common/deep-copy-5.c create mode 100644 libgomp/testsuite/libgomp.oacc-c-c++-common/deep-copy-6.c create mode 100644 libgomp/testsuite/libgomp.oacc-c-c++-common/deep-copy-7.c create mode 100644 libgomp/testsuite/libgomp.oacc-c-c++-common/deep-copy-8.c create mode 100644 libgomp/testsuite/libgomp.oacc-c-c++-common/deep-copy-9.c create mode 100644 libgomp/testsuite/libgomp.oacc-fortran/deep-copy-1.f90 create mode 100644 libgomp/testsuite/libgomp.oacc-fortran/deep-copy-2.f90 create mode 100644 libgomp/testsuite/libgomp.oacc-fortran/deep-copy-3.f90 create mode 100644 libgomp/testsuite/libgomp.oacc-fortran/deep-copy-4.f90 create mode 100644 libgomp/testsuite/libgomp.oacc-fortran/deep-copy-5.f90 create mode 100644 libgomp/testsuite/libgomp.oacc-fortran/deep-copy-6.f90 create mode 100644 libgomp/testsuite/libgomp.oacc-fortran/deep-copy-7.f90 create mode 100644 libgomp/testsuite/libgomp.oacc-fortran/deep-copy-8.f90 create mode 100644 libgomp/testsuite/libgomp.oacc-fortran/derived-type-1.f90 create mode 100644 libgomp/testsuite/libgomp.oacc-fortran/derivedtype-1.f95 create mode 100644 libgomp/testsuite/libgomp.oacc-fortran/derivedtype-2.f95 create mode 100644 libgomp/testsuite/libgomp.oacc-fortran/multidim-slice.f95 create mode 100644 libgomp/testsuite/libgomp.oacc-fortran/update-2.f90