summaryrefslogtreecommitdiff
path: root/gcc/ipa-split.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ipa-split.c')
-rw-r--r--gcc/ipa-split.c44
1 files changed, 20 insertions, 24 deletions
diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c
index ebb91973fcc..187dc988489 100644
--- a/gcc/ipa-split.c
+++ b/gcc/ipa-split.c
@@ -1646,17 +1646,6 @@ execute_split_functions (void)
return todo;
}
-/* Gate function splitting pass. When doing profile feedback, we want
- to execute the pass after profiling is read. So disable one in
- early optimization. */
-
-static bool
-gate_split_functions (void)
-{
- return (flag_partial_inlining
- && !profile_arc_flag && !flag_branch_probabilities);
-}
-
namespace {
const pass_data pass_data_split_functions =
@@ -1681,11 +1670,20 @@ public:
{}
/* opt_pass methods: */
- bool gate () { return gate_split_functions (); }
+ virtual bool gate (function *);
unsigned int execute () { return execute_split_functions (); }
}; // class pass_split_functions
+bool
+pass_split_functions::gate (function *)
+{
+ /* When doing profile feedback, we want to execute the pass after profiling
+ is read. So disable one in early optimization. */
+ return (flag_partial_inlining
+ && !profile_arc_flag && !flag_branch_probabilities);
+}
+
} // anon namespace
gimple_opt_pass *
@@ -1694,17 +1692,6 @@ make_pass_split_functions (gcc::context *ctxt)
return new pass_split_functions (ctxt);
}
-/* Gate feedback driven function splitting pass.
- We don't need to split when profiling at all, we are producing
- lousy code anyway. */
-
-static bool
-gate_feedback_split_functions (void)
-{
- return (flag_partial_inlining
- && flag_branch_probabilities);
-}
-
/* Execute function splitting pass. */
static unsigned int
@@ -1740,11 +1727,20 @@ public:
{}
/* opt_pass methods: */
- bool gate () { return gate_feedback_split_functions (); }
+ virtual bool gate (function *);
unsigned int execute () { return execute_feedback_split_functions (); }
}; // class pass_feedback_split_functions
+bool
+pass_feedback_split_functions::gate (function *)
+{
+ /* We don't need to split when profiling at all, we are producing
+ lousy code anyway. */
+ return (flag_partial_inlining
+ && flag_branch_probabilities);
+}
+
} // anon namespace
gimple_opt_pass *