summaryrefslogtreecommitdiff
path: root/gcc/dse.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/dse.c')
-rw-r--r--gcc/dse.c37
1 files changed, 12 insertions, 25 deletions
diff --git a/gcc/dse.c b/gcc/dse.c
index 09dc5df6e93..88b8c373bbf 100644
--- a/gcc/dse.c
+++ b/gcc/dse.c
@@ -608,11 +608,6 @@ static bitmap kill_on_calls;
/* The number of bits used in the global bitmaps. */
static unsigned int current_position;
-
-
-static bool gate_dse1 (void);
-static bool gate_dse2 (void);
-
/*----------------------------------------------------------------------------
Zeroth step.
@@ -3712,20 +3707,6 @@ rest_of_handle_dse (void)
return 0;
}
-static bool
-gate_dse1 (void)
-{
- return optimize > 0 && flag_dse
- && dbg_cnt (dse1);
-}
-
-static bool
-gate_dse2 (void)
-{
- return optimize > 0 && flag_dse
- && dbg_cnt (dse2);
-}
-
namespace {
const pass_data pass_data_rtl_dse1 =
@@ -3733,7 +3714,6 @@ const pass_data pass_data_rtl_dse1 =
RTL_PASS, /* type */
"dse1", /* name */
OPTGROUP_NONE, /* optinfo_flags */
- true, /* has_gate */
true, /* has_execute */
TV_DSE1, /* tv_id */
0, /* properties_required */
@@ -3751,8 +3731,12 @@ public:
{}
/* opt_pass methods: */
- bool gate () { return gate_dse1 (); }
- unsigned int execute () { return rest_of_handle_dse (); }
+ virtual bool gate (function *)
+ {
+ return optimize > 0 && flag_dse && dbg_cnt (dse1);
+ }
+
+ virtual unsigned int execute (function *) { return rest_of_handle_dse (); }
}; // class pass_rtl_dse1
@@ -3771,7 +3755,6 @@ const pass_data pass_data_rtl_dse2 =
RTL_PASS, /* type */
"dse2", /* name */
OPTGROUP_NONE, /* optinfo_flags */
- true, /* has_gate */
true, /* has_execute */
TV_DSE2, /* tv_id */
0, /* properties_required */
@@ -3789,8 +3772,12 @@ public:
{}
/* opt_pass methods: */
- bool gate () { return gate_dse2 (); }
- unsigned int execute () { return rest_of_handle_dse (); }
+ virtual bool gate (function *)
+ {
+ return optimize > 0 && flag_dse && dbg_cnt (dse2);
+ }
+
+ virtual unsigned int execute (function *) { return rest_of_handle_dse (); }
}; // class pass_rtl_dse2