Commit 0edd203b by Jason Eckhardt Committed by Jason Eckhardt

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
parent 24dc027c
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> 2000-03-14 Greg McGary <gkm@gnu.org>
* c-lex.h (enum rid): Add RID_BOUNDED & RID_UNBOUNDED. * c-lex.h (enum rid): Add RID_BOUNDED & RID_UNBOUNDED.
......
...@@ -5785,6 +5785,7 @@ set_block_num (insn, bb) ...@@ -5785,6 +5785,7 @@ set_block_num (insn, bb)
and NOTE_INSN_BASIC_BLOCK and NOTE_INSN_BASIC_BLOCK
- check that all insns are in the basic blocks - check that all insns are in the basic blocks
(except the switch handling code, barriers and notes) (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 In future it can be extended check a lot of other stuff as well
(reachability of basic blocks, life information, etc. etc.). */ (reachability of basic blocks, life information, etc. etc.). */
...@@ -5988,6 +5989,12 @@ verify_flow_info () ...@@ -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); x = NEXT_INSN (x);
} }
...@@ -7759,7 +7766,18 @@ reorder_basic_blocks () ...@@ -7759,7 +7766,18 @@ reorder_basic_blocks ()
} }
} }
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++) for (i = 0; i < n_basic_blocks - 1; i++)
{ {
......
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