cfgcleanup.c (merge_blocks_move_predecessor_nojumps, [...]): Set BB_UPDATE_LIFE.
authorJan Hubicka <jh@suse.cz>
Sat, 27 Oct 2001 10:17:44 +0000 (12:17 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sat, 27 Oct 2001 10:17:44 +0000 (10:17 +0000)
* cfgcleanup.c (merge_blocks_move_predecessor_nojumps,
merge_blocks_move_successors_nojumps): Set BB_UPDATE_LIFE.
(merge_blocks): Properly udpate life after making edge nonfallthru.
* cfgrtl.c (merge_blocks_nomove): Update global_live_at_end.

From-SVN: r46564

gcc/ChangeLog
gcc/cfgcleanup.c
gcc/cfgrtl.c

index 3ae47434d0fc2d54ee138dfa3c983871741ee843..686842ae328bc97469e510dc344578add14976ce 100644 (file)
@@ -1,3 +1,10 @@
+Sat Oct 27 12:12:09 CEST 2001  Jan Hubicka  <jh@suse.cz>
+
+       * cfgcleanup.c (merge_blocks_move_predecessor_nojumps,
+       merge_blocks_move_successors_nojumps): Set BB_UPDATE_LIFE.
+       (merge_blocks): Properly udpate life after making edge nonfallthru.
+       * cfgrtl.c (merge_blocks_nomove): Update global_live_at_end.
+
 2001-10-26  Kazu Hirata  <kazu@hxi.com>
 
        * config/h8300/h8300.c (get_shift_alg): Remove redundant code.
index a1c13f5cb6ce9481c57f331e6ea0ce75b78c9818..f3869095db6b9bb2037a02e621647737c4b70a5e 100644 (file)
@@ -334,6 +334,7 @@ merge_blocks_move_predecessor_nojumps (a, b)
   /* Scramble the insn chain.  */
   if (a->end != PREV_INSN (b->head))
     reorder_insns_nobb (a->head, a->end, PREV_INSN (b->head));
+  BB_SET_FLAG (a, BB_UPDATE_LIFE);
 
   if (rtl_dump_file)
     {
@@ -402,6 +403,7 @@ merge_blocks_move_successor_nojumps (a, b)
 
   /* Now blocks A and B are contiguous.  Merge them.  */
   merge_blocks_nomove (a, b);
+  BB_SET_FLAG (a, BB_UPDATE_LIFE);
 
   if (rtl_dump_file)
     {
@@ -488,10 +490,14 @@ merge_blocks (e, b, c, mode)
 
       if (b_has_incoming_fallthru)
        {
+         rtx bb;
          if (b_fallthru_edge->src == ENTRY_BLOCK_PTR)
            return false;
-         BB_SET_FLAG (b_fallthru_edge, BB_UPDATE_LIFE);
-         notice_new_block (force_nonfallthru (b_fallthru_edge));
+         bb = force_nonfallthru (b_fallthru_edge);
+         if (bb)
+           notice_new_block (bb);
+         else
+           BB_SET_FLAG (b_fallthru_edge->src, BB_UPDATE_LIFE);
        }
       merge_blocks_move_predecessor_nojumps (b, c);
       return true;
index edd88bd9a0f189c4dbaeed7928d876c12137e9fe..88a6f498468bb566adec79a4f0dff3d60414823c 100644 (file)
@@ -603,6 +603,7 @@ merge_blocks_nomove (a, b)
 
   /* B hasn't quite yet ceased to exist.  Attempt to prevent mishap.  */
   b->pred = b->succ = NULL;
+  a->global_live_at_end = b->global_live_at_end;
 
   expunge_block (b);