flow.c (reorder_basic_blocks): Account for barriers when writing over NEXT_INSN (last_bb->end).

* flow.c (reorder_basic_blocks): Account for barriers when writing
	over NEXT_INSN (last_bb->end).
	(verify_flow_info): Add check for missing barriers.

From-SVN: r32545
This commit is contained in:
Jason Eckhardt 2000-03-14 21:21:18 +00:00 committed by Jason Eckhardt
parent 24dc027c9a
commit 0edd203b8d
2 changed files with 26 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2000-03-14 Jason Eckhardt <jle@cygnus.com>
* flow.c (reorder_basic_blocks): Account for barriers when writing
over NEXT_INSN (last_bb->end).
(verify_flow_info): Add check for missing barriers.
2000-03-14 Greg McGary <gkm@gnu.org>
* c-lex.h (enum rid): Add RID_BOUNDED & RID_UNBOUNDED.

View File

@ -5785,6 +5785,7 @@ set_block_num (insn, bb)
and NOTE_INSN_BASIC_BLOCK
- check that all insns are in the basic blocks
(except the switch handling code, barriers and notes)
- check that all returns are followed by barriers
In future it can be extended check a lot of other stuff as well
(reachability of basic blocks, life information, etc. etc.). */
@ -5988,6 +5989,12 @@ verify_flow_info ()
}
}
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))
fatal_insn ("Return not followed by barrier", x);
x = NEXT_INSN (x);
}
@ -7758,8 +7765,19 @@ reorder_basic_blocks ()
BASIC_BLOCK (j) = tempbb;
}
}
NEXT_INSN (BASIC_BLOCK (n_basic_blocks - 1)->end) = last_insn;
{
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 ();
#endif
for (i = 0; i < n_basic_blocks - 1; i++)
{