diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2016-05-28 18:20:06 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2016-05-28 16:20:06 +0000 |
commit | 1428d9e013ba47c9257d2fc33378b6bb45308b87 (patch) | |
tree | 3904a58f4874d2c80bb097f84fc3add4d47eb015 /gcc | |
parent | 5aabc487d3bd2d6c973c0b18edba58267b623c3d (diff) | |
download | gcc-1428d9e013ba47c9257d2fc33378b6bb45308b87.zip gcc-1428d9e013ba47c9257d2fc33378b6bb45308b87.tar.gz gcc-1428d9e013ba47c9257d2fc33378b6bb45308b87.tar.bz2 |
profile.c (compute_branch_probabilities): Do not report hitrates here.
* profile.c (compute_branch_probabilities): Do not report hitrates
here.
(branch_prob): Report hitrates here.
* predict.c (gimple_predict_edge): Do not assert profile status;
fix formatting issues.
From-SVN: r236849
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/predict.c | 8 | ||||
-rw-r--r-- | gcc/profile.c | 4 |
3 files changed, 14 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3a75b803..3856745 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,13 @@ 2016-05-27 Jan Hubicka <hubicka@ucw.cz> + * profile.c (compute_branch_probabilities): Do not report hitrates + here. + (branch_prob): Report hitrates here. + * predict.c (gimple_predict_edge): Do not assert profile status; + fix formatting issues. + +2016-05-27 Jan Hubicka <hubicka@ucw.cz> + * predict.c (edge_predicted_by_p): New function. (predict_paths_for_bb): Do not put multiple predictions of the same type on one edge. diff --git a/gcc/predict.c b/gcc/predict.c index 22ec8a0..3743b01 100644 --- a/gcc/predict.c +++ b/gcc/predict.c @@ -593,10 +593,10 @@ rtl_predict_edge (edge e, enum br_predictor predictor, int probability) void gimple_predict_edge (edge e, enum br_predictor predictor, int probability) { - gcc_assert (profile_status_for_fn (cfun) != PROFILE_GUESSED); - if ((e->src != ENTRY_BLOCK_PTR_FOR_FN (cfun) && EDGE_COUNT (e->src->succs) > - 1) - && flag_guess_branch_prob && optimize) + if (e->src != ENTRY_BLOCK_PTR_FOR_FN (cfun) + && EDGE_COUNT (e->src->succs) > 1 + && flag_guess_branch_prob + && optimize) { struct edge_prediction *i = XNEW (struct edge_prediction); edge_prediction *&preds = bb_predictions->get_or_insert (e->src); diff --git a/gcc/profile.c b/gcc/profile.c index 39c81d4..007379b 100644 --- a/gcc/profile.c +++ b/gcc/profile.c @@ -845,8 +845,6 @@ compute_branch_probabilities (unsigned cfg_checksum, unsigned lineno_checksum) fputc ('\n', dump_file); fputc ('\n', dump_file); } - if (dump_file && (dump_flags & TDF_DETAILS)) - report_predictor_hitrates (); free_aux_for_blocks (); } @@ -1331,6 +1329,8 @@ branch_prob (void) values.release (); free_edge_list (el); coverage_end_function (lineno_checksum, cfg_checksum); + if (dump_file && (dump_flags & TDF_DETAILS)) + report_predictor_hitrates (); } /* Union find algorithm implementation for the basic blocks using |