diff options
Diffstat (limited to 'gcc/predict.c')
-rw-r--r-- | gcc/predict.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/gcc/predict.c b/gcc/predict.c index 0b3016ce81f..4482d478381 100644 --- a/gcc/predict.c +++ b/gcc/predict.c @@ -2205,8 +2205,6 @@ tree_bb_level_predictions (void) } } -#ifdef ENABLE_CHECKING - /* Callback for hash_map::traverse, asserts that the pointer map is empty. */ @@ -2217,7 +2215,6 @@ assert_is_empty (const_basic_block const &, edge_prediction *const &value, gcc_assert (!value); return false; } -#endif /* Predict branch probabilities and estimate profile for basic block BB. */ @@ -2352,9 +2349,9 @@ tree_estimate_probability (void) FOR_EACH_BB_FN (bb, cfun) combine_predictions_for_bb (bb); -#ifdef ENABLE_CHECKING - bb_predictions->traverse<void *, assert_is_empty> (NULL); -#endif + if (flag_checking) + bb_predictions->traverse<void *, assert_is_empty> (NULL); + delete bb_predictions; bb_predictions = NULL; @@ -2545,11 +2542,10 @@ propagate_freq (basic_block head, bitmap tovisit) /* Compute frequency of basic block. */ if (bb != head) { -#ifdef ENABLE_CHECKING - FOR_EACH_EDGE (e, ei, bb->preds) - gcc_assert (!bitmap_bit_p (tovisit, e->src->index) - || (e->flags & EDGE_DFS_BACK)); -#endif + if (flag_checking) + FOR_EACH_EDGE (e, ei, bb->preds) + gcc_assert (!bitmap_bit_p (tovisit, e->src->index) + || (e->flags & EDGE_DFS_BACK)); FOR_EACH_EDGE (e, ei, bb->preds) if (EDGE_INFO (e)->back_edge) |