From patchwork Tue Jun 2 14:40:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Stubbs X-Patchwork-Id: 1302493 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=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com 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 49bvpp5CCCz9sSW for ; Wed, 3 Jun 2020 00:40:33 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4A78438708D3; Tue, 2 Jun 2020 14:40:30 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id 9C7CF385DC00 for ; Tue, 2 Jun 2020 14:40:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9C7CF385DC00 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Andrew_Stubbs@mentor.com IronPort-SDR: HCInDxHkseMl/KCKUTTL/ic5qe/c4t4jvVHtT76/rMi1TdLGBOGdu4BdK5bdPONuZsRItQdMl8 vHChZFdsrcZpgzoh0F5iRScvwL2sZ97EoEid+RRjD40lT76ulzyyC6FmCSHj+HoZgcWW4YGqpT vhP7OZNeiC3KyajDNEjpEWA0UqNoKfegqW4wyE8qq9qnvVdgK9HkvRdqgo+m6BLCFqLMW/1coI /OQdynhLhr2N7Uijbs/el9Vf62yattsuQ7ILToFwaXthZjd5LdaH32O/4wH+cL/RziBg0r7+r3 KU8= X-IronPort-AV: E=Sophos;i="5.73,464,1583222400"; d="scan'208";a="51483082" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 02 Jun 2020 06:40:26 -0800 IronPort-SDR: 9NDsFEIO2WJHNPeWcLLf69WCe+7TNkUMYeXlRZE0Mq/+QO/GaftOLx6XPeMIusa/sWOIViOcLm ROND8xcQnA+lV+zBOTsy3ga/rWAlH7C3PethbKdPX0IVbT+L5gXl94qEVcoagdcyUYinFgVsRa v7L3b8sDZ1V1IAzEC0FQafraP9NJBZZPUgX1sxkRcu2GuB5gxQfxv8PFS+gXZXwYfOElOFUrtk i5ai2B3+C9BtN5NeSBAOA0YDbsuLZwbjkQi/FqDzrDDGVybuk146PXC3PSZLyFPNiDnNIR9Z4G kwk= To: "gcc-patches@gcc.gnu.org" From: Andrew Stubbs Subject: [COMMITTED] amdgcn: Remove -mlocal-symbol-id option Message-ID: <3f7b36f5-e6fa-71fa-4e60-a4802a5b9cd6@codesourcery.com> Date: Tue, 2 Jun 2020 15:40:20 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 Content-Language: en-GB X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-08.mgc.mentorg.com (139.181.222.8) To svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) X-Spam-Status: No, score=-15.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_NONE, 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: , Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" This patch removes the vestiges of the GCN-specific -mlocal-symbol-id option. Previously, this was part of a horrible workaround for a bug in the Radeon Open Compute ELF loader. The bug has been fixed a while now, and the name mangling has not been present in the compiler for a while, so the option that controlled it can go away now. This clean up also fixes a lot of failures in the PCH testsuite that have been occurring since Alexandre's dump file overhaul. Andrew amdgcn: Remove -mlocal-symbol-id option This patch removes the obsolete -mlocal-symbol-id option. This was used to control mangling of local symbol names in order to work around a ROCm runtime bug, but that has not been needed in some time, and the mangling was removed already. gcc/ChangeLog: * config/gcn/gcn-hsa.h (CC1_SPEC): Delete. * config/gcn/gcn.opt (-mlocal-symbol-id): Delete. * config/gcn/mkoffload.c (main): Don't use -mlocal-symbol-id. gcc/testsuite/ChangeLog: * gcc.dg/intermod-1.c: Don't use -mlocal-symbol-id. diff --git a/gcc/config/gcn/gcn-hsa.h b/gcc/config/gcn/gcn-hsa.h index d6523cf1247..2eaf4149f4c 100644 --- a/gcc/config/gcn/gcn-hsa.h +++ b/gcc/config/gcn/gcn-hsa.h @@ -79,16 +79,6 @@ extern unsigned int gcn_local_sym_hash (const char *name); #define ASM_SPEC "-triple=amdgcn--amdhsa -mattr=-code-object-v3 " \ "%:last_arg(%{march=*:-mcpu=%*}) " \ "-filetype=obj" -/* Add -mlocal-symbol-id= unless the user (or mkoffload) - passes the option explicitly on the command line. The option also causes - several dump-matching tests to fail in the testsuite, so the option is not - added when or tree dump/compare-debug options used in the testsuite are - present. - This has the potential for surprise, but a user can still use an explicit - -mlocal-symbol-id= option manually together with -fdump-tree or - -fcompare-debug options. */ -#define CC1_SPEC "%{!mlocal-symbol-id=*:%{!fdump-tree-*:" \ - "%{!fdump-ipa-*:%{!fcompare-debug*:-mlocal-symbol-id=%b}}}}" #define LINK_SPEC "--pie" #define LIB_SPEC "-lc" diff --git a/gcc/config/gcn/gcn.opt b/gcc/config/gcn/gcn.opt index 04c73d64630..e1b9942ebed 100644 --- a/gcc/config/gcn/gcn.opt +++ b/gcc/config/gcn/gcn.opt @@ -70,9 +70,6 @@ mstack-size= Target Report RejectNegative Joined UInteger Var(stack_size_opt) Init(-1) -mstack-size= Set the private segment size per wave-front, in bytes. -mlocal-symbol-id= -Target RejectNegative Report JoinedOrMissing Var(local_symbol_id) Init(0) - Wopenacc-dims Target Var(warn_openacc_dims) Warning Warn about invalid OpenACC dimensions. diff --git a/gcc/config/gcn/mkoffload.c b/gcc/config/gcn/mkoffload.c index 723da108b65..4a99d70e312 100644 --- a/gcc/config/gcn/mkoffload.c +++ b/gcc/config/gcn/mkoffload.c @@ -524,7 +524,7 @@ main (int argc, char **argv) FILE *in = stdin; FILE *out = stdout; FILE *cfile = stdout; - const char *outname = 0, *offloadsrc = 0; + const char *outname = 0; progname = "mkoffload"; diagnostic_initialize (global_dc, 0); @@ -653,18 +653,11 @@ main (int argc, char **argv) if (!strcmp (argv[ix], "-o") && ix + 1 != argc) outname = argv[++ix]; else - { - obstack_ptr_grow (&cc_argv_obstack, argv[ix]); - - if (argv[ix][0] != '-') - offloadsrc = argv[ix]; - } + obstack_ptr_grow (&cc_argv_obstack, argv[ix]); } obstack_ptr_grow (&cc_argv_obstack, "-o"); obstack_ptr_grow (&cc_argv_obstack, gcn_s1_name); - obstack_ptr_grow (&cc_argv_obstack, - concat ("-mlocal-symbol-id=", offloadsrc, NULL)); obstack_ptr_grow (&cc_argv_obstack, NULL); const char **cc_argv = XOBFINISH (&cc_argv_obstack, const char **); diff --git a/gcc/testsuite/gcc.dg/intermod-1.c b/gcc/testsuite/gcc.dg/intermod-1.c index 44a8ce071b5..9f8d19deb6a 100644 --- a/gcc/testsuite/gcc.dg/intermod-1.c +++ b/gcc/testsuite/gcc.dg/intermod-1.c @@ -1,5 +1,4 @@ /* { dg-do compile } */ -/* { dg-additional-options "-mlocal-symbol-id=" { target amdgcn-*-* } } */ /* { dg-final { scan-assembler-not {foo[1-9]\.[0-9]} } } */ /* Check that we don't get .0 suffixes on static variables when not using