This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: small -freorder-block defect
- To: gcc-patches at gcc dot gnu dot org
- Subject: PATCH: small -freorder-block defect
- From: Jason Eckhardt <jle at cygnus dot com>
- Date: Sun, 12 Mar 2000 19:22:07 -0800 (PST)
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++)
{