public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: Fei Gao <gaofei@eswincomputing.com>, gcc-patches@gcc.gnu.org
Cc: kito.cheng@gmail.com, palmer@dabbelt.com,
	sinan.lin@linux.alibaba.com, jiawei@iscas.ac.cn
Subject: Re: [PATCH 1/2] allow target to check shrink-wrap-separate enabled or not
Date: Sun, 25 Jun 2023 07:36:33 -0600	[thread overview]
Message-ID: <a4623bdd-0f80-393d-a7c2-f1150dfc6e35@gmail.com> (raw)
In-Reply-To: <20230620094052.35993-2-gaofei@eswincomputing.com>



On 6/20/23 03:40, Fei Gao wrote:
> gcc/ChangeLog:
> 
>          * shrink-wrap.cc (try_shrink_wrapping_separate):call
>            use_shrink_wrapping_separate.
>          (use_shrink_wrapping_separate): wrap the condition
>            check in use_shrink_wrapping_separate.
>          * shrink-wrap.h (use_shrink_wrapping_separate): add to extern
I'm still missing somethign here.

Why doesn't the RISC-V target simply disable separate shrink wrapping by 
indicating no components are eligible in the relevant cases.  ie, I do 
not think we need another knob here.

To be more concrete:

> /* Implement TARGET_SHRINK_WRAP_GET_SEPARATE_COMPONENTS.  */
>   
> static sbitmap
> riscv_get_separate_components (void)
> {       
>   HOST_WIDE_INT offset;
>   sbitmap components = sbitmap_alloc (FIRST_PSEUDO_REGISTER);
>   bitmap_clear (components);
>           
>   if (riscv_use_save_libcall (&cfun->machine->frame)
>       || cfun->machine->interrupt_handler_p
>       || !cfun->machine->frame.gp_sp_offset.is_constant ())
>     return components;
Don't we get the behavior we want if we change this code to return an 
zero'd sbitmap?

jeff


  reply	other threads:[~2023-06-25 13:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-20  9:40 [PATCH 0/2] resolve confilct between RISC-V zcmp and shrink-wrap-separate Fei Gao
2023-06-20  9:40 ` [PATCH 1/2] allow target to check shrink-wrap-separate enabled or not Fei Gao
2023-06-25 13:36   ` Jeff Law [this message]
2023-06-26  2:29     ` Fei Gao
2023-08-28 22:03       ` Jeff Law
2023-08-28 22:32       ` Jeff Law
2023-06-20  9:40 ` [PATCH 2/2] [RISC-V] resolve confilct between zcmp multi push/pop and shrink-wrap-separate 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=a4623bdd-0f80-393d-a7c2-f1150dfc6e35@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=gaofei@eswincomputing.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jiawei@iscas.ac.cn \
    --cc=kito.cheng@gmail.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).