flow worklist patch [Re: Can you tell me what they are?]
Richard Henderson
rth@cygnus.com
Thu Mar 4 13:29:00 GMT 1999
On Thu, Mar 04, 1999 at 10:06:11AM -0800, H.J. Lu wrote:
> This patch seems to fix my libg++ problem.
This should do the job. Though of course I can't tell since
I don't have a test case.
r~
* flow.c (delete_unreachable_blocks): Mark blocks as they
are put on to the worklist, not as they are taken off.
Index: flow.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/flow.c,v
retrieving revision 1.101
diff -c -p -d -r1.101 flow.c
*** flow.c 1999/02/28 16:41:04 1.101
--- flow.c 1999/03/04 21:26:47
*************** delete_unreachable_blocks ()
*** 1466,1472 ****
support Fortran alternate entry points. */
for (e = ENTRY_BLOCK_PTR->succ; e ; e = e->succ_next)
! *tos++ = e->dest;
/* Iterate: find everything reachable from what we've already seen. */
--- 1466,1477 ----
support Fortran alternate entry points. */
for (e = ENTRY_BLOCK_PTR->succ; e ; e = e->succ_next)
! {
! *tos++ = e->dest;
!
! /* Mark the block with a handy non-null value. */
! e->dest->aux = e;
! }
/* Iterate: find everything reachable from what we've already seen. */
*************** delete_unreachable_blocks ()
*** 1474,1485 ****
{
basic_block b = *--tos;
- /* Mark the block with a handy non-null value. */
- b->aux = b;
-
for (e = b->succ; e ; e = e->succ_next)
if (!e->dest->aux)
! *tos++ = e->dest;
}
/* Delete all unreachable basic blocks. Count down so that we don't
--- 1479,1490 ----
{
basic_block b = *--tos;
for (e = b->succ; e ; e = e->succ_next)
if (!e->dest->aux)
! {
! *tos++ = e->dest;
! e->dest->aux = e;
! }
}
/* Delete all unreachable basic blocks. Count down so that we don't
More information about the Gcc-patches
mailing list