diff options
author | DJ Delorie <dj@redhat.com> | 2002-03-21 21:50:15 -0500 |
---|---|---|
committer | DJ Delorie <dj@gcc.gnu.org> | 2002-03-21 21:50:15 -0500 |
commit | fbc2782eff5df7b8d6c2c4a2cdf4cb92933aeeea (patch) | |
tree | d7d23d6655c2f0ceba0beacba09ffb8ab6a2d87c /gcc/predict.c | |
parent | c0561434cdccc513e6b1238302a5b8f798456b66 (diff) | |
download | gcc-fbc2782eff5df7b8d6c2c4a2cdf4cb92933aeeea.zip gcc-fbc2782eff5df7b8d6c2c4a2cdf4cb92933aeeea.tar.gz gcc-fbc2782eff5df7b8d6c2c4a2cdf4cb92933aeeea.tar.bz2 |
bb-reorder.c (make_reorder_chain_1): Protect against when redundant edges are omitted.
* bb-reorder.c (make_reorder_chain_1): Protect against
when redundant edges are omitted.
* predict.c (dump_prediction): Likewise.
From-SVN: r51160
Diffstat (limited to 'gcc/predict.c')
-rw-r--r-- | gcc/predict.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/predict.c b/gcc/predict.c index 61cfd63..56b0436 100644 --- a/gcc/predict.c +++ b/gcc/predict.c @@ -194,7 +194,7 @@ dump_prediction (predictor, probability, bb, used) if (!rtl_dump_file) return; - while (e->flags & EDGE_FALLTHRU) + while (e && (e->flags & EDGE_FALLTHRU)) e = e->succ_next; fprintf (rtl_dump_file, " %s heuristics%s: %.1f%%", @@ -205,9 +205,12 @@ dump_prediction (predictor, probability, bb, used) { fprintf (rtl_dump_file, " exec "); fprintf (rtl_dump_file, HOST_WIDEST_INT_PRINT_DEC, bb->count); - fprintf (rtl_dump_file, " hit "); - fprintf (rtl_dump_file, HOST_WIDEST_INT_PRINT_DEC, e->count); - fprintf (rtl_dump_file, " (%.1f%%)", e->count * 100.0 / bb->count); + if (e) + { + fprintf (rtl_dump_file, " hit "); + fprintf (rtl_dump_file, HOST_WIDEST_INT_PRINT_DEC, e->count); + fprintf (rtl_dump_file, " (%.1f%%)", e->count * 100.0 / bb->count); + } } fprintf (rtl_dump_file, "\n"); |