cfgcleanup bugfix installed
Jan Hubicka
jh@suse.cz
Sat Oct 27 03:17:00 GMT 2001
Hi,
attached patch fixes 3 problems in the merge_blocks life updating.
The patch allows me to bootstrap sparc/fixes the regressions on ppc/i386
caused by my previous patch and solves the SH failure I do have.
I've installed it as obvious.
Sat Oct 27 12:01:04 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.
Index: cfgcleanup.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cfgcleanup.c,v
retrieving revision 1.12
diff -c -3 -p -r1.12 cfgcleanup.c
*** cfgcleanup.c 2001/10/26 11:16:09 1.12
--- cfgcleanup.c 2001/10/27 09:32:55
*************** merge_blocks_move_predecessor_nojumps (a
*** 334,339 ****
--- 334,340 ----
/* 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)
{
*************** merge_blocks_move_successor_nojumps (a,
*** 402,407 ****
--- 403,409 ----
/* 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)
{
*************** merge_blocks (e, b, c, mode)
*** 488,497 ****
if (b_has_incoming_fallthru)
{
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));
}
merge_blocks_move_predecessor_nojumps (b, c);
return true;
--- 490,503 ----
if (b_has_incoming_fallthru)
{
+ rtx bb;
if (b_fallthru_edge->src == ENTRY_BLOCK_PTR)
return false;
! 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: cfgrtl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cfgrtl.c,v
retrieving revision 1.4
diff -c -3 -p -r1.4 cfgrtl.c
*** cfgrtl.c 2001/10/11 03:15:24 1.4
--- cfgrtl.c 2001/10/27 09:32:56
*************** merge_blocks_nomove (a, b)
*** 603,608 ****
--- 603,609 ----
/* 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);
More information about the Gcc-patches
mailing list