Commit 78a2bc08 by J"orn Rennecke Committed by Jeff Law

reload1.c (emit_reload_insns): Clear spill_reg_store when doing a new…

reload1.c (emit_reload_insns): Clear spill_reg_store when doing a new non-inherited reload from the same pseudo.

        * reload1.c (emit_reload_insns): Clear spill_reg_store
        when doing a new non-inherited reload from the same pseudo.

From-SVN: r24029
parent de80f416
...@@ -9,6 +9,9 @@ Tue Dec 1 10:22:18 1998 Nick Clifton <nickc@cygnus.com> ...@@ -9,6 +9,9 @@ Tue Dec 1 10:22:18 1998 Nick Clifton <nickc@cygnus.com>
Tue Dec 1 17:58:26 1998 J"orn Rennecke <amylaar@cygnus.co.uk> Tue Dec 1 17:58:26 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
* reload1.c (emit_reload_insns): Clear spill_reg_store
when doing a new non-inherited reload from the same pseudo.
* local-alloc.c (function_invariant_p): New function. * local-alloc.c (function_invariant_p): New function.
(update_equiv_regs): Use function_invariant_p instead of CONSTANT_P (update_equiv_regs): Use function_invariant_p instead of CONSTANT_P
to decide if an equivalence should be recorded. to decide if an equivalence should be recorded.
......
...@@ -7300,6 +7300,34 @@ emit_reload_insns (chain) ...@@ -7300,6 +7300,34 @@ emit_reload_insns (chain)
register int r = reload_order[j]; register int r = reload_order[j];
register int i = reload_spill_index[r]; register int i = reload_spill_index[r];
/* If this is a non-inherited input reload from a pseudo, we must
clear any memory of a previous store to the same pseudo. Only do
something if there will not be an output reload for the pseudo
being reloaded. */
if (reload_in_reg[r] != 0
&& ! (reload_inherited[r] || reload_override_in[r]))
{
rtx reg = reload_in_reg[r];
if (GET_CODE (reg) == SUBREG)
reg = SUBREG_REG (reg);
if (GET_CODE (reg) == REG
&& REGNO (reg) >= FIRST_PSEUDO_REGISTER
&& ! reg_has_output_reload[REGNO (reg)])
{
int nregno = REGNO (reg);
if (reg_last_reload_reg[nregno])
{
int last_regno = REGNO (reg_last_reload_reg[nregno]);
if (reg_reloaded_contents[last_regno] == nregno)
spill_reg_store[last_regno] = 0;
}
}
}
/* I is nonneg if this reload used a register. /* I is nonneg if this reload used a register.
If reload_reg_rtx[r] is 0, this is an optional reload If reload_reg_rtx[r] is 0, this is an optional reload
that we opted to ignore. */ that we opted to ignore. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment