summaryrefslogtreecommitdiff
path: root/gcc/ipa-cp.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ipa-cp.c')
-rw-r--r--gcc/ipa-cp.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index 1f28b698d08..ee48fc095ad 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -3762,16 +3762,6 @@ ipcp_read_summary (void)
ipa_prop_read_jump_functions ();
}
-/* Gate for IPCP optimization. */
-
-static bool
-cgraph_gate_cp (void)
-{
- /* FIXME: We should remove the optimize check after we ensure we never run
- IPA passes when not optimizing. */
- return flag_ipa_cp && optimize;
-}
-
namespace {
const pass_data pass_data_ipa_cp =
@@ -3807,7 +3797,13 @@ public:
{}
/* opt_pass methods: */
- bool gate () { return cgraph_gate_cp (); }
+ virtual bool gate (function *)
+ {
+ /* FIXME: We should remove the optimize check after we ensure we never run
+ IPA passes when not optimizing. */
+ return flag_ipa_cp && optimize;
+ }
+
unsigned int execute () { return ipcp_driver (); }
}; // class pass_ipa_cp