diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-06-03 17:00:19 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-06-03 17:00:19 +0000 |
commit | 6b8acb63e8919ac119da84ab07f45943679e3fe9 (patch) | |
tree | 77e01c3bfeb741c9d3244647bd9b356c05368d43 /gcc/profile.c | |
parent | 20702ea3d8432503097bcd2f0cb6daacc9c60f0d (diff) |
* tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop): Avoid
use of profile unless profile status is PROFILE_READ.
* profile.c (compute_branch_probabilities): Set profile status
only after reporting predictor hitrates.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@237076 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/profile.c')
-rw-r--r-- | gcc/profile.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/profile.c b/gcc/profile.c index 007379baa13..9925bb568c6 100644 --- a/gcc/profile.c +++ b/gcc/profile.c @@ -826,8 +826,6 @@ compute_branch_probabilities (unsigned cfg_checksum, unsigned lineno_checksum) } } counts_to_freqs (); - profile_status_for_fn (cfun) = PROFILE_READ; - compute_function_frequency (); if (dump_file) { @@ -1329,8 +1327,13 @@ 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 (); + if (flag_branch_probabilities && profile_info) + { + if (dump_file && (dump_flags & TDF_DETAILS)) + report_predictor_hitrates (); + profile_status_for_fn (cfun) = PROFILE_READ; + compute_function_frequency (); + } } /* Union find algorithm implementation for the basic blocks using |