summaryrefslogtreecommitdiff
path: root/gcc/predict.c
diff options
context:
space:
mode:
authordj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>2002-03-22 02:50:15 +0000
committerdj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>2002-03-22 02:50:15 +0000
commit12c94d25ecf719556287a4be26762ad3c1a9e0cd (patch)
treed7d23d6655c2f0ceba0beacba09ffb8ab6a2d87c /gcc/predict.c
parent11b4f29a3ac806752f8de43d37ca2b3533b7807e (diff)
downloadgcc-12c94d25ecf719556287a4be26762ad3c1a9e0cd.tar.gz
* bb-reorder.c (make_reorder_chain_1): Protect against
when redundant edges are omitted. * predict.c (dump_prediction): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51160 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/predict.c')
-rw-r--r--gcc/predict.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/predict.c b/gcc/predict.c
index 61cfd63cd7c..56b04365b3f 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");