public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Vladimir Makarov <vmakarov@redhat.com>
To: Richard Biener <rguenther@suse.de>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] rtl-optimization/110587 - remove quadratic regno_in_use_p
Date: Tue, 1 Aug 2023 11:56:05 -0400	[thread overview]
Message-ID: <a7111450-da67-c418-f6ce-c10b77cf100d@redhat.com> (raw)
In-Reply-To: <87444.123072509485600123@us-mta-376.us.mimecast.lan>


On 7/25/23 09:40, Richard Biener wrote:
> The following removes the code checking whether a noop copy
> is between something involved in the return sequence composed
> of a SET and USE.  Instead of checking for this special-case
> the following makes us only ever remove noop copies between
> pseudos - which is the case that is necessary for IRA/LRA
> interfacing to function according to the comment.  That makes
> looking for the return reg special case unnecessary, reducing
> the compile-time in LRA non-specific to zero for the testcase.
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu with
> all languages and {,-m32}.
>
> OK?
>
Richard, sorry for the delay with the answer.  I was on vacation.

There is a lot of history of changes of the code.  I believe your change 
is right.  I don't think that RTL will ever contain noop return move 
insn involving the return hard register especially after removing hard 
reg propagation couple years ago, at least IRA/LRA do not generate such 
insns during its work.

So the patch is OK for me.  I specially like that the big part of code 
is removed.  No code, no problem (including performance one).  Thank you 
for the patch.

> 	PR rtl-optimization/110587
> 	* lra-spills.cc (return_regno_p): Remove.
> 	(regno_in_use_p): Likewise.
> 	(lra_final_code_change): Do not remove noop moves
> 	between hard registers.
> ---
>   gcc/lra-spills.cc | 69 +----------------------------------------------
>   1 file changed, 1 insertion(+), 68 deletions(-)
>
> diff --git a/gcc/lra-spills.cc b/gcc/lra-spills.cc
> index 3a7bb7e8cd9..fe58f162d05 100644
> --- a/gcc/lra-spills.cc
> +++ b/gcc/lra-spills.cc
> @@ -705,72 +705,6 @@ alter_subregs (rtx *loc, bool final_p)
>     return res;
>   }


       reply	other threads:[~2023-08-01 15:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87444.123072509485600123@us-mta-376.us.mimecast.lan>
2023-08-01 15:56 ` Vladimir Makarov [this message]
2023-07-31 10:53 Richard Biener
2023-07-31 16:01 ` Jeff Law
  -- strict thread matches above, loose matches on Subject: below --
2023-07-25 13:40 Richard Biener

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=a7111450-da67-c418-f6ce-c10b77cf100d@redhat.com \
    --to=vmakarov@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rguenther@suse.de \
    /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).