diff options
Diffstat (limited to 'gcc/cse.c')
-rw-r--r-- | gcc/cse.c | 32 |
1 files changed, 11 insertions, 21 deletions
@@ -7457,12 +7457,6 @@ cse_condition_code_reg (void) /* Perform common subexpression elimination. Nonzero value from `cse_main' means that jumps were simplified and some code may now be unreachable, so do jump optimization again. */ -static bool -gate_handle_cse (void) -{ - return optimize > 0; -} - static unsigned int rest_of_handle_cse (void) { @@ -7515,7 +7509,7 @@ public: {} /* opt_pass methods: */ - bool gate () { return gate_handle_cse (); } + virtual bool gate (function *) { return optimize > 0; } unsigned int execute () { return rest_of_handle_cse (); } }; // class pass_cse @@ -7529,12 +7523,6 @@ make_pass_cse (gcc::context *ctxt) } -static bool -gate_handle_cse2 (void) -{ - return optimize > 0 && flag_rerun_cse_after_loop; -} - /* Run second CSE pass after loop optimizations. */ static unsigned int rest_of_handle_cse2 (void) @@ -7594,7 +7582,11 @@ public: {} /* opt_pass methods: */ - bool gate () { return gate_handle_cse2 (); } + virtual bool gate (function *) + { + return optimize > 0 && flag_rerun_cse_after_loop; + } + unsigned int execute () { return rest_of_handle_cse2 (); } }; // class pass_cse2 @@ -7607,12 +7599,6 @@ make_pass_cse2 (gcc::context *ctxt) return new pass_cse2 (ctxt); } -static bool -gate_handle_cse_after_global_opts (void) -{ - return optimize > 0 && flag_rerun_cse_after_global_opts; -} - /* Run second CSE pass after loop optimizations. */ static unsigned int rest_of_handle_cse_after_global_opts (void) @@ -7671,7 +7657,11 @@ public: {} /* opt_pass methods: */ - bool gate () { return gate_handle_cse_after_global_opts (); } + virtual bool gate (function *) + { + return optimize > 0 && flag_rerun_cse_after_global_opts; + } + unsigned int execute () { return rest_of_handle_cse_after_global_opts (); } |