diff options
author | hp <hp@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-18 01:56:03 +0000 |
---|---|---|
committer | hp <hp@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-18 01:56:03 +0000 |
commit | fdd27295d2f5f9c21c117bf4f7d67c723ed7995c (patch) | |
tree | bbebfb96d0d97a29670e84dd15e52b3e6c0e9e7c /gcc | |
parent | b19fb6277ece8b0181d50e2a4aad46cd9421ea2e (diff) | |
download | linaro-gcc-fdd27295d2f5f9c21c117bf4f7d67c723ed7995c.tar.gz linaro-gcc-fdd27295d2f5f9c21c117bf4f7d67c723ed7995c.tar.bz2 linaro-gcc-fdd27295d2f5f9c21c117bf4f7d67c723ed7995c.zip |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89193 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/cfgrtl.c | 5 | ||||
-rw-r--r-- | gcc/emit-rtl.c | 3 |
3 files changed, 14 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 33de7acb422..e372e745002 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index 67b55f4b79a..ee0b468385e 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 ec7bec39adc..d81d71c9e22 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; } |