Commit 9655bf95 by David S. Miller Committed by David S. Miller

loop.c (move_movables): While removing insn sequences...

	* loop.c (move_movables): While removing insn sequences, preserve
	the next pointer of the most recently deleted insn when we skip
	over a NOTE.

From-SVN: r22402
parent 50a029fd
Sun Sep 13 04:37:28 1998 David S. Miller <davem@pierdol.cobaltmicro.com>
* loop.c (move_movables): While removing insn sequences, preserve
the next pointer of the most recently deleted insn when we skip
over a NOTE.
Sat Sep 12 11:37:19 1998 Michael Meissner <meissner@cygnus.com> Sat Sep 12 11:37:19 1998 Michael Meissner <meissner@cygnus.com>
* rs6000.h ({ASM,CPP}_CPU_SPEC): Add support for all machines * rs6000.h ({ASM,CPP}_CPU_SPEC): Add support for all machines
......
...@@ -1916,9 +1916,17 @@ move_movables (movables, threshold, insn_count, loop_start, end, nregs) ...@@ -1916,9 +1916,17 @@ move_movables (movables, threshold, insn_count, loop_start, end, nregs)
temp = delete_insn (temp); temp = delete_insn (temp);
} }
temp = p;
p = delete_insn (p); p = delete_insn (p);
/* simplify_giv_expr expects that it can walk the insns
at m->insn forwards and see this old sequence we are
tossing here. delete_insn does preserve the next
pointers, but when we skip over a NOTE we must fix
it up. Otherwise that code walks into the non-deleted
insn stream. */
while (p && GET_CODE (p) == NOTE) while (p && GET_CODE (p) == NOTE)
p = NEXT_INSN (p); p = NEXT_INSN (temp) = NEXT_INSN (p);
} }
start_sequence (); start_sequence ();
...@@ -2125,9 +2133,18 @@ move_movables (movables, threshold, insn_count, loop_start, end, nregs) ...@@ -2125,9 +2133,18 @@ move_movables (movables, threshold, insn_count, loop_start, end, nregs)
XEXP (temp, 0) = i1; XEXP (temp, 0) = i1;
} }
temp = p;
delete_insn (p); delete_insn (p);
do p = NEXT_INSN (p); p = NEXT_INSN (p);
while (p && GET_CODE (p) == NOTE);
/* simplify_giv_expr expects that it can walk the insns
at m->insn forwards and see this old sequence we are
tossing here. delete_insn does preserve the next
pointers, but when we skip over a NOTE we must fix
it up. Otherwise that code walks into the non-deleted
insn stream. */
while (p && GET_CODE (p) == NOTE)
p = NEXT_INSN (temp) = NEXT_INSN (p);
} }
/* The more regs we move, the less we like moving them. */ /* The more regs we move, the less we like moving them. */
......
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