Commit e8c8470b by Mark Mitchell Committed by Mark Mitchell

flow.c (proagate_one_insn): Remove useless assignment.

	* flow.c (proagate_one_insn): Remove useless assignment.
	* jump.c (delete_insn): Tidy.
	* loop.c (try_copy_prop): When deleting an instruction with a
	REG_RETVAL note, delete the entire libcall sequence.
	(loop_delete_insns): New function.
	* unroll.c (initial_reg_note_copy): Copy INSN_LIST notes, even if
	we're not substituting into them yet.

From-SVN: r41486
parent 51f26c45
2001-04-21 Mark Mitchell <mark@codesourcery.com>
* flow.c (proagate_one_insn): Remove useless assignment.
* jump.c (delete_insn): Tidy.
* loop.c (try_copy_prop): When deleting an instruction with a
REG_RETVAL note, delete the entire libcall sequence.
(loop_delete_insns): New function.
* unroll.c (initial_reg_note_copy): Copy INSN_LIST notes, even if
we're not substituting into them yet.
2001-04-21 Kazu Hirata <kazu@hxi.com>
* config/h8300/h8300.c (general_operand_src): Fix a comment typo.
......
......@@ -3734,10 +3734,7 @@ propagate_one_insn (pbi, insn)
pbi->cc0_live = 0;
if (libcall_is_dead)
{
prev = propagate_block_delete_libcall (pbi->bb, insn, note);
insn = NEXT_INSN (prev);
}
prev = propagate_block_delete_libcall (pbi->bb, insn, note);
else
propagate_block_delete_insn (pbi->bb, insn);
......
......@@ -2823,16 +2823,15 @@ delete_insn (insn)
to special NOTEs instead. When not optimizing, leave them alone. */
if (was_code_label && LABEL_NAME (insn) != 0)
{
if (! optimize)
dont_really_delete = 1;
else if (! dont_really_delete)
if (optimize)
{
const char *name = LABEL_NAME (insn);
PUT_CODE (insn, NOTE);
NOTE_LINE_NUMBER (insn) = NOTE_INSN_DELETED_LABEL;
NOTE_SOURCE_FILE (insn) = name;
dont_really_delete = 1;
}
dont_really_delete = 1;
}
else
/* Mark this insn as deleted. */
......
......@@ -9240,17 +9240,52 @@ try_copy_prop (loop, replacement, regno)
fprintf (loop_dump_stream, " Replaced reg %d", regno);
if (store_is_first && replaced_last)
{
PUT_CODE (init_insn, NOTE);
NOTE_LINE_NUMBER (init_insn) = NOTE_INSN_DELETED;
if (loop_dump_stream)
fprintf (loop_dump_stream, ", deleting init_insn (%d)",
INSN_UID (init_insn));
rtx first;
rtx retval_note;
/* Assume we're just deleting INIT_INSN. */
first = init_insn;
/* Look for REG_RETVAL note. If we're deleting the end of
the libcall sequence, the whole sequence can go. */
retval_note = find_reg_note (init_insn, REG_RETVAL, NULL_RTX);
/* If we found a REG_RETVAL note, find the first instruction
in the sequence. */
if (retval_note)
first = XEXP (retval_note, 0);
/* Delete the instructions. */
loop_delete_insns (first, init_insn);
}
if (loop_dump_stream)
fprintf (loop_dump_stream, ".\n");
}
}
/* Replace all the instructions from FIRST up to and including LAST
with NOTE_INSN_DELETED notes. */
static void
loop_delete_insns (first, last)
rtx first;
rtx last;
{
while (1)
{
PUT_CODE (first, NOTE);
NOTE_LINE_NUMBER (first) = NOTE_INSN_DELETED;
if (loop_dump_stream)
fprintf (loop_dump_stream, ", deleting init_insn (%d)",
INSN_UID (first));
/* If this was the LAST instructions we're supposed to delete,
we're done. */
if (first == last)
break;
first = NEXT_INSN (first);
}
}
/* Try to replace occurrences of pseudo REGNO with REPLACEMENT within
loop LOOP if the order of the sets of these registers can be
swapped. There must be exactly one insn within the loop that sets
......
int j;
void residual ()
{
long double s;
for (j = 3; j < 9; j++)
s -= 3;
}
......@@ -1672,7 +1672,7 @@ initial_reg_note_copy (notes, map)
XEXP (copy, 0) = copy_rtx_and_substitute (XEXP (notes, 0), map, 0);
else if (GET_CODE (notes) == INSN_LIST)
/* Don't substitute for these yet. */
XEXP (copy, 0) = XEXP (notes, 0);
XEXP (copy, 0) = copy_rtx (XEXP (notes, 0));
else
abort ();
......
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