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: 114596 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp10160903vqr; Fri, 30 Jun 2023 00:13:20 -0700 (PDT) X-Google-Smtp-Source: APBJJlFt7xRJ5Oor18skwHI+r9eBEBttV1DLfKdl3WT/+EU33VUJrMmzRZ3bolg9xEtC3RLll6PM X-Received: by 2002:a17:906:8699:b0:973:d06d:545f with SMTP id g25-20020a170906869900b00973d06d545fmr1042944ejx.24.1688109200492; Fri, 30 Jun 2023 00:13:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688109200; cv=none; d=google.com; s=arc-20160816; b=Ahz+5fsvqhoXkUopkZ656WCT/hZ0NGGaP4em70LXkuudFnvAnadVuuq3oO/N1Rlklf skgayStNv+RksIXbCJzl4cjar8cw8w+Wg8GFuo+kGy1oziCwPdoll4xgzMFX4q1yCzWI qcPZxVBIYvvzg3jC5635+yB8Cv0V7ZiIKu8QkrAbAmUqYPR6LOA9HaXQuz4G2P1j/f7j 4hHZEdVp4JdMbwmCXgySczaUzrw1KateM020GFEPWc8B4pPtbi7pJqjIJTc0kvThQbEi heFH6VBP7TKvUR3WjHKnEPypB6xNIEeRxj75GfXuf+GgN8mtus0WCjeDKl+CKG/eR5Dy EIjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:message-id:date :user-agent:references:in-reply-to:subject:cc:to:from:ironport-sdr :dmarc-filter:delivered-to; bh=36fheI5wPKdzYTfycD/kDt0auZtDhLgsH3X1499gbZQ=; fh=obR6MkDXXdILlFjw9+HkrGwpsnuGv/tWsPRZleDkUjQ=; b=SYuxJv4MPGv4TsACIEShuKd4Bp02y47QwaSxxaWJRTQiIMRKx7BWQNkXKmLEAck7L6 uKJKjzURTOTz1HOLQkjRDAnqnm+PPAEVjZwTz9nIQ8En1e+nnZHKFtr4oUREk6zNbKoS fSUfkG9Kc+NECCO12kFaom2m5zjc9FAndMRq3YbZnPxJ8JJaX391qXa3w9bOIAvLCPh/ TD7cBABbXhjoazsSv9vO+EJVWzyuKVxtMY0iW3NsuwLDm6BMLbG4nNymcG4siniBfS0i vzVmTAuFAnfSQs9PCUQJ7yt59pwnUJpQ8nXJpKQu3V+gPjCoI/iHecCfynh9KeLP3IET zNYQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id r7-20020a170906280700b0098cd94bc343si8147829ejc.682.2023.06.30.00.13.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Jun 2023 00:13:20 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EE67C3850438 for ; Fri, 30 Jun 2023 07:12:32 +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+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770110792963180293?= X-GMAIL-MSGID: =?utf-8?q?1770110792963180293?= 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