This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
split_block fix
- To: gcc-patches at gcc dot gnu dot org, rth at cygnus dot com, patches at x86-64 dot org
- Subject: split_block fix
- From: Jan Hubicka <jh at suse dot cz>
- Date: Tue, 17 Jul 2001 17:16:16 +0200
Hi,
this patch fixes split_block to work when asked to split after last insn
in basic block. (this is used by find_sub_basic_blocks for code labels at
the end of BB).
Bootstrapped/regtested i686 with previous patch.
Honza
Tue Jul 17 17:08:53 CEST 2001 Jan Hubicka <jh@suse.cz>
* flow.c (split_block): Update new_bb->end note if new_bb is empty.
Index: flow.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/flow.c,v
retrieving revision 1.429
diff -c -3 -p -r1.429 flow.c
*** flow.c 2001/07/17 04:55:23 1.429
--- flow.c 2001/07/17 14:57:11
*************** split_block (bb, insn)
*** 1574,1579 ****
--- 1557,1564 ----
NOTE_BASIC_BLOCK (bb_note) = new_bb;
new_bb->head = bb_note;
}
+ if (new_bb->head == new_bb->end)
+ new_bb->end = bb_note;
update_bb_for_insn (new_bb);