Commit 5d9f607b by Jan Hubicka Committed by Jan Hubicka

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
parent 49373252
2005-06-25 Jan Hubicka <jh@suse.cz>
* 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.
2005-06-25 Bernd Schmidt <bernd.schmidt@analog.com> 2005-06-25 Bernd Schmidt <bernd.schmidt@analog.com>
* config/bfin/bfin.md (ror_one, rol_one, ashrdi3, ashldi3, lshrdi3): * config/bfin/bfin.md (ror_one, rol_one, ashrdi3, ashldi3, lshrdi3):
......
...@@ -790,7 +790,8 @@ rest_of_handle_branch_prob (void) ...@@ -790,7 +790,8 @@ rest_of_handle_branch_prob (void)
timevar_push (TV_BRANCH_PROB); timevar_push (TV_BRANCH_PROB);
open_dump_file (DFI_bp, current_function_decl); 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 (); branch_prob ();
/* Discover and record the loop depth at the head of each basic /* Discover and record the loop depth at the head of each basic
...@@ -801,7 +802,7 @@ rest_of_handle_branch_prob (void) ...@@ -801,7 +802,7 @@ rest_of_handle_branch_prob (void)
flow_loops_dump (&loops, dump_file, NULL, 0); flow_loops_dump (&loops, dump_file, NULL, 0);
/* Estimate using heuristics if no profiling info is available. */ /* 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); estimate_probability (&loops);
flow_loops_free (&loops); flow_loops_free (&loops);
...@@ -1579,9 +1580,9 @@ rest_of_compilation (void) ...@@ -1579,9 +1580,9 @@ rest_of_compilation (void)
timevar_push (TV_FLOW); timevar_push (TV_FLOW);
rest_of_handle_cfg (); rest_of_handle_cfg ();
if (!flag_tree_based_profiling if (optimize > 0
&& (optimize > 0 || profile_arc_flag || ((profile_arc_flag || flag_test_coverage || flag_branch_probabilities)
|| flag_test_coverage || flag_branch_probabilities)) && !flag_tree_based_profiling))
{ {
rtl_register_profile_hooks (); rtl_register_profile_hooks ();
rtl_register_value_prof_hooks (); rtl_register_value_prof_hooks ();
...@@ -1589,6 +1590,7 @@ rest_of_compilation (void) ...@@ -1589,6 +1590,7 @@ rest_of_compilation (void)
if (flag_branch_probabilities if (flag_branch_probabilities
&& flag_profile_values && flag_profile_values
&& !flag_tree_based_profiling
&& (flag_value_profile_transformations && (flag_value_profile_transformations
|| flag_speculative_prefetching)) || flag_speculative_prefetching))
rest_of_handle_value_profile_transformations (); rest_of_handle_value_profile_transformations ();
......
...@@ -1383,7 +1383,7 @@ tree_estimate_probability (void) ...@@ -1383,7 +1383,7 @@ tree_estimate_probability (void)
FOR_EACH_BB (bb) FOR_EACH_BB (bb)
combine_predictions_for_bb (dump_file, bb); combine_predictions_for_bb (dump_file, bb);
if (0) /* FIXME: Enable once we are pass down the profile to RTL level. */ if (!flag_loop_optimize)
strip_builtin_expect (); strip_builtin_expect ();
estimate_bb_frequencies (&loops_info); estimate_bb_frequencies (&loops_info);
free_dominance_info (CDI_POST_DOMINATORS); free_dominance_info (CDI_POST_DOMINATORS);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment