+2002-01-10 Richard Henderson <rth@redhat.com>
+
+ * cfgrtl.c (delete_insn): Assert insn hasn't been deleted yet.
+ * reload1.c (delete_output_reload): Zap spill_reg_store. Take
+ care not to delete instructions twice.
+
2002-01-10 Zack Weinberg <zack@codesourcery.com>
* toplev.c: Don't declare environ (it's not used anywhere).
Thu Jan 10 17:19:12 CET 2002 Jan Hubicka <jh@suse.cz>
* cfgcleanup.c (try_forward_edges): Properly initialize nthreaded_edges;
- update edge probabilities to match.
+ update edge probabilities to match.
2002-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
2002-01-20 Graham Stott <grahams@redhat.com>
* dwarf2out.c (indirect_string_alloc, output_indirect_string):
- Move prototype into DWARF2_DEBUGGING_INFO conditional block.
+ Move prototype into DWARF2_DEBUGGING_INFO conditional block.
2002-01-10 Richard Henderson <rth@redhat.com>
2002-01-09 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
- * real.c (c4xtoe, toc4x): Do some special conversion on long doubles
- for the c4x target. Also improve layout.
+ * real.c (c4xtoe, toc4x): Do some special conversion on long doubles
+ for the c4x target. Also improve layout.
2002-01-09 Richard Henderson <rth@redhat.com>
return last ? NEXT_INSN (last) : get_insns ();
}
\f
-/* Delete a previously made output-reload
- whose result we now believe is not needed.
- First we double-check.
+/* Delete a previously made output-reload whose result we now believe
+ is not needed. First we double-check.
INSN is the insn now being processed.
LAST_RELOAD_REG is the hard register number for which we want to delete
}
}
+ /* We will be deleting the insn. Remove the spill reg information. */
+ for (k = HARD_REGNO_NREGS (last_reload_reg, GET_MODE (reg)); k-- > 0; )
+ {
+ spill_reg_store[last_reload_reg + k] = 0;
+ spill_reg_stored_to[last_reload_reg + k] = 0;
+ }
+
/* The caller has already checked that REG dies or is set in INSN.
- It has also checked that we are optimizing, and thus some inaccurancies
- in the debugging information are acceptable.
- So we could just delete output_reload_insn.
- But in some cases we can improve the debugging information without
- sacrificing optimization - maybe even improving the code:
- See if the pseudo reg has been completely replaced
- with reload regs. If so, delete the store insn
- and forget we had a stack slot for the pseudo. */
+ It has also checked that we are optimizing, and thus some
+ inaccurancies in the debugging information are acceptable.
+ So we could just delete output_reload_insn. But in some cases
+ we can improve the debugging information without sacrificing
+ optimization - maybe even improving the code: See if the pseudo
+ reg has been completely replaced with reload regs. If so, delete
+ the store insn and forget we had a stack slot for the pseudo. */
if (rld[j].out != rld[j].in
&& REG_N_DEATHS (REGNO (reg)) == 1
&& REG_N_SETS (REGNO (reg)) == 1
{
rtx i2;
- /* We know that it was used only between here
- and the beginning of the current basic block.
- (We also know that the last use before INSN was
- the output reload we are thinking of deleting, but never mind that.)
- Search that range; see if any ref remains. */
+ /* We know that it was used only between here and the beginning of
+ the current basic block. (We also know that the last use before
+ INSN was the output reload we are thinking of deleting, but never
+ mind that.) Search that range; see if any ref remains. */
for (i2 = PREV_INSN (insn); i2; i2 = PREV_INSN (i2))
{
rtx set = single_set (i2);
}
}
- /* Delete the now-dead stores into this pseudo. */
+ /* Delete the now-dead stores into this pseudo. Note that this
+ loop also takes care of deleting output_reload_insn. */
for (i2 = PREV_INSN (insn); i2; i2 = PREV_INSN (i2))
{
rtx set = single_set (i2);
if (set != 0 && SET_DEST (set) == reg)
{
delete_address_reloads (i2, insn);
- /* This might be a basic block head,
- thus don't use delete_insn. */
delete_insn (i2);
}
if (GET_CODE (i2) == CODE_LABEL
break;
}
- /* For the debugging info,
- say the pseudo lives in this reload reg. */
+ /* For the debugging info, say the pseudo lives in this reload reg. */
reg_renumber[REGNO (reg)] = REGNO (rld[j].reg_rtx);
alter_reg (REGNO (reg), -1);
}
- delete_address_reloads (output_reload_insn, insn);
- delete_insn (output_reload_insn);
-
+ else
+ {
+ delete_address_reloads (output_reload_insn, insn);
+ delete_insn (output_reload_insn);
+ }
}
/* We are going to delete DEAD_INSN. Recursively delete loads of