diff options
Diffstat (limited to 'gcc/predict.c')
-rw-r--r-- | gcc/predict.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/gcc/predict.c b/gcc/predict.c index fbbc1579b39..2d1be03f1aa 100644 --- a/gcc/predict.c +++ b/gcc/predict.c @@ -179,8 +179,7 @@ tree_predicted_by_p (basic_block bb, enum br_predictor predictor) void predict_insn (rtx insn, enum br_predictor predictor, int probability) { - if (!any_condjump_p (insn)) - abort (); + gcc_assert (any_condjump_p (insn)); if (!flag_guess_branch_prob) return; @@ -1106,8 +1105,7 @@ expected_value_to_br_prob (void) cond = simplify_rtx (cond); /* Turn the condition into a scaled branch probability. */ - if (cond != const_true_rtx && cond != const0_rtx) - abort (); + gcc_assert (cond == const_true_rtx || cond == const0_rtx); predict_insn_def (insn, PRED_BUILTIN_EXPECT, cond == const_true_rtx ? TAKEN : NOT_TAKEN); } @@ -1208,8 +1206,8 @@ propagate_freq (struct loop *loop) { #ifdef ENABLE_CHECKING for (e = bb->pred; e; e = e->pred_next) - if (BLOCK_INFO (e->src)->tovisit && !(e->flags & EDGE_DFS_BACK)) - abort (); + gcc_assert (!BLOCK_INFO (e->src)->tovisit + || (e->flags & EDGE_DFS_BACK)); #endif for (e = bb->pred; e; e = e->pred_next) @@ -1353,8 +1351,7 @@ expensive_function_p (int threshold) /* We can not compute accurately for large thresholds due to scaled frequencies. */ - if (threshold > BB_FREQ_MAX) - abort (); + gcc_assert (threshold < BB_FREQ_MAX); /* Frequencies are out of range. This either means that function contains internal loop executing more than BB_FREQ_MAX times or profile feedback |