From patchwork Tue May 11 08:56:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Brown X-Patchwork-Id: 1476982 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FfWyd0SSWz9sSn for ; Tue, 11 May 2021 18:57:28 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CA9CC3886C6F; Tue, 11 May 2021 08:57:11 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id 64D143839C4D; Tue, 11 May 2021 08:57:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 64D143839C4D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Julian_Brown@mentor.com IronPort-SDR: dMW1ZhkVmqyly415YPeYpzy9KvNZO/lvyNy2s31tTWdfdEaVpIDDx1BJ+6x1lMYRL0v2b64U6D MTR0Kx+66bou0925S/8orGZ/C7QUbGcS3YoD7Q1nifxMlJvw1MnS8iQuqq8PKM96tNGmFkpxE9 fpHqMgjBZZhAaGayp8i8hUIgMG0hlZFdLZG+TBg/idq3RZL6Hi66YejaLDfefRgiv8333fYUO1 ovAe0/GjJaJ6V3AYYKmvEH8v/6GFdEk4FjqV+obKtvjNYmdiRAQ3hVHQWvRYUcaqphD+SkiGUY KqI= X-IronPort-AV: E=Sophos;i="5.82,290,1613462400"; d="scan'208";a="61053251" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 11 May 2021 00:57:04 -0800 IronPort-SDR: zNmCXK1T+avSCq01Xpgb7ftWVWo+qQJPaUfGLlTOhQG4ZQeNHJPvkrVHTpPX0tYW7mT/shdXDz hKkNXq4bfIXgzwlAF/rLnX5gglee6WYyJZClLVe48Qn3CD2qCbWh7IoWDFOEQWr4yAJ5WR4hoe h0BnyWjk7e6e7gK8L01HyJEqMjkDCgK25Rtq1TQzgPPAJ4oKMptVDX1mscFTtg2F8YEQZMolEu wyUAsOJOTo3zsw6cnoynYThuaLENLQyI06vUsFGm6tCNELo6kGsxN3csua3Y+hF8e+wIktrsta rMg= From: Julian Brown To: Subject: [PATCH 3/7] [og10] Revert gimplify.c parts of "Fix template case of non-static member access inside member functions" Date: Tue, 11 May 2021 01:56:33 -0700 Message-ID: <7c0034b155be67cae409283e8338cae6ae92d4cc.1620721888.git.julian@codesourcery.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-09.mgc.mentorg.com (139.181.222.9) To SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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 , Tobias Burnus , fortran@gcc.gnu.org, Thomas Schwinge Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" With the "rework indirect struct handling" patch later in this series, some parts of this earlier patch (by Chung-Lin) become unnecessary. This patch reverts those bits. 2021-05-11 Julian Brown gcc/ * gimplify.c (gimplify_scan_omp_clauses): Don't strip nops in indir_p case. Don't add map(*pointer_to_struct) mappings to struct_deref_set. --- gcc/gimplify.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/gcc/gimplify.c b/gcc/gimplify.c index ad192b27208..0674d882861 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -9574,7 +9574,6 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p, { indir_p = true; decl = TREE_OPERAND (decl, 0); - STRIP_NOPS (decl); } if (TREE_CODE (decl) == INDIRECT_REF && DECL_P (TREE_OPERAND (decl, 0)) @@ -9747,24 +9746,6 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p, break; } - /* If this was of the form map(*pointer_to_struct), then the - 'pointer_to_struct' DECL should be considered deref'ed. */ - if ((OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_ALLOC - || GOMP_MAP_COPY_TO_P (OMP_CLAUSE_MAP_KIND (c)) - || GOMP_MAP_COPY_FROM_P (OMP_CLAUSE_MAP_KIND (c))) - && INDIRECT_REF_P (orig_decl) - && DECL_P (TREE_OPERAND (orig_decl, 0)) - && TREE_CODE (TREE_TYPE (orig_decl)) == RECORD_TYPE) - { - tree ptr = TREE_OPERAND (orig_decl, 0); - if (!struct_deref_set || !struct_deref_set->contains (ptr)) - { - if (!struct_deref_set) - struct_deref_set = new hash_set (); - struct_deref_set->add (ptr); - } - } - if (!remove && OMP_CLAUSE_MAP_KIND (c) != GOMP_MAP_ALWAYS_POINTER && OMP_CLAUSE_MAP_KIND (c) != GOMP_MAP_ATTACH_DETACH