This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: bb reorder insn chaining fix
- To: gcc-patches at gcc dot gnu dot org
- Subject: PATCH: bb reorder insn chaining fix
- From: Jason Eckhardt <jle at cygnus dot com>
- Date: Fri, 17 Mar 2000 20:07:58 -0800 (PST)
near obvious; x86 bootstrap and torture successful.
acceptable?
* bb-reorder.c (reorder_basic_blocks): Update PREV_INSN as well as
NEXT_INSN. Update last insn in chain.
Index: bb-reorder.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/bb-reorder.c,v
retrieving revision 1.1
diff -c -3 -p -r1.1 bb-reorder.c
*** bb-reorder.c 2000/03/16 14:56:55 1.1
--- bb-reorder.c 2000/03/18 03:59:34
*************** reorder_basic_blocks ()
*** 765,771 ****
rtx xafter = skip_insns_between_block (BASIC_BLOCK (n_basic_blocks - 1),
REORDER_SKIP_AFTER);
if (xafter)
! NEXT_INSN (xafter) = last_insn;
else
abort();
}
--- 765,781 ----
rtx xafter = skip_insns_between_block (BASIC_BLOCK (n_basic_blocks - 1),
REORDER_SKIP_AFTER);
if (xafter)
! {
! NEXT_INSN (xafter) = last_insn;
! if (last_insn)
! {
! rtx x = last_insn;
! PREV_INSN (last_insn) = xafter;
! while (NEXT_INSN (x))
! x = NEXT_INSN (x);
! set_last_insn (x);
! }
! }
else
abort();
}