This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: remaining libjava/verify_local_live_at_start failures
> mmix-knuth-mmixware:
> g77.f-torture/compile/970915-0.f: In subroutine `tstsig11':
> g77.f-torture/compile/970915-0.f:19: Internal compiler error in verify_local_live_at_start, at flow.c:607
> with -Os
The problem is that global liveness is not recomputed after dead code removal
keeping it in inconsistent state. Fixed by iterating until stabilizes:
OK for branch/mainline?
Mon Mar 25 11:48:34 CET 2002 Jan Hubicka <jh@suse.cz>
* flow.c (update_life_info): Iterate dead code removal until it stabilizes.
*** flow.c Fri Mar 22 16:36:07 2002
--- /home/hubicka/flow.c Mon Mar 25 11:48:23 2002
*************** update_life_info (blocks, extent, prop_f
*** 661,684 ****
prop_flags & (PROP_SCAN_DEAD_CODE
| PROP_ALLOW_CFG_CHANGES));
! if ((prop_flags & (PROP_KILL_DEAD_CODE | PROP_ALLOW_CFG_CHANGES))
! != (PROP_KILL_DEAD_CODE | PROP_ALLOW_CFG_CHANGES))
! break;
! /* Removing dead code may allow the CFG to be simplified which
! in turn may allow for further dead code detection / removal. */
! for (i = n_basic_blocks - 1; i >= 0; --i)
{
! basic_block bb = BASIC_BLOCK (i);
! COPY_REG_SET (tmp, bb->global_live_at_end);
! changed |= propagate_block (bb, tmp, NULL, NULL,
! prop_flags & (PROP_SCAN_DEAD_CODE
! | PROP_KILL_DEAD_CODE));
}
! if (! changed || ! cleanup_cfg (CLEANUP_EXPENSIVE))
break;
}
/* If asked, remove notes from the blocks we'll update. */
--- 661,696 ----
prop_flags & (PROP_SCAN_DEAD_CODE
| PROP_ALLOW_CFG_CHANGES));
! if (blocks && !(prop_flags & PROP_KILL_DEAD_CODE))
! {
! EXECUTE_IF_SET_IN_SBITMAP (blocks, 0, i,
! {
! basic_block bb = BASIC_BLOCK (i);
! COPY_REG_SET (tmp, bb->global_live_at_end);
! changed |= propagate_block (bb, tmp, NULL, NULL,
! prop_flags & (PROP_SCAN_DEAD_CODE
! | PROP_KILL_DEAD_CODE));
! });
! }
! else
{
! for (i = n_basic_blocks - 1; i >= 0; --i)
! {
! basic_block bb = BASIC_BLOCK (i);
! COPY_REG_SET (tmp, bb->global_live_at_end);
! changed |= propagate_block (bb, tmp, NULL, NULL,
! prop_flags & (PROP_SCAN_DEAD_CODE
! | PROP_KILL_DEAD_CODE));
! }
}
! if (! changed)
break;
+
+ if (prop_flags & PROP_ALLOW_CFG_CHANGES)
+ cleanup_cfg (CLEANUP_EXPENSIVE);
}
/* If asked, remove notes from the blocks we'll update. */