From: "Fei Gao" <gaofei@eswincomputing.com>
To: "Kito Cheng" <kito.cheng@gmail.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>, jiawei <jiawei@iscas.ac.cn>
Subject: Re: Re: [PATCH 2/2] [RISC-V] Enalble zcmp for -Os
Date: Wed, 6 Sep 2023 09:47:12 +0800 [thread overview]
Message-ID: <2023090609471192542985@eswincomputing.com> (raw)
In-Reply-To: <CA+yXCZDF5Yjsho3SjRHkTrsAb4M6irZNLbooms7s=afARzUtww@mail.gmail.com>
On 2023-09-05 20:02 Kito Cheng <kito.cheng@gmail.com> wrote:
>
>> @@ -5569,7 +5571,9 @@ riscv_avoid_multi_push (const struct riscv_frame_info *frame)
>> {
>> if (!TARGET_ZCMP || crtl->calls_eh_return || frame_pointer_needed
>> || cfun->machine->interrupt_handler_p || cfun->machine->varargs_size != 0
>> - || crtl->args.pretend_args_size != 0 || flag_shrink_wrap_separate
>> + || crtl->args.pretend_args_size != 0
>> + || (use_shrink_wrapping_separate ()
>> + && !riscv_avoid_shrink_wrapping_separate ())
>
>I think we should also check "!optimize_function_for_size_p (cfun)"
>here, otherwise that does not really match what we claim in the commit
>message.
>
A similar check optimize_function_for_speed_p is included in
use_shrink_wrapping_separate of [1/2] allow targets to check
shrink-wrap-separate enabled or not.
>e.g. it still will enable with -O2 -fno-shrink-wrap-separate
It's intentional to enable zcmp with -O2 -fno-shrink-wrap-separate.
Maybe I should have given a better commit message saying
"enable muti push and pop for Zcmp extension when
shrink-wrap-separate is inactive".
Would you like a new patch from me or agree with my
explanation and modify commit message in your side?
BR
Fei
>
>> || (frame->mask & ~MULTI_PUSH_GPR_MASK))
>> return true;
>>
next prev parent reply other threads:[~2023-09-06 1:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-31 6:24 [PATCH 0/2] resolve confilct between zcmp multi push/pop and shrink-wrap-separate Fei Gao
2023-08-31 6:24 ` [PATCH 1/2] allow targets to check shrink-wrap-separate enabled or not Fei Gao
2023-08-31 6:24 ` [PATCH 2/2] [RISC-V] Enalble zcmp for -Os Fei Gao
2023-09-05 12:02 ` Kito Cheng
2023-09-06 1:47 ` Fei Gao [this message]
2023-09-06 8:06 ` Kito Cheng
2023-09-12 0:56 ` 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=2023090609471192542985@eswincomputing.com \
--to=gaofei@eswincomputing.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jiawei@iscas.ac.cn \
--cc=kito.cheng@gmail.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).