PATCH: small -freorder-block defect
Jason Eckhardt
jle@cygnus.com
Sun Mar 12 19:22:00 GMT 2000
we were losing some barriers, which caused problems for delayed branch sched.
acceptable?
* flow.c (reorder_basic_blocks): Account for barriers when writing
over NEXT_INSN (last_bb->end).
(reorder_basic_blocks): Add more sanity checks.
Index: flow.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/flow.c,v
retrieving revision 1.232
diff -c -3 -p -r1.232 flow.c
*** flow.c 2000/03/10 19:21:06 1.232
--- flow.c 2000/03/13 03:08:51
*************** reorder_basic_blocks ()
*** 7758,7765 ****
BASIC_BLOCK (j) = tempbb;
}
}
!
! NEXT_INSN (BASIC_BLOCK (n_basic_blocks - 1)->end) = last_insn;
for (i = 0; i < n_basic_blocks - 1; i++)
{
--- 7758,7787 ----
BASIC_BLOCK (j) = tempbb;
}
}
!
! {
! rtx xafter = skip_insns_between_block (BASIC_BLOCK (n_basic_blocks - 1),
! REORDER_SKIP_AFTER);
! if (xafter)
! NEXT_INSN (xafter) = last_insn;
! else
! abort();
! }
!
! #ifdef ENABLE_CHECKING
! verify_flow_info ();
! {
! rtx x;
! for (x = get_insns(); x; x = NEXT_INSN (x))
! {
! if (GET_RTX_CLASS (GET_CODE (x)) == 'i'
! && GET_CODE (x) == JUMP_INSN
! && returnjump_p (x)
! && ! (NEXT_INSN (x) && GET_CODE (NEXT_INSN (x)) == BARRIER))
! error ("reorder_basic_blocks: RETURN not followed by BARRIER!\n");
! }
! }
! #endif
for (i = 0; i < n_basic_blocks - 1; i++)
{
More information about the Gcc-patches
mailing list