diff options
Diffstat (limited to 'gcc/tree-profile.c')
-rw-r--r-- | gcc/tree-profile.c | 6 |
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. */ |