public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Fei Gao" <gaofei@eswincomputing.com>
To: "Kito Cheng" <kito.cheng@gmail.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
	 "Palmer Dabbelt" <palmer@dabbelt.com>,
	 jeffreyalaw <jeffreyalaw@gmail.com>,
	 Sinan <sinan.lin@linux.alibaba.com>,
	 jiawei <jiawei@iscas.ac.cn>,
	 liaozhangjin <liaozhangjin@eswincomputing.com>
Subject: Re: Re: [PATCH 1/2] [RISC-V] disable shrink-wrap-separate if zcmp enabled.
Date: Mon, 8 May 2023 15:39:07 +0800	[thread overview]
Message-ID: <20230508153907071799136@eswincomputing.com> (raw)
In-Reply-To: <CA+yXCZDWOggbctpCq6icBMCp3d_3Mik4NcE7irJhAnkt1SwbKQ@mail.gmail.com>

On 2023-05-08 10:41  Kito Cheng <kito.cheng@gmail.com> wrote:
>
>shrink-wraping already gated by Os so I think we don't need add more
>gate here, unless we are trying to claim force optimize for size if
>zcmp is present.
> 

hi Kito

Zcmp is added here just like save-restore.

Either we add them both, or delete.

BR, 
Fei

>On Sat, May 6, 2023 at 4:41 PM Fei Gao <gaofei@eswincomputing.com> wrote:
>>
>> 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
>>

  reply	other threads:[~2023-05-08  7:39 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 ` [PATCH 1/2] [RISC-V] disable shrink-wrap-separate if zcmp enabled Fei Gao
2023-05-08  2:41   ` Kito Cheng
2023-05-08  7:39     ` Fei Gao [this message]
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=20230508153907071799136@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).