[PR119270][IRA]: Ignore equiv init insns for cost calculation for invariants only
My previous patch for PR114991 contains code ignoring equiv init insns for increasing cost of usage the equivalence. Although common sense says it is right thing to do, this results in more aggressive usage of memory equivalence and significant performance degradation of SPEC2017 cactuBSSM. Given patch restores previous cost calculation for all equivalences except for invariant ones. gcc/ChangeLog: PR target/119270 * ira-costs.cc (calculate_equiv_gains): Ignore equiv init insns only for invariants.
This commit is contained in:
parent
b9b25c108b
commit
6c443e1288
1 changed files with 9 additions and 6 deletions
|
@ -1926,12 +1926,15 @@ calculate_equiv_gains (void)
|
|||
|| !bitmap_bit_p (&equiv_pseudos, regno))
|
||||
continue;
|
||||
|
||||
rtx_insn_list *x;
|
||||
for (x = ira_reg_equiv[regno].init_insns; x != NULL; x = x->next ())
|
||||
if (insn == x->insn ())
|
||||
break;
|
||||
if (x != NULL)
|
||||
continue; /* skip equiv init insn */
|
||||
if (ira_reg_equiv[regno].invariant != NULL)
|
||||
{
|
||||
rtx_insn_list *x = ira_reg_equiv[regno].init_insns;
|
||||
for (; x != NULL; x = x->next ())
|
||||
if (insn == x->insn ())
|
||||
break;
|
||||
if (x != NULL)
|
||||
continue; /* skip equiv init insn for invariant */
|
||||
}
|
||||
|
||||
rtx subst = ira_reg_equiv[regno].memory;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue