Commit 7bd41ea6 by Mark Mitchell Committed by Mark Mitchell

haifa-sched.c (sched_analyze): Keep the list of notes organized in pairs.

	* haifa-sched.c (sched_analyze): Keep the list of notes organized
	in pairs.
	(reemit_notes): Likewise.

From-SVN: r29462
parent 96df4529
Thu Sep 16 14:03:32 1999 Mark Mitchell <mark@codesourcery.com>
* haifa-sched.c (sched_analyze): Keep the list of notes organized
in pairs.
(reemit_notes): Likewise.
Thu Sep 16 11:50:52 1999 Alex Samuel <samuel@codesourcery.com> Thu Sep 16 11:50:52 1999 Alex Samuel <samuel@codesourcery.com>
* ggc.h (ggc_root): Move to ggc-common.c. * ggc.h (ggc_root): Move to ggc-common.c.
......
...@@ -3939,13 +3939,18 @@ sched_analyze (head, tail) ...@@ -3939,13 +3939,18 @@ sched_analyze (head, tail)
|| (NOTE_LINE_NUMBER (insn) == NOTE_INSN_SETJMP || (NOTE_LINE_NUMBER (insn) == NOTE_INSN_SETJMP
&& GET_CODE (PREV_INSN (insn)) != CALL_INSN))) && GET_CODE (PREV_INSN (insn)) != CALL_INSN)))
{ {
rtx region;
if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_BEG if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_BEG
|| NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_END) || NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_END)
loop_notes = alloc_EXPR_LIST (REG_DEAD, region = GEN_INT (NOTE_EH_HANDLER (insn));
GEN_INT (NOTE_EH_HANDLER (insn)), else
loop_notes); region = GEN_INT (0);
loop_notes = alloc_EXPR_LIST (REG_DEAD, loop_notes = alloc_EXPR_LIST (REG_DEAD,
region,
loop_notes);
loop_notes = alloc_EXPR_LIST (REG_DEAD,
GEN_INT (NOTE_LINE_NUMBER (insn)), GEN_INT (NOTE_LINE_NUMBER (insn)),
loop_notes); loop_notes);
CONST_CALL_P (loop_notes) = CONST_CALL_P (insn); CONST_CALL_P (loop_notes) = CONST_CALL_P (insn);
...@@ -6497,7 +6502,7 @@ move_insn1 (insn, last) ...@@ -6497,7 +6502,7 @@ move_insn1 (insn, last)
/* Search INSN for fake REG_DEAD note pairs for NOTE_INSN_SETJMP, /* Search INSN for fake REG_DEAD note pairs for NOTE_INSN_SETJMP,
NOTE_INSN_{LOOP,EHREGION}_{BEG,END}; and convert them back into NOTE_INSN_{LOOP,EHREGION}_{BEG,END}; and convert them back into
NOTEs. The REG_DEAD note following first one is contains the saved NOTEs. The REG_DEAD note following first one is contains the saved
value for NOTE_EH_HANDLER which is useful for value for NOTE_BLOCK_NUMBER which is useful for
NOTE_INSN_EH_REGION_{BEG,END} NOTEs. LAST is the last instruction NOTE_INSN_EH_REGION_{BEG,END} NOTEs. LAST is the last instruction
output by the instruction scheduler. Return the new value of LAST. */ output by the instruction scheduler. Return the new value of LAST. */
...@@ -6519,6 +6524,8 @@ reemit_notes (insn, last) ...@@ -6519,6 +6524,8 @@ reemit_notes (insn, last)
{ {
retval = emit_note_after (NOTE_INSN_SETJMP, insn); retval = emit_note_after (NOTE_INSN_SETJMP, insn);
CONST_CALL_P (retval) = CONST_CALL_P (note); CONST_CALL_P (retval) = CONST_CALL_P (note);
remove_note (insn, note);
note = XEXP (note, 1);
} }
else if (note_type == NOTE_INSN_RANGE_START else if (note_type == NOTE_INSN_RANGE_START
|| note_type == NOTE_INSN_RANGE_END) || note_type == NOTE_INSN_RANGE_END)
...@@ -6531,13 +6538,11 @@ reemit_notes (insn, last) ...@@ -6531,13 +6538,11 @@ reemit_notes (insn, last)
else else
{ {
last = emit_note_before (note_type, last); last = emit_note_before (note_type, last);
remove_note (insn, note);
note = XEXP (note, 1);
if (note_type == NOTE_INSN_EH_REGION_BEG if (note_type == NOTE_INSN_EH_REGION_BEG
|| note_type == NOTE_INSN_EH_REGION_END) || note_type == NOTE_INSN_EH_REGION_END)
{ NOTE_EH_HANDLER (last) = INTVAL (XEXP (note, 0));
remove_note (insn, note);
note = XEXP (note, 1);
NOTE_EH_HANDLER (last) = INTVAL (XEXP (note, 0));
}
} }
remove_note (insn, note); remove_note (insn, note);
} }
......
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