Projects
openEuler:24.03:SP1:Everything
gcc
_service:tar_scm:0087-Add-cost-calculation-for-...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:0087-Add-cost-calculation-for-reg-equivalence-invariants.patch of Package gcc
From 4965473a4211a9feb46a0d168180ab450cb18bcc Mon Sep 17 00:00:00 2001 From: "Vladimir N. Makarov" <vmakarov@redhat.com> Date: Fri, 27 Oct 2023 08:28:24 -0400 Subject: [PATCH 32/32] Add cost calculation for reg equivalence invariants My recent patch improving cost calculation for pseudos with equivalence resulted in failure of gcc.target/arm/eliminate.c on aarch64. This patch fixes this failure. gcc/ChangeLog: * ira-costs.cc: (get_equiv_regno, calculate_equiv_gains): Process reg equivalence invariants. --- gcc/ira-costs.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/ira-costs.cc b/gcc/ira-costs.cc index c79311783..d33104a30 100644 --- a/gcc/ira-costs.cc +++ b/gcc/ira-costs.cc @@ -1777,6 +1777,7 @@ get_equiv_regno (rtx x, int ®no, rtx &subreg) } if (REG_P (x) && (ira_reg_equiv[REGNO (x)].memory != NULL + || ira_reg_equiv[REGNO (x)].invariant != NULL || ira_reg_equiv[REGNO (x)].constant != NULL)) { regno = REGNO (x); @@ -1819,6 +1820,7 @@ calculate_equiv_gains (void) for (regno = max_reg_num () - 1; regno >= FIRST_PSEUDO_REGISTER; regno--) if (ira_reg_equiv[regno].init_insns != NULL && (ira_reg_equiv[regno].memory != NULL + || ira_reg_equiv[regno].invariant != NULL || (ira_reg_equiv[regno].constant != NULL /* Ignore complicated constants which probably will be placed in memory: */ @@ -1869,6 +1871,8 @@ calculate_equiv_gains (void) if (subst == NULL) subst = ira_reg_equiv[regno].constant; + if (subst == NULL) + subst = ira_reg_equiv[regno].invariant; ira_assert (subst != NULL); mode = PSEUDO_REGNO_MODE (regno); ira_init_register_move_cost_if_necessary (mode); -- 2.28.0.windows.1
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2