diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2016-06-03 19:00:19 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2016-06-03 17:00:19 +0000 |
commit | 641762ae264c86492d869d55559644e87ed36d46 (patch) | |
tree | 77e01c3bfeb741c9d3244647bd9b356c05368d43 /gcc/profile.c | |
parent | 0d2f700f7be6780985b2cfd6bfca44523e058cbc (diff) | |
download | gcc-641762ae264c86492d869d55559644e87ed36d46.zip gcc-641762ae264c86492d869d55559644e87ed36d46.tar.gz gcc-641762ae264c86492d869d55559644e87ed36d46.tar.bz2 |
tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop): Avoid use of profile unless profile status is PROFILE_READ.
* 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.
From-SVN: r237076
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 007379b..9925bb5 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 |