summaryrefslogtreecommitdiff
path: root/gcc/tree-profile.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-profile.c')
-rw-r--r--gcc/tree-profile.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c
index 0372c929840..b7d04661eeb 100644
--- a/gcc/tree-profile.c
+++ b/gcc/tree-profile.c
@@ -663,16 +663,6 @@ tree_profiling (void)
return 0;
}
-/* When profile instrumentation, use or test coverage shall be performed. */
-
-static bool
-gate_tree_profile_ipa (void)
-{
- return (!in_lto_p
- && (flag_branch_probabilities || flag_test_coverage
- || profile_arc_flag));
-}
-
namespace {
const pass_data pass_data_ipa_tree_profile =
@@ -697,11 +687,20 @@ public:
{}
/* opt_pass methods: */
- bool gate () { return gate_tree_profile_ipa (); }
+ virtual bool gate (function *);
unsigned int execute () { return tree_profiling (); }
}; // class pass_ipa_tree_profile
+bool
+pass_ipa_tree_profile::gate (function *)
+{
+ /* When profile instrumentation, use or test coverage shall be performed. */
+ return (!in_lto_p
+ && (flag_branch_probabilities || flag_test_coverage
+ || profile_arc_flag));
+}
+
} // anon namespace
simple_ipa_opt_pass *