aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgcleanup.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cfgcleanup.c')
-rw-r--r--gcc/cfgcleanup.c37
1 files changed, 17 insertions, 20 deletions
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c
index d5d68bf..d793a70 100644
--- a/gcc/cfgcleanup.c
+++ b/gcc/cfgcleanup.c
@@ -3078,17 +3078,6 @@ cleanup_cfg (int mode)
return changed;
}
-static unsigned int
-execute_jump (void)
-{
- delete_trivially_dead_insns (get_insns (), max_reg_num ());
- if (dump_file)
- dump_flow_info (dump_file, dump_flags);
- cleanup_cfg ((optimize ? CLEANUP_EXPENSIVE : 0)
- | (flag_thread_jumps ? CLEANUP_THREADING : 0));
- return 0;
-}
-
namespace {
const pass_data pass_data_jump =
@@ -3113,10 +3102,21 @@ public:
{}
/* opt_pass methods: */
- unsigned int execute () { return execute_jump (); }
+ virtual unsigned int execute (function *);
}; // class pass_jump
+unsigned int
+pass_jump::execute (function *)
+{
+ delete_trivially_dead_insns (get_insns (), max_reg_num ());
+ if (dump_file)
+ dump_flow_info (dump_file, dump_flags);
+ cleanup_cfg ((optimize ? CLEANUP_EXPENSIVE : 0)
+ | (flag_thread_jumps ? CLEANUP_THREADING : 0));
+ return 0;
+}
+
} // anon namespace
rtl_opt_pass *
@@ -3125,13 +3125,6 @@ make_pass_jump (gcc::context *ctxt)
return new pass_jump (ctxt);
}
-static unsigned int
-execute_jump2 (void)
-{
- cleanup_cfg (flag_crossjumping ? CLEANUP_CROSSJUMP : 0);
- return 0;
-}
-
namespace {
const pass_data pass_data_jump2 =
@@ -3156,7 +3149,11 @@ public:
{}
/* opt_pass methods: */
- unsigned int execute () { return execute_jump2 (); }
+ virtual unsigned int execute (function *)
+ {
+ cleanup_cfg (flag_crossjumping ? CLEANUP_CROSSJUMP : 0);
+ return 0;
+ }
}; // class pass_jump2