From patchwork Sat May 6 08:39:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fei Gao X-Patchwork-Id: 90710 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp931489vqo; Sat, 6 May 2023 01:41:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7CbKYekQZaA0sKv7QLuW2ny5pTIhE7HHJK0nEmtvZSGItFiJ7N3pdQgYDpBmQ3kk7sL/m9 X-Received: by 2002:a17:907:1c19:b0:94a:3ff1:53ad with SMTP id nc25-20020a1709071c1900b0094a3ff153admr3407171ejc.75.1683362492374; Sat, 06 May 2023 01:41:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683362492; cv=none; d=google.com; s=arc-20160816; b=Mj/Gy05Vkk2N5t63jC8a9NXtHfYjZpBRY8GTZDeDUYsEPAAwLe3b8PcqOySywYJJmR IxoAWomgEbfIKqlYEa/D+NWhVBbQecMs+hiA7z/1JU/a7Jdv/X1kEzbak4hH6Qwu0SoZ BTqsuguXh1bSefxDDEQRtPGR/QwQAnrEb2ps4pgPrPzrhIbaq0KJmEZs6y69adalBmt8 mzFf0GJo5UsysA3mxsnybGkjoyiLiJp/B6Qvw3Egg9mjHoCTOFxejUat5U5DUD3M/JQs SoBT2ybZwL5ZFAbkN6g6OgxYy8sugMAHGK3vBMlHuJNpWUvPcPFwqhBXCPcWKr8XZII+ pkRg== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dmarc-filter:delivered-to; bh=eRbKUaCZiHQL1aX2T1zBl3giUUz9/xZC+xNNx4WAizw=; b=MRxXGM7pZmlP1SSF3xUKQ/DkNSjCT1fmCMo5XGqtXeh9mF59SMWfItzCd3xf3qe/ba 2BMX7J1KbRnyIxEsqO0lYyIuu1py6VAR/TLLEpVIxaGYefTYScb6XtG1/o13Kho3myxL wXqfmizo0o05K7l39A6hghesa2vIl25xJ2zTM7BfWXNmatJRJp66w5VKTBbPbLOn06lt 6K9yvD9nSEd+bBxJ0+4nlwXdh6flu45MGxRVy7amvyEWtbKn/0qhd9n7lcLAwhajB6rG inG8d1Zrg2/mBMjPo74d9CR1ISEtmMaSqFQRRk0k0jeBtuZIWAKX8e7eRUJDEkHNLtS2 F1Gg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id s17-20020a1709066c9100b0094f046a6d49si2535564ejr.81.2023.05.06.01.41.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 May 2023 01:41:32 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 9DCB8385701E for ; Sat, 6 May 2023 08:40:57 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from azure-sdnproxy.icoremail.net (azure-sdnproxy.icoremail.net [207.46.229.174]) by sourceware.org (Postfix) with ESMTP id 2F8323858D28 for ; Sat, 6 May 2023 08:40:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2F8323858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=eswincomputing.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=eswincomputing.com Received: from localhost.localdomain (unknown [10.12.130.31]) by app1 (Coremail) with SMTP id EwgMCgDXdcVhElZkT0cSAA--.58786S5; Sat, 06 May 2023 16:40:05 +0800 (CST) From: Fei Gao To: gcc-patches@gcc.gnu.org Cc: kito.cheng@gmail.com, palmer@dabbelt.com, jeffreyalaw@gmail.com, sinan.lin@linux.alibaba.com, jiawei@iscas.ac.cn, liaozhangjin@eswincomputing.com, Fei Gao Subject: [PATCH 1/2] [RISC-V] disable shrink-wrap-separate if zcmp enabled. Date: Sat, 6 May 2023 08:39:38 +0000 Message-Id: <20230506083939.22097-2-gaofei@eswincomputing.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230506083939.22097-1-gaofei@eswincomputing.com> References: <20230506083939.22097-1-gaofei@eswincomputing.com> X-CM-TRANSID: EwgMCgDXdcVhElZkT0cSAA--.58786S5 X-Coremail-Antispam: 1UD129KBjvdXoWruw1UtF4UJF17tw1DZFyxZrb_yoWDWrg_Z3 4rG3sIqrW3Aay3Wa1DArWFy345t395CrW7Wws7tr42ka1DWF18ua4jyFZFgrn5C3WfJ3Z3 Ca97XF97KF1IgjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbS8FF20E14v26ryj6rWUM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI8067AKxVWUGwA2048vs2IY02 0Ec7CjxVAFwI0_JFI_Gr1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVWDJVCq3wA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8Jr0_Cr1UM2 8EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s0DM2AI xVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20x vE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xv r2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20VAGYxC7MxkIecxEwVCm-wCF04k20xvY0x 0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E 7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_Jw0_GFylIxkGc2Ij64vIr41lIxAIcV C0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Gr0_Cr1lIxAIcVCF 04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7 CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x0JUqAp5UUUUU= X-CM-SenderInfo: xjdrwv3l6h245lqf0zpsxwx03jof0z/ X-Spam-Status: No, score=-10.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_RPBL, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE, URIBL_BLACK 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?1765133508700770353?= X-GMAIL-MSGID: =?utf-8?q?1765133508700770353?= zcmp aims to reduce code size, while shrink-wrap-separate prefers speed to code size. So disable shrink-wrap-separate if zcmp enabled, just like what save-restore has done. author: Zhangjin Liao liaozhangjin@eswincomputing.com gcc/ChangeLog: * config/riscv/riscv.cc (riscv_get_separate_components): --- gcc/config/riscv/riscv.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc index 45a63cab9c9..629e5e45cac 100644 --- a/gcc/config/riscv/riscv.cc +++ b/gcc/config/riscv/riscv.cc @@ -5729,7 +5729,8 @@ riscv_get_separate_components (void) if (riscv_use_save_libcall (&cfun->machine->frame) || cfun->machine->interrupt_handler_p - || !cfun->machine->frame.gp_sp_offset.is_constant ()) + || !cfun->machine->frame.gp_sp_offset.is_constant () + || TARGET_ZCMP) return components; offset = cfun->machine->frame.gp_sp_offset.to_constant ();