From: Hans-Peter Nilsson Date: Mon, 18 Oct 2004 01:56:03 +0000 (+0000) Subject: cfgrtl.c (rtl_verify_flow_info_1): When checking insns in a bb... X-Git-Tag: releases/gcc-4.0.0~3962 X-Git-Url: https://gcc.gnu.org/git/?a=commitdiff_plain;h=0ca541aab9c0266ebb9eaf59d8bfe088739b26f8;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 33de7acb422a..e372e745002a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2004-10-17 Hans-Peter Nilsson + + * 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 * doc/extend.texi (Attribute Syntax): Clarify details of diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index 67b55f4b79ad..ee0b468385e2 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -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)) diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index ec7bec39adcc..d81d71c9e22c 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -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; }