From patchwork Fri Oct 1 17:07:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Brown X-Patchwork-Id: 45696 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 872C43857409 for ; Fri, 1 Oct 2021 17:08:29 +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 7FE843857415 for ; Fri, 1 Oct 2021 17:08:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7FE843857415 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: Gx8q3VCIyNLYA6BljNcpYRr/XOC5JGqM463RtIx/xavIWlndJU8ggBCDD++Z905WQ3PlibPCat TlqOk9VGnMA2+xhjTRuua54OpXrjMCbcKLQwq9NCQbHRm9FiaKFBJXCpYisKzRolOR1sQEZMqi t/HsbYXedGIg777NuO6LtKQYERC7kfSmOjnHkxWidtrAM3dreT/Qdev9JEC4JLc8yAlFGkSnVe eDmuHXKLcCSLyDqsohIjTURBvbIq5gH7CMxq+M6bie5uzneSLz/64/jpTgla8Sni0p5d7Hbg0P zvc2dxpf8easu9wjYHEt+MJq X-IronPort-AV: E=Sophos;i="5.85,339,1624348800"; d="scan'208";a="66548476" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 01 Oct 2021 09:08:07 -0800 IronPort-SDR: VfYT3jbTB6FDqlEy37w0Jkj+npBYAVoAsBICdqTGLSl/osQFBb+n0zHUiGco73ZbLxHqNO34Rv 5GYgh+5uj7gmQVIopE/xfvQtX5gnagOE27wZJya6rybjgDXDk58Tj8vul0xTrHdityPJw/Qxjc G7lI/UsHm98YaChr0cY5DNxfv6BgpGcVYtXDKrXgga/0dzUoHQf7QqV3jBoVJjw71FYUbRvg15 MblaVvj3oKAqsxPHxDwXCE7jq0gJ9ltbWe7fad+dPlyAHU421+QKZE4/KzzYInX4XaGVKW6T1O GxI= From: Julian Brown To: Subject: [PATCH 00/11] OpenMP: Deep struct dereferences Date: Fri, 1 Oct 2021 10:07:47 -0700 Message-ID: X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-07.mgc.mentorg.com (139.181.222.7) To SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: , Cc: Jakub Jelinek , Thomas Schwinge Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" This is a series of patches to support deep struct dereferences for OpenMP 5.0 (i.e. with multiple arrow operators, "a->b[foo]->c[lo:hi]"). Apart from a couple of general bug fixes, the main parts of this comprise: 1. Topological sorting of OMP clauses by base pointer dependencies. 2. Hoisting of struct sibling list handling out of gimplify_scan_omp_clauses. These patches replace and continue from the last part of the previously-posted series: https://gcc.gnu.org/pipermail/gcc-patches/2021-August/577219.html and (still) depend on the parts of 1 through 7 of that series. The patches have been bootstrapped & regression tested individually with offloading to NVPTX (though some prior to the most recent rebase). OK? Thanks, Julian Julian Brown (11): libgomp: Release device lock on cbuf error path Remove base_ind/base_ref handling from extract_base_bit_offset OpenMP 5.0: Clause ordering for OpenMP 5.0 (topological sorting by base pointer) Remove omp_target_reorder_clauses OpenMP/OpenACC: Hoist struct sibling list handling in gimplification OpenMP: Allow array ref components for C & C++ OpenMP: Fix non-zero attach/detach bias for struct dereferences Not for committing: noisy topological sorting output Not for committing: noisy sibling-list handling output Not for committing: noisy mapping-group taxonomy OpenMP/OpenACC: [WIP] Add gcc_unreachable to apparently-dead path in build_struct_comp_nodes gcc/c-family/c-common.h | 1 + gcc/c-family/c-omp.c | 42 + gcc/c/c-typeck.c | 15 +- gcc/cp/semantics.c | 17 +- gcc/gimplify.c | 2479 ++++++++++++----- gcc/omp-low.c | 7 +- gcc/testsuite/g++.dg/goacc/member-array-acc.C | 2 +- gcc/testsuite/g++.dg/gomp/target-3.C | 4 +- gcc/testsuite/g++.dg/gomp/target-lambda-1.C | 6 +- gcc/testsuite/g++.dg/gomp/target-this-2.C | 2 +- gcc/testsuite/g++.dg/gomp/target-this-3.C | 4 +- gcc/testsuite/g++.dg/gomp/target-this-4.C | 4 +- libgomp/target.c | 5 +- libgomp/testsuite/libgomp.c++/baseptrs-3.C | 182 ++ .../libgomp.c-c++-common/baseptrs-1.c | 50 + .../libgomp.c-c++-common/baseptrs-2.c | 70 + 16 files changed, 2151 insertions(+), 739 deletions(-) create mode 100644 libgomp/testsuite/libgomp.c++/baseptrs-3.C create mode 100644 libgomp/testsuite/libgomp.c-c++-common/baseptrs-1.c create mode 100644 libgomp/testsuite/libgomp.c-c++-common/baseptrs-2.c