summaryrefslogtreecommitdiff
path: root/gcc/flow.c
diff options
context:
space:
mode:
authorDoug Evans <dje@gnu.org>1995-05-13 01:51:10 +0000
committerDoug Evans <dje@gnu.org>1995-05-13 01:51:10 +0000
commit2aec79e2e106aa3901088d1a8f299dc3746107a3 (patch)
tree23e8a241fe09d6c61b3154ffe7fd3575f9fd4794 /gcc/flow.c
parent64c01f8071113aff84414204e9d63cff3701bfb7 (diff)
downloadgcc-2aec79e2e106aa3901088d1a8f299dc3746107a3.tar.gz
(find_basic_blocks): Only perform n_basic_blocks sanity check on first pass...
(find_basic_blocks): Only perform n_basic_blocks sanity check on first pass, and on second pass ensure it has the correct value. From-SVN: r9671
Diffstat (limited to 'gcc/flow.c')
-rw-r--r--gcc/flow.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/flow.c b/gcc/flow.c
index a39b66881cb..d7467e5bb1e 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -485,8 +485,12 @@ find_basic_blocks (f, nonlocal_label_list)
prev_code = code;
}
- if (i + 1 != n_basic_blocks)
+ /* During the second pass, `n_basic_blocks' is only an upper bound.
+ Only perform the sanity check for the first pass, and on the second
+ pass ensure `n_basic_blocks' is set to the correct value. */
+ if (pass == 1 && i + 1 != n_basic_blocks)
abort ();
+ n_basic_blocks = i + 1;
/* Don't delete the labels (in this function)
that are referenced by non-jump instructions. */
@@ -743,6 +747,10 @@ find_basic_blocks (f, nonlocal_label_list)
{
pass++;
n_basic_blocks -= deleted;
+ /* `n_basic_blocks' may not be correct at this point: two previously
+ separate blocks may now be merged. That's ok though as we
+ recalculate it during the second pass. It certainly can't be
+ any larger than the current value. */
goto restart;
}
}