Commit 96af667a by Geoff Keating Committed by Geoffrey Keating

local-alloc.c (update_equiv_regs): Add an abort().

	* local-alloc.c (update_equiv_regs): Add an abort().  When
	deleting or moving insns, update reg_equiv[regno].init_insns.

From-SVN: r37018
parent ea343d1a
2000-10-23 Geoff Keating <geoffk@cygnus.com>
* local-alloc.c (update_equiv_regs): Add an abort(). When
deleting or moving insns, update reg_equiv[regno].init_insns.
2000-10-23 Mark Mitchell <mark@codesourcery.com> 2000-10-23 Mark Mitchell <mark@codesourcery.com>
* c-tree.texi: Improve documentation for IF_STMTs and related * c-tree.texi: Improve documentation for IF_STMTs and related
......
...@@ -1088,6 +1088,9 @@ update_equiv_regs () ...@@ -1088,6 +1088,9 @@ update_equiv_regs ()
once and used once. (If it were only set, but not used, once and used once. (If it were only set, but not used,
flow would have deleted the setting insns.) Hence flow would have deleted the setting insns.) Hence
there can only be one insn in reg_equiv[REGNO].init_insns. */ there can only be one insn in reg_equiv[REGNO].init_insns. */
if (reg_equiv[regno].init_insns == NULL_RTX
|| XEXP (reg_equiv[regno].init_insns, 1) != NULL_RTX)
abort ();
equiv_insn = XEXP (reg_equiv[regno].init_insns, 0); equiv_insn = XEXP (reg_equiv[regno].init_insns, 0);
if (asm_noperands (PATTERN (equiv_insn)) < 0 if (asm_noperands (PATTERN (equiv_insn)) < 0
...@@ -1123,14 +1126,19 @@ update_equiv_regs () ...@@ -1123,14 +1126,19 @@ update_equiv_regs ()
PUT_CODE (equiv_insn, NOTE); PUT_CODE (equiv_insn, NOTE);
NOTE_LINE_NUMBER (equiv_insn) = NOTE_INSN_DELETED; NOTE_LINE_NUMBER (equiv_insn) = NOTE_INSN_DELETED;
NOTE_SOURCE_FILE (equiv_insn) = 0; NOTE_SOURCE_FILE (equiv_insn) = 0;
reg_equiv[regno].init_insns =
XEXP (reg_equiv[regno].init_insns, 1);
} }
/* Move the initialization of the register to just before /* Move the initialization of the register to just before
INSN. Update the flow information. */ INSN. Update the flow information. */
else if (PREV_INSN (insn) != equiv_insn) else if (PREV_INSN (insn) != equiv_insn)
{ {
int l; int l;
rtx new_insn;
emit_insn_before (copy_rtx (PATTERN (equiv_insn)), insn); new_insn = emit_insn_before (copy_rtx (PATTERN (equiv_insn)),
insn);
REG_NOTES (PREV_INSN (insn)) = REG_NOTES (equiv_insn); REG_NOTES (PREV_INSN (insn)) = REG_NOTES (equiv_insn);
REG_NOTES (equiv_insn) = 0; REG_NOTES (equiv_insn) = 0;
...@@ -1138,6 +1146,8 @@ update_equiv_regs () ...@@ -1138,6 +1146,8 @@ update_equiv_regs ()
NOTE_LINE_NUMBER (equiv_insn) = NOTE_INSN_DELETED; NOTE_LINE_NUMBER (equiv_insn) = NOTE_INSN_DELETED;
NOTE_SOURCE_FILE (equiv_insn) = 0; NOTE_SOURCE_FILE (equiv_insn) = 0;
XEXP (reg_equiv[regno].init_insns, 0) = new_insn;
REG_BASIC_BLOCK (regno) = block >= 0 ? block : 0; REG_BASIC_BLOCK (regno) = block >= 0 ? block : 0;
REG_N_CALLS_CROSSED (regno) = 0; REG_N_CALLS_CROSSED (regno) = 0;
REG_LIVE_LENGTH (regno) = 2; REG_LIVE_LENGTH (regno) = 2;
......
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