diff options
Diffstat (limited to 'gcc/combine-stack-adj.c')
-rw-r--r-- | gcc/combine-stack-adj.c | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/gcc/combine-stack-adj.c b/gcc/combine-stack-adj.c index ec22ab3..37fc7a5 100644 --- a/gcc/combine-stack-adj.c +++ b/gcc/combine-stack-adj.c @@ -619,21 +619,6 @@ combine_stack_adjustments_for_block (basic_block bb) free_csa_reflist (reflist); } - -static bool -gate_handle_stack_adjustments (void) -{ - /* This is kind of a heuristic. We need to run combine_stack_adjustments - even for machines with possibly nonzero TARGET_RETURN_POPS_ARGS - and ACCUMULATE_OUTGOING_ARGS. We expect that only ports having - push instructions will have popping returns. */ -#ifndef PUSH_ROUNDING - if (ACCUMULATE_OUTGOING_ARGS) - return false; -#endif - return flag_combine_stack_adjustments; -} - static unsigned int rest_of_handle_stack_adjustments (void) { @@ -667,11 +652,25 @@ public: {} /* opt_pass methods: */ - bool gate () { return gate_handle_stack_adjustments (); } + virtual bool gate (function *); unsigned int execute () { return rest_of_handle_stack_adjustments (); } }; // class pass_stack_adjustments +bool +pass_stack_adjustments::gate (function *) +{ + /* This is kind of a heuristic. We need to run combine_stack_adjustments + even for machines with possibly nonzero TARGET_RETURN_POPS_ARGS + and ACCUMULATE_OUTGOING_ARGS. We expect that only ports having + push instructions will have popping returns. */ +#ifndef PUSH_ROUNDING + if (ACCUMULATE_OUTGOING_ARGS) + return false; +#endif + return flag_combine_stack_adjustments; +} + } // anon namespace rtl_opt_pass * |