cfgrtl.c (rtl_verify_flow_info_1): When checking insns in a bb...

* cfgrtl.c (rtl_verify_flow_info_1): When checking insns in a bb,
	handle barriers in a bb by checking that it points to a NULL bb.
	* emit-rtl.c (emit_barrier_before): Set BLOCK_FOR_INSN to NULL.
	(emit_barrier_after, emit_barrier): Ditto.

From-SVN: r89193
This commit is contained in:
Hans-Peter Nilsson 2004-10-18 01:56:03 +00:00 committed by Hans-Peter Nilsson
parent 7dcb044217
commit 0ca541aab9
3 changed files with 14 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2004-10-17 Hans-Peter Nilsson <hp@bitrange.com>
* cfgrtl.c (rtl_verify_flow_info_1): When checking insns in a bb,
handle barriers in a bb by checking that it points to a NULL bb.
* emit-rtl.c (emit_barrier_before): Set BLOCK_FOR_INSN to NULL.
(emit_barrier_after, emit_barrier): Ditto.
2004-10-18 Joseph S. Myers <jsm@polyomino.org.uk>
* doc/extend.texi (Attribute Syntax): Clarify details of

View File

@ -2073,7 +2073,10 @@ rtl_verify_flow_info_1 (void)
}
for (x = BB_HEAD (bb); x != NEXT_INSN (BB_END (bb)); x = NEXT_INSN (x))
if (BLOCK_FOR_INSN (x) != bb)
/* We may have a barrier inside a basic block before dead code
elimination. They always have a NULL BLOCK_FOR_INSN. */
if (BLOCK_FOR_INSN (x) != bb
&& !(BARRIER_P (x) && BLOCK_FOR_INSN (x) == NULL))
{
debug_rtx (x);
if (! BLOCK_FOR_INSN (x))

View File

@ -4057,6 +4057,7 @@ emit_barrier_before (rtx before)
rtx insn = rtx_alloc (BARRIER);
INSN_UID (insn) = cur_insn_uid++;
BLOCK_FOR_INSN (insn) = NULL;
add_insn_before (insn, before);
return insn;
@ -4272,6 +4273,7 @@ emit_barrier_after (rtx after)
rtx insn = rtx_alloc (BARRIER);
INSN_UID (insn) = cur_insn_uid++;
BLOCK_FOR_INSN (insn) = NULL;
add_insn_after (insn, after);
return insn;
@ -4668,6 +4670,7 @@ emit_barrier (void)
{
rtx barrier = rtx_alloc (BARRIER);
INSN_UID (barrier) = cur_insn_uid++;
BLOCK_FOR_INSN (barrier) = NULL;
add_insn (barrier);
return barrier;
}