public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kito Cheng <kito.cheng@gmail.com>
To: Fei Gao <gaofei@eswincomputing.com>
Cc: gcc-patches@gcc.gnu.org, jiawei@iscas.ac.cn
Subject: Re: [PATCH 2/2] [RISC-V] Enalble zcmp for -Os
Date: Tue, 5 Sep 2023 20:02:29 +0800	[thread overview]
Message-ID: <CA+yXCZDF5Yjsho3SjRHkTrsAb4M6irZNLbooms7s=afARzUtww@mail.gmail.com> (raw)
In-Reply-To: <20230831062402.6810-3-gaofei@eswincomputing.com>

> @@ -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.

e.g. it still will enable with -O2 -fno-shrink-wrap-separate

>        || (frame->mask & ~MULTI_PUSH_GPR_MASK))
>      return true;
>

  reply	other threads:[~2023-09-05 12:02 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 [this message]
2023-09-06  1:47     ` Fei Gao
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='CA+yXCZDF5Yjsho3SjRHkTrsAb4M6irZNLbooms7s=afARzUtww@mail.gmail.com' \
    --to=kito.cheng@gmail.com \
    --cc=gaofei@eswincomputing.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jiawei@iscas.ac.cn \
    /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).