diff options
author | Jan Hubicka <jh@suse.cz> | 2005-06-25 13:57:53 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2005-06-25 11:57:53 +0000 |
commit | 5d9f607b1b3e84f2f360aa758bcedf181649e5bb (patch) | |
tree | fcd0bb9afb768f1dc2170bdeaffb0ba47bc7696e /gcc/passes.c | |
parent | 49373252db90030369310429e5c755f26d20f67f (diff) | |
download | gcc-5d9f607b1b3e84f2f360aa758bcedf181649e5bb.zip gcc-5d9f607b1b3e84f2f360aa758bcedf181649e5bb.tar.gz gcc-5d9f607b1b3e84f2f360aa758bcedf181649e5bb.tar.bz2 |
passes.c (rest_of_handle_branch_prob): Do not rebuild profiling info when not neecesary
* passes.c (rest_of_handle_branch_prob): Do not rebuild profiling info
when not neecesary
(rest_of_compilation): Fix conditional on branch prob pass.
* predict.c (tree_estimate_probability): Enable strip_builtin_expect
when not loop optimizing.
From-SVN: r101321
Diffstat (limited to 'gcc/passes.c')
-rw-r--r-- | gcc/passes.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/passes.c b/gcc/passes.c index 4eff6c6..126427f 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -790,7 +790,8 @@ rest_of_handle_branch_prob (void) timevar_push (TV_BRANCH_PROB); open_dump_file (DFI_bp, current_function_decl); - if (profile_arc_flag || flag_test_coverage || flag_branch_probabilities) + if ((profile_arc_flag || flag_test_coverage || flag_branch_probabilities) + && !flag_tree_based_profiling) branch_prob (); /* Discover and record the loop depth at the head of each basic @@ -801,7 +802,7 @@ rest_of_handle_branch_prob (void) flow_loops_dump (&loops, dump_file, NULL, 0); /* Estimate using heuristics if no profiling info is available. */ - if (flag_guess_branch_prob) + if (flag_guess_branch_prob && profile_status == PROFILE_ABSENT) estimate_probability (&loops); flow_loops_free (&loops); @@ -1579,9 +1580,9 @@ rest_of_compilation (void) timevar_push (TV_FLOW); rest_of_handle_cfg (); - if (!flag_tree_based_profiling - && (optimize > 0 || profile_arc_flag - || flag_test_coverage || flag_branch_probabilities)) + if (optimize > 0 + || ((profile_arc_flag || flag_test_coverage || flag_branch_probabilities) + && !flag_tree_based_profiling)) { rtl_register_profile_hooks (); rtl_register_value_prof_hooks (); @@ -1589,6 +1590,7 @@ rest_of_compilation (void) if (flag_branch_probabilities && flag_profile_values + && !flag_tree_based_profiling && (flag_value_profile_transformations || flag_speculative_prefetching)) rest_of_handle_value_profile_transformations (); |