aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-profile.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2004-09-25 12:06:18 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2004-09-25 10:06:18 +0000
commitbbd236a198069ed5a9e9526b99f70f406c30e5c0 (patch)
treea844c1a79dda581a3aa0d026ae759027d7ec0a30 /gcc/tree-profile.c
parent70f3cc30aa04ab2f57f156c16a7f1db33084f04e (diff)
downloadgcc-bbd236a198069ed5a9e9526b99f70f406c30e5c0.zip
gcc-bbd236a198069ed5a9e9526b99f70f406c30e5c0.tar.gz
gcc-bbd236a198069ed5a9e9526b99f70f406c30e5c0.tar.bz2
predict.c (counts_to_freqs): Make glolbal.
* 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. From-SVN: r88093
Diffstat (limited to 'gcc/tree-profile.c')
-rw-r--r--gcc/tree-profile.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c
index 29299e5..00c36e2 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. */