From: Fei Gao <gaofei@eswincomputing.com>
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 <gaofei@eswincomputing.com>
Subject: [PATCH 1/2] [RISC-V] disable shrink-wrap-separate if zcmp enabled.
Date: Sat, 6 May 2023 08:39:38 +0000 [thread overview]
Message-ID: <20230506083939.22097-2-gaofei@eswincomputing.com> (raw)
In-Reply-To: <20230506083939.22097-1-gaofei@eswincomputing.com>
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 ();
--
2.17.1
next prev parent reply other threads:[~2023-05-06 8:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-06 8:39 [PATCH 0/2] RISC-V: support Zcmp extension Fei Gao
2023-05-06 8:39 ` Fei Gao [this message]
2023-05-08 2:41 ` [PATCH 1/2] [RISC-V] disable shrink-wrap-separate if zcmp enabled Kito Cheng
2023-05-08 7:39 ` Fei Gao
2023-05-08 7:54 ` Andrew Pinski
2023-05-08 8:05 ` Kito Cheng
2023-05-08 8:54 ` Fei Gao
2023-05-08 9:20 ` Kito Cheng
2023-05-10 9:33 ` Fei Gao
2023-05-06 8:39 ` [PATCH 2/2] [RISC-V] support cm.push cm.pop cm.popret in zcmp Fei Gao
2023-05-08 2:48 ` Kito Cheng
2023-05-10 9:34 ` Fei Gao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230506083939.22097-2-gaofei@eswincomputing.com \
--to=gaofei@eswincomputing.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jeffreyalaw@gmail.com \
--cc=jiawei@iscas.ac.cn \
--cc=kito.cheng@gmail.com \
--cc=liaozhangjin@eswincomputing.com \
--cc=palmer@dabbelt.com \
--cc=sinan.lin@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).