public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Max Filippov <jcmvbkbc@gmail.com>
To: Vladimir Makarov <vmakarov@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [RFA] gcc: fix PR rtl-optimization/107482
Date: Tue, 8 Nov 2022 02:05:50 -0800	[thread overview]
Message-ID: <CAMo8Bf+qfq+7kq5rYWsbMudqued91rd4D3MuH=YhSirW=S1J1Q@mail.gmail.com> (raw)
In-Reply-To: <c786714d-9efb-f246-d408-ddd32ed3c745@redhat.com>

On Mon, Nov 7, 2022 at 12:52 PM Vladimir Makarov <vmakarov@redhat.com> wrote:
> even better patch:
>
> diff --git a/gcc/ira-color.cc b/gcc/ira-color.cc
> index 4a1a325e8e3..ffe73b61c45 100644
> --- a/gcc/ira-color.cc
> +++ b/gcc/ira-color.cc
> @@ -2209,8 +2209,8 @@ assign_hard_reg (ira_allocno_t a, bool retry_p)
>       restore_costs_from_copies (a);
>     ALLOCNO_HARD_REGNO (a) = best_hard_regno;
>     ALLOCNO_ASSIGNED_P (a) = true;
> -  if (best_hard_regno >= 0)
> -    update_costs_from_copies (a, true, ! retry_p);
> +  if (best_hard_regno >= 0 && !retry_p)
> +    update_costs_from_copies (a, true, true);
>     ira_assert (ALLOCNO_CLASS (a) == aclass);
>     /* We don't need updated costs anymore.  */
>     ira_free_allocno_updated_costs (a);
>
...
> Please, check that my proposed patch works and commit it in the case of
> success.

Thank you for taking a look and suggesting a better fix.
I've tested your version for target=xtensa-linux-uclibc, it fixes
the issue without new regressions. I've committed the fix to the
master branch and will backport it to gcc-10, -11 and -12 in a few
days.

-- 
Thanks.
-- Max

      reply	other threads:[~2022-11-08 10:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-07  9:46 Max Filippov
2022-11-07 20:52 ` Vladimir Makarov
2022-11-08 10:05   ` Max Filippov [this message]

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='CAMo8Bf+qfq+7kq5rYWsbMudqued91rd4D3MuH=YhSirW=S1J1Q@mail.gmail.com' \
    --to=jcmvbkbc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=vmakarov@redhat.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).