summaryrefslogtreecommitdiff
path: root/gcc/ipa-devirt.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ipa-devirt.c')
-rw-r--r--gcc/ipa-devirt.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c
index 399485e5610..085e64856d4 100644
--- a/gcc/ipa-devirt.c
+++ b/gcc/ipa-devirt.c
@@ -2096,16 +2096,6 @@ ipa_devirt (void)
return ndevirtualized ? TODO_remove_functions : 0;
}
-/* Gate for speculative IPA devirtualization optimization. */
-
-static bool
-gate_ipa_devirt (void)
-{
- return (flag_devirtualize
- && flag_devirtualize_speculatively
- && optimize);
-}
-
namespace {
const pass_data pass_data_ipa_devirt =
@@ -2113,7 +2103,6 @@ const pass_data pass_data_ipa_devirt =
IPA_PASS, /* type */
"devirt", /* name */
OPTGROUP_NONE, /* optinfo_flags */
- true, /* has_gate */
true, /* has_execute */
TV_IPA_DEVIRT, /* tv_id */
0, /* properties_required */
@@ -2140,8 +2129,14 @@ public:
{}
/* opt_pass methods: */
- bool gate () { return gate_ipa_devirt (); }
- unsigned int execute () { return ipa_devirt (); }
+ virtual bool gate (function *)
+ {
+ return (flag_devirtualize
+ && flag_devirtualize_speculatively
+ && optimize);
+ }
+
+ virtual unsigned int execute (function *) { return ipa_devirt (); }
}; // class pass_ipa_devirt