aboutsummaryrefslogtreecommitdiff
path: root/gcc/flow.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>1999-03-04 07:01:06 -0800
committerRichard Henderson <rth@gcc.gnu.org>1999-03-04 07:01:06 -0800
commitaa3d4bf947a0c391a39c03294fb1bc69aa5e7fe3 (patch)
treeb8d93eab7304ab64217058a502249db8f7dc3a1f /gcc/flow.c
parentdd5657ed922e7da1d162987dec9bdece8630be7d (diff)
downloadgcc-aa3d4bf947a0c391a39c03294fb1bc69aa5e7fe3.zip
gcc-aa3d4bf947a0c391a39c03294fb1bc69aa5e7fe3.tar.gz
gcc-aa3d4bf947a0c391a39c03294fb1bc69aa5e7fe3.tar.bz2
flow.c (delete_unreachable_blocks): Mark blocks as they are put on to the worklist, not as they are taken off.
* flow.c (delete_unreachable_blocks): Mark blocks as they are put on to the worklist, not as they are taken off. From-SVN: r25584
Diffstat (limited to 'gcc/flow.c')
-rw-r--r--gcc/flow.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/gcc/flow.c b/gcc/flow.c
index 4b08eff..4f66156 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -1466,7 +1466,12 @@ delete_unreachable_blocks ()
support Fortran alternate entry points. */
for (e = ENTRY_BLOCK_PTR->succ; e ; e = e->succ_next)
- *tos++ = e->dest;
+ {
+ *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. */
@@ -1474,12 +1479,12 @@ delete_unreachable_blocks ()
{
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;
+ {
+ *tos++ = e->dest;
+ e->dest->aux = e;
+ }
}
/* Delete all unreachable basic blocks. Count down so that we don't