From patchwork Fri Jun 30 07:11:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 1801699 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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+incoming=patchwork.ozlabs.org@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 ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QsmjL4lW6z20XS for ; Fri, 30 Jun 2023 17:12:22 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9BF8D3854833 for ; Fri, 30 Jun 2023 07:12:20 +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 E4720385DC1D for ; Fri, 30 Jun 2023 07:12:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E4720385DC1D 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,170,1684828800"; d="scan'208,223";a="10360085" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 29 Jun 2023 23:12:06 -0800 IronPort-SDR: p/V39PrridSX7hqtvAP7VH9bQQ0ikVmJN4UDNI4BSNmckiczhdRkZnIM53gNNtyX5Qx0pEi+W7 TS8D1WsMpoElIJ0ldkRW/GvkPWvrdv20Hmg6ySsmCNuD37ZD9FLuUMVws6RtDXidgZF+UAHvV3 aDMfonPFOeBIzL0ReizZH5jWkT32oMx5UpCRe6T9McXfhNUBtw+C0GKqGLeEuqN9Fq/+jerOS+ KSOQA/HpnDVleTw2Oo4wcnrOSVrdbz5xu8QKnz8dOY3Rm1mBPBeiLuNlQJJpDtl3JQ6c0mPBWw qvI= From: Thomas Schwinge To: Jeff Law , Roger Sayle , , "Segher Boessenkool" CC: Tom de Vries Subject: Flip the nvptx port to LRA (was: [PATCH] Turn on LRA on all targets) In-Reply-To: <1bb5725e-af43-9a71-866e-45c5d13628c6@gmail.com> References: <03ac01d97a9f$b0262960$10727c20$@nextmovesoftware.com> <1bb5725e-af43-9a71-866e-45c5d13628c6@gmail.com> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/28.2 (x86_64-pc-linux-gnu) Date: Fri, 30 Jun 2023 09:11:58 +0200 Message-ID: <871qhtwhj5.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham 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+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Hi! On 2023-04-29T09:06:54-0600, Jeff Law via Gcc-patches wrote: > On 4/29/23 07:37, Roger Sayle wrote: >> >> Segher Boessenkool wrote: >>> I send this patch now so that people can start testing. >>> >>> --- a/gcc/config/nvptx/nvptx.cc >>> +++ b/gcc/config/nvptx/nvptx.cc >>> @@ -7601,9 +7601,6 @@ nvptx_asm_output_def_from_decls (FILE *stream, tree name, tree value) >>> #undef TARGET_ATTRIBUTE_TABLE >>> #define TARGET_ATTRIBUTE_TABLE nvptx_attribute_table >>> >>> -#undef TARGET_LRA_P >>> -#define TARGET_LRA_P hook_bool_void_false >>> - >>> #undef TARGET_LEGITIMATE_ADDRESS_P >>> #define TARGET_LEGITIMATE_ADDRESS_P nvptx_legitimate_address_p >> >> I've tested Segher's patch on nvptx-none with make and make -k check and >> can confirm there are no new regressions. Confirmed. Also, no change in nvptx target libraries built. As expected. >> Nvptx is unique in that it >> doesn't >> use register allocation, i.e. GCC's only TARGET_NO_REGISTER_ALLOCATION >> target, >> so it's a little odd that it specifies which register allocator it doesn't >> use. >> >> I hope this helps, > > It does. Consider a patch which flips the nvptx port to LRA as > pre-approved. Pushed to master branch commit f7e3123638712773e8c01e17aae9dc64d9342016 "Flip the nvptx port to LRA", see attached. Grüße Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 From f7e3123638712773e8c01e17aae9dc64d9342016 Mon Sep 17 00:00:00 2001 From: Segher Boessenkool Date: Sun, 23 Apr 2023 16:47:52 +0000 Subject: [PATCH] Flip the nvptx port to LRA ... understanding that "turn on LRA" is an exaggeration here, given that nvptx isn't actually doing register allocation ('TARGET_NO_REGISTER_ALLOCATION'). gcc/ * config/nvptx/nvptx.cc (TARGET_LRA_P): Remove. Co-authored-by: Thomas Schwinge --- gcc/config/nvptx/nvptx.cc | 3 --- 1 file changed, 3 deletions(-) diff --git a/gcc/config/nvptx/nvptx.cc b/gcc/config/nvptx/nvptx.cc index e3b0304d5376..16ed78030d73 100644 --- a/gcc/config/nvptx/nvptx.cc +++ b/gcc/config/nvptx/nvptx.cc @@ -7633,9 +7633,6 @@ nvptx_asm_output_def_from_decls (FILE *stream, tree name, tree value) #undef TARGET_ATTRIBUTE_TABLE #define TARGET_ATTRIBUTE_TABLE nvptx_attribute_table -#undef TARGET_LRA_P -#define TARGET_LRA_P hook_bool_void_false - #undef TARGET_LEGITIMATE_ADDRESS_P #define TARGET_LEGITIMATE_ADDRESS_P nvptx_legitimate_address_p -- 2.39.2