From ffedd2549f6fe6cd65d27e8608032b38c940e79d Mon Sep 17 00:00:00 2001 From: hubicka Date: Sat, 25 Sep 2004 10:06:18 +0000 Subject: * predict.c (counts_to_freqs): Make glolbal. * predict.h (counts_to_freqa): Declare. * profile.c (compute_branch_probabilities): Compute frequencies * tree-profile.c (do_tree_profiling): Refine conditional on when tree profiling pass is needed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88093 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree-profile.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gcc/tree-profile.c') diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c index 29299e53cca..00c36e233ec 100644 --- a/gcc/tree-profile.c +++ b/gcc/tree-profile.c @@ -160,12 +160,14 @@ tree_gen_const_delta_profiler (histogram_value value ATTRIBUTE_UNUSED, static bool do_tree_profiling (void) { - if (flag_tree_based_profiling) + if (flag_tree_based_profiling + && (profile_arc_flag || flag_test_coverage || flag_branch_probabilities)) { tree_register_profile_hooks (); tree_register_value_prof_hooks (); + return true; } - return flag_tree_based_profiling; + return false; } /* Return the file on which profile dump output goes, if any. */ -- cgit v1.2.1