public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Vladimir Makarov <vmakarov@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-4312] Revert "[RA]: Improve cost calculation of pseudos with equivalences" Date: Thu, 28 Sep 2023 16:01:03 +0000 (GMT) [thread overview] Message-ID: <20230928160103.913E03858402@sourceware.org> (raw) https://gcc.gnu.org/g:8552dcd8e4448c02fe230662093756b75dd94399 commit r14-4312-g8552dcd8e4448c02fe230662093756b75dd94399 Author: Vladimir N. Makarov <vmakarov@redhat.com> Date: Thu Sep 28 11:53:51 2023 -0400 Revert "[RA]: Improve cost calculation of pseudos with equivalences" This reverts commit 3c834d85f2ec42c60995c2b678196a06cb744959. Although the patch improves x86-64 specfp2007, it also results in performance and code size regression on different targets and new GCC testsuite failures on tests expecting a specific output. Diff: --- gcc/ira-costs.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/ira-costs.cc b/gcc/ira-costs.cc index 8c93ace5094..d9e700e8947 100644 --- a/gcc/ira-costs.cc +++ b/gcc/ira-costs.cc @@ -1947,8 +1947,15 @@ find_costs_and_classes (FILE *dump_file) } if (i >= first_moveable_pseudo && i < last_moveable_pseudo) i_mem_cost = 0; - else - i_mem_cost -= equiv_savings; + else if (equiv_savings < 0) + i_mem_cost = -equiv_savings; + else if (equiv_savings > 0) + { + i_mem_cost = 0; + for (k = cost_classes_ptr->num - 1; k >= 0; k--) + i_costs[k] += equiv_savings; + } + best_cost = (1 << (HOST_BITS_PER_INT - 2)) - 1; best = ALL_REGS; alt_class = NO_REGS;
reply other threads:[~2023-09-28 16:01 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230928160103.913E03858402@sourceware.org \ --to=vmakarov@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /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: linkBe 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).