diff options
author | dje <dje@138bc75d-0d04-0410-961f-82ee72b054a4> | 1995-05-13 01:51:10 +0000 |
---|---|---|
committer | dje <dje@138bc75d-0d04-0410-961f-82ee72b054a4> | 1995-05-13 01:51:10 +0000 |
commit | e69ab374fbe96d1d84963311389307e330648aef (patch) | |
tree | 23e8a241fe09d6c61b3154ffe7fd3575f9fd4794 /gcc/flow.c | |
parent | abcdad4f288274cfd665d5bbf6408aacc95ebd8a (diff) | |
download | gcc-e69ab374fbe96d1d84963311389307e330648aef.tar.gz |
(find_basic_blocks): Only perform n_basic_blocks sanity
check on first pass, and on second pass ensure it has the correct value.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@9671 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/flow.c')
-rw-r--r-- | gcc/flow.c | 10 |
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; } } |