This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

split_block fix



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);
  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]