2015-09-25 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / combine-stack-adj.c
bloba549f88fd02783b78944a2b372753d5310aad233
1 /* Combine stack adjustments.
2 Copyright (C) 1987-2015 Free Software Foundation, Inc.
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 3, or (at your option) any later
9 version.
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 for more details.
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING3. If not see
18 <http://www.gnu.org/licenses/>. */
20 /* Track stack adjustments and stack memory references. Attempt to
21 reduce the number of stack adjustments by back-propagating across
22 the memory references.
24 This is intended primarily for use with targets that do not define
25 ACCUMULATE_OUTGOING_ARGS. It is of significantly more value to
26 targets that define PREFERRED_STACK_BOUNDARY more aligned than
27 STACK_BOUNDARY (e.g. x86), or if not all registers can be pushed
28 (e.g. x86 fp regs) which would ordinarily have to be implemented
29 as a sub/mov pair due to restrictions in calls.c.
31 Propagation stops when any of the insns that need adjusting are
32 (a) no longer valid because we've exceeded their range, (b) a
33 non-trivial push instruction, or (c) a call instruction.
35 Restriction B is based on the assumption that push instructions
36 are smaller or faster. If a port really wants to remove all
37 pushes, it should have defined ACCUMULATE_OUTGOING_ARGS. The
38 one exception that is made is for an add immediately followed
39 by a push. */
41 #include "config.h"
42 #include "system.h"
43 #include "coretypes.h"
44 #include "backend.h"
45 #include "tree.h"
46 #include "rtl.h"
47 #include "df.h"
48 #include "tm_p.h"
49 #include "insn-config.h"
50 #include "recog.h"
51 #include "regs.h"
52 #include "flags.h"
53 #include "alias.h"
54 #include "expmed.h"
55 #include "dojump.h"
56 #include "explow.h"
57 #include "calls.h"
58 #include "emit-rtl.h"
59 #include "varasm.h"
60 #include "stmt.h"
61 #include "expr.h"
62 #include "cfgrtl.h"
63 #include "except.h"
64 #include "reload.h"
65 #include "tree-pass.h"
66 #include "rtl-iter.h"
69 /* This structure records two kinds of stack references between stack
70 adjusting instructions: stack references in memory addresses for
71 regular insns and all stack references for debug insns. */
73 struct csa_reflist
75 HOST_WIDE_INT sp_offset;
76 rtx_insn *insn;
77 rtx *ref;
78 struct csa_reflist *next;
81 static int stack_memref_p (rtx);
82 static rtx single_set_for_csa (rtx_insn *);
83 static void free_csa_reflist (struct csa_reflist *);
84 static struct csa_reflist *record_one_stack_ref (rtx_insn *, rtx *,
85 struct csa_reflist *);
86 static int try_apply_stack_adjustment (rtx_insn *, struct csa_reflist *,
87 HOST_WIDE_INT, HOST_WIDE_INT);
88 static void combine_stack_adjustments_for_block (basic_block);
91 /* Main entry point for stack adjustment combination. */
93 static void
94 combine_stack_adjustments (void)
96 basic_block bb;
98 FOR_EACH_BB_FN (bb, cfun)
99 combine_stack_adjustments_for_block (bb);
102 /* Recognize a MEM of the form (sp) or (plus sp const). */
104 static int
105 stack_memref_p (rtx x)
107 if (!MEM_P (x))
108 return 0;
109 x = XEXP (x, 0);
111 if (x == stack_pointer_rtx)
112 return 1;
113 if (GET_CODE (x) == PLUS
114 && XEXP (x, 0) == stack_pointer_rtx
115 && CONST_INT_P (XEXP (x, 1)))
116 return 1;
118 return 0;
121 /* Recognize either normal single_set or the hack in i386.md for
122 tying fp and sp adjustments. */
124 static rtx
125 single_set_for_csa (rtx_insn *insn)
127 int i;
128 rtx tmp = single_set (insn);
129 if (tmp)
130 return tmp;
132 if (!NONJUMP_INSN_P (insn)
133 || GET_CODE (PATTERN (insn)) != PARALLEL)
134 return NULL_RTX;
136 tmp = PATTERN (insn);
137 if (GET_CODE (XVECEXP (tmp, 0, 0)) != SET)
138 return NULL_RTX;
140 for (i = 1; i < XVECLEN (tmp, 0); ++i)
142 rtx this_rtx = XVECEXP (tmp, 0, i);
144 /* The special case is allowing a no-op set. */
145 if (GET_CODE (this_rtx) == SET
146 && SET_SRC (this_rtx) == SET_DEST (this_rtx))
148 else if (GET_CODE (this_rtx) != CLOBBER
149 && GET_CODE (this_rtx) != USE)
150 return NULL_RTX;
153 return XVECEXP (tmp, 0, 0);
156 /* Free the list of csa_reflist nodes. */
158 static void
159 free_csa_reflist (struct csa_reflist *reflist)
161 struct csa_reflist *next;
162 for (; reflist ; reflist = next)
164 next = reflist->next;
165 free (reflist);
169 /* Create a new csa_reflist node from the given stack reference.
170 It is already known that the reference is either a MEM satisfying the
171 predicate stack_memref_p or a REG representing the stack pointer. */
173 static struct csa_reflist *
174 record_one_stack_ref (rtx_insn *insn, rtx *ref, struct csa_reflist *next_reflist)
176 struct csa_reflist *ml;
178 ml = XNEW (struct csa_reflist);
180 if (REG_P (*ref) || XEXP (*ref, 0) == stack_pointer_rtx)
181 ml->sp_offset = 0;
182 else
183 ml->sp_offset = INTVAL (XEXP (XEXP (*ref, 0), 1));
185 ml->insn = insn;
186 ml->ref = ref;
187 ml->next = next_reflist;
189 return ml;
192 /* We only know how to adjust the CFA; no other frame-related changes
193 may appear in any insn to be deleted. */
195 static bool
196 no_unhandled_cfa (rtx_insn *insn)
198 if (!RTX_FRAME_RELATED_P (insn))
199 return true;
201 /* No CFA notes at all is a legacy interpretation like
202 FRAME_RELATED_EXPR, and is context sensitive within
203 the prologue state machine. We can't handle that here. */
204 bool has_cfa_adjust = false;
206 for (rtx link = REG_NOTES (insn); link; link = XEXP (link, 1))
207 switch (REG_NOTE_KIND (link))
209 default:
210 break;
211 case REG_CFA_ADJUST_CFA:
212 has_cfa_adjust = true;
213 break;
215 case REG_FRAME_RELATED_EXPR:
216 case REG_CFA_DEF_CFA:
217 case REG_CFA_OFFSET:
218 case REG_CFA_REGISTER:
219 case REG_CFA_EXPRESSION:
220 case REG_CFA_RESTORE:
221 case REG_CFA_SET_VDRAP:
222 case REG_CFA_WINDOW_SAVE:
223 case REG_CFA_FLUSH_QUEUE:
224 return false;
227 return has_cfa_adjust;
230 /* Attempt to apply ADJUST to the stack adjusting insn INSN, as well
231 as each of the memories and stack references in REFLIST. Return true
232 on success. */
234 static int
235 try_apply_stack_adjustment (rtx_insn *insn, struct csa_reflist *reflist,
236 HOST_WIDE_INT new_adjust, HOST_WIDE_INT delta)
238 struct csa_reflist *ml;
239 rtx set;
241 set = single_set_for_csa (insn);
242 if (MEM_P (SET_DEST (set)))
243 validate_change (insn, &SET_DEST (set),
244 replace_equiv_address (SET_DEST (set), stack_pointer_rtx),
246 else
247 validate_change (insn, &XEXP (SET_SRC (set), 1), GEN_INT (new_adjust), 1);
249 for (ml = reflist; ml ; ml = ml->next)
251 rtx new_addr = plus_constant (Pmode, stack_pointer_rtx,
252 ml->sp_offset - delta);
253 rtx new_val;
255 if (MEM_P (*ml->ref))
256 new_val = replace_equiv_address_nv (*ml->ref, new_addr);
257 else if (GET_MODE (*ml->ref) == GET_MODE (stack_pointer_rtx))
258 new_val = new_addr;
259 else
260 new_val = lowpart_subreg (GET_MODE (*ml->ref), new_addr,
261 GET_MODE (new_addr));
262 validate_change (ml->insn, ml->ref, new_val, 1);
265 if (apply_change_group ())
267 /* Succeeded. Update our knowledge of the stack references. */
268 for (ml = reflist; ml ; ml = ml->next)
269 ml->sp_offset -= delta;
271 return 1;
273 else
274 return 0;
277 /* For non-debug insns, record all stack memory references in INSN
278 and return true if there were no other (unrecorded) references to the
279 stack pointer. For debug insns, record all stack references regardless
280 of context and unconditionally return true. */
282 static bool
283 record_stack_refs (rtx_insn *insn, struct csa_reflist **reflist)
285 subrtx_ptr_iterator::array_type array;
286 FOR_EACH_SUBRTX_PTR (iter, array, &PATTERN (insn), NONCONST)
288 rtx *loc = *iter;
289 rtx x = *loc;
290 switch (GET_CODE (x))
292 case MEM:
293 if (!reg_mentioned_p (stack_pointer_rtx, x))
294 iter.skip_subrtxes ();
295 /* We are not able to handle correctly all possible memrefs
296 containing stack pointer, so this check is necessary. */
297 else if (stack_memref_p (x))
299 *reflist = record_one_stack_ref (insn, loc, *reflist);
300 iter.skip_subrtxes ();
302 /* Try harder for DEBUG_INSNs, handle e.g.
303 (mem (mem (sp + 16) + 4). */
304 else if (!DEBUG_INSN_P (insn))
305 return false;
306 break;
308 case REG:
309 /* ??? We want be able to handle non-memory stack pointer
310 references later. For now just discard all insns referring to
311 stack pointer outside mem expressions. We would probably
312 want to teach validate_replace to simplify expressions first.
314 We can't just compare with STACK_POINTER_RTX because the
315 reference to the stack pointer might be in some other mode.
316 In particular, an explicit clobber in an asm statement will
317 result in a QImode clobber.
319 In DEBUG_INSNs, we want to replace all occurrences, otherwise
320 they will cause -fcompare-debug failures. */
321 if (REGNO (x) == STACK_POINTER_REGNUM)
323 if (!DEBUG_INSN_P (insn))
324 return false;
325 *reflist = record_one_stack_ref (insn, loc, *reflist);
327 break;
329 default:
330 break;
333 return true;
336 /* If INSN has a REG_ARGS_SIZE note, move it to LAST.
337 AFTER is true iff LAST follows INSN in the instruction stream. */
339 static void
340 maybe_move_args_size_note (rtx_insn *last, rtx_insn *insn, bool after)
342 rtx note, last_note;
344 note = find_reg_note (insn, REG_ARGS_SIZE, NULL_RTX);
345 if (note == NULL)
346 return;
348 last_note = find_reg_note (last, REG_ARGS_SIZE, NULL_RTX);
349 if (last_note)
351 /* The ARGS_SIZE notes are *not* cumulative. They represent an
352 absolute value, and the "most recent" note wins. */
353 if (!after)
354 XEXP (last_note, 0) = XEXP (note, 0);
356 else
357 add_reg_note (last, REG_ARGS_SIZE, XEXP (note, 0));
360 /* Merge any REG_CFA_ADJUST_CFA note from SRC into DST.
361 AFTER is true iff DST follows SRC in the instruction stream. */
363 static void
364 maybe_merge_cfa_adjust (rtx_insn *dst, rtx_insn *src, bool after)
366 rtx snote = NULL, dnote = NULL;
367 rtx sexp, dexp;
368 rtx exp1, exp2;
370 if (RTX_FRAME_RELATED_P (src))
371 snote = find_reg_note (src, REG_CFA_ADJUST_CFA, NULL_RTX);
372 if (snote == NULL)
373 return;
374 sexp = XEXP (snote, 0);
376 if (RTX_FRAME_RELATED_P (dst))
377 dnote = find_reg_note (dst, REG_CFA_ADJUST_CFA, NULL_RTX);
378 if (dnote == NULL)
380 add_reg_note (dst, REG_CFA_ADJUST_CFA, sexp);
381 return;
383 dexp = XEXP (dnote, 0);
385 gcc_assert (GET_CODE (sexp) == SET);
386 gcc_assert (GET_CODE (dexp) == SET);
388 if (after)
389 exp1 = dexp, exp2 = sexp;
390 else
391 exp1 = sexp, exp2 = dexp;
393 SET_SRC (exp1) = simplify_replace_rtx (SET_SRC (exp1), SET_DEST (exp2),
394 SET_SRC (exp2));
395 XEXP (dnote, 0) = exp1;
398 /* Return the next (or previous) active insn within BB. */
400 static rtx_insn *
401 prev_active_insn_bb (basic_block bb, rtx_insn *insn)
403 for (insn = PREV_INSN (insn);
404 insn != PREV_INSN (BB_HEAD (bb));
405 insn = PREV_INSN (insn))
406 if (active_insn_p (insn))
407 return insn;
408 return NULL;
411 static rtx_insn *
412 next_active_insn_bb (basic_block bb, rtx_insn *insn)
414 for (insn = NEXT_INSN (insn);
415 insn != NEXT_INSN (BB_END (bb));
416 insn = NEXT_INSN (insn))
417 if (active_insn_p (insn))
418 return insn;
419 return NULL;
422 /* If INSN has a REG_ARGS_SIZE note, if possible move it to PREV. Otherwise
423 search for a nearby candidate within BB where we can stick the note. */
425 static void
426 force_move_args_size_note (basic_block bb, rtx_insn *prev, rtx_insn *insn)
428 rtx note;
429 rtx_insn *test, *next_candidate, *prev_candidate;
431 /* If PREV exists, tail-call to the logic in the other function. */
432 if (prev)
434 maybe_move_args_size_note (prev, insn, false);
435 return;
438 /* First, make sure there's anything that needs doing. */
439 note = find_reg_note (insn, REG_ARGS_SIZE, NULL_RTX);
440 if (note == NULL)
441 return;
443 /* We need to find a spot between the previous and next exception points
444 where we can place the note and "properly" deallocate the arguments. */
445 next_candidate = prev_candidate = NULL;
447 /* It is often the case that we have insns in the order:
448 call
449 add sp (previous deallocation)
450 sub sp (align for next arglist)
451 push arg
452 and the add/sub cancel. Therefore we begin by searching forward. */
454 test = insn;
455 while ((test = next_active_insn_bb (bb, test)) != NULL)
457 /* Found an existing note: nothing to do. */
458 if (find_reg_note (test, REG_ARGS_SIZE, NULL_RTX))
459 return;
460 /* Found something that affects unwinding. Stop searching. */
461 if (CALL_P (test) || !insn_nothrow_p (test))
462 break;
463 if (next_candidate == NULL)
464 next_candidate = test;
467 test = insn;
468 while ((test = prev_active_insn_bb (bb, test)) != NULL)
470 rtx tnote;
471 /* Found a place that seems logical to adjust the stack. */
472 tnote = find_reg_note (test, REG_ARGS_SIZE, NULL_RTX);
473 if (tnote)
475 XEXP (tnote, 0) = XEXP (note, 0);
476 return;
478 if (prev_candidate == NULL)
479 prev_candidate = test;
480 /* Found something that affects unwinding. Stop searching. */
481 if (CALL_P (test) || !insn_nothrow_p (test))
482 break;
485 if (prev_candidate)
486 test = prev_candidate;
487 else if (next_candidate)
488 test = next_candidate;
489 else
491 /* ??? We *must* have a place, lest we ICE on the lost adjustment.
492 Options are: dummy clobber insn, nop, or prevent the removal of
493 the sp += 0 insn. */
494 /* TODO: Find another way to indicate to the dwarf2 code that we
495 have not in fact lost an adjustment. */
496 test = emit_insn_before (gen_rtx_CLOBBER (VOIDmode, const0_rtx), insn);
498 add_reg_note (test, REG_ARGS_SIZE, XEXP (note, 0));
501 /* Subroutine of combine_stack_adjustments, called for each basic block. */
503 static void
504 combine_stack_adjustments_for_block (basic_block bb)
506 HOST_WIDE_INT last_sp_adjust = 0;
507 rtx_insn *last_sp_set = NULL;
508 rtx_insn *last2_sp_set = NULL;
509 struct csa_reflist *reflist = NULL;
510 rtx_insn *insn, *next;
511 rtx set;
512 bool end_of_block = false;
514 for (insn = BB_HEAD (bb); !end_of_block ; insn = next)
516 end_of_block = insn == BB_END (bb);
517 next = NEXT_INSN (insn);
519 if (! INSN_P (insn))
520 continue;
522 set = single_set_for_csa (insn);
523 if (set)
525 rtx dest = SET_DEST (set);
526 rtx src = SET_SRC (set);
528 /* Find constant additions to the stack pointer. */
529 if (dest == stack_pointer_rtx
530 && GET_CODE (src) == PLUS
531 && XEXP (src, 0) == stack_pointer_rtx
532 && CONST_INT_P (XEXP (src, 1)))
534 HOST_WIDE_INT this_adjust = INTVAL (XEXP (src, 1));
536 /* If we've not seen an adjustment previously, record
537 it now and continue. */
538 if (! last_sp_set)
540 last_sp_set = insn;
541 last_sp_adjust = this_adjust;
542 continue;
545 /* If not all recorded refs can be adjusted, or the
546 adjustment is now too large for a constant addition,
547 we cannot merge the two stack adjustments.
549 Also we need to be careful to not move stack pointer
550 such that we create stack accesses outside the allocated
551 area. We can combine an allocation into the first insn,
552 or a deallocation into the second insn. We can not
553 combine an allocation followed by a deallocation.
555 The only somewhat frequent occurrence of the later is when
556 a function allocates a stack frame but does not use it.
557 For this case, we would need to analyze rtl stream to be
558 sure that allocated area is really unused. This means not
559 only checking the memory references, but also all registers
560 or global memory references possibly containing a stack
561 frame address.
563 Perhaps the best way to address this problem is to teach
564 gcc not to allocate stack for objects never used. */
566 /* Combine an allocation into the first instruction. */
567 if (STACK_GROWS_DOWNWARD ? this_adjust <= 0 : this_adjust >= 0)
569 if (no_unhandled_cfa (insn)
570 && try_apply_stack_adjustment (last_sp_set, reflist,
571 last_sp_adjust
572 + this_adjust,
573 this_adjust))
575 /* It worked! */
576 maybe_move_args_size_note (last_sp_set, insn, false);
577 maybe_merge_cfa_adjust (last_sp_set, insn, false);
578 delete_insn (insn);
579 last_sp_adjust += this_adjust;
580 continue;
584 /* Otherwise we have a deallocation. Do not combine with
585 a previous allocation. Combine into the second insn. */
586 else if (STACK_GROWS_DOWNWARD
587 ? last_sp_adjust >= 0 : last_sp_adjust <= 0)
589 if (no_unhandled_cfa (last_sp_set)
590 && try_apply_stack_adjustment (insn, reflist,
591 last_sp_adjust
592 + this_adjust,
593 -last_sp_adjust))
595 /* It worked! */
596 maybe_move_args_size_note (insn, last_sp_set, true);
597 maybe_merge_cfa_adjust (insn, last_sp_set, true);
598 delete_insn (last_sp_set);
599 last_sp_set = insn;
600 last_sp_adjust += this_adjust;
601 free_csa_reflist (reflist);
602 reflist = NULL;
603 continue;
607 /* Combination failed. Restart processing from here. If
608 deallocation+allocation conspired to cancel, we can
609 delete the old deallocation insn. */
610 if (last_sp_set)
612 if (last_sp_adjust == 0 && no_unhandled_cfa (last_sp_set))
614 maybe_move_args_size_note (insn, last_sp_set, true);
615 maybe_merge_cfa_adjust (insn, last_sp_set, true);
616 delete_insn (last_sp_set);
618 else
619 last2_sp_set = last_sp_set;
621 free_csa_reflist (reflist);
622 reflist = NULL;
623 last_sp_set = insn;
624 last_sp_adjust = this_adjust;
625 continue;
628 /* Find a store with pre-(dec|inc)rement or pre-modify of exactly
629 the previous adjustment and turn it into a simple store. This
630 is equivalent to anticipating the stack adjustment so this must
631 be an allocation. */
632 if (MEM_P (dest)
633 && ((STACK_GROWS_DOWNWARD
634 ? (GET_CODE (XEXP (dest, 0)) == PRE_DEC
635 && last_sp_adjust
636 == (HOST_WIDE_INT) GET_MODE_SIZE (GET_MODE (dest)))
637 : (GET_CODE (XEXP (dest, 0)) == PRE_INC
638 && last_sp_adjust
639 == -(HOST_WIDE_INT) GET_MODE_SIZE (GET_MODE (dest))))
640 || ((STACK_GROWS_DOWNWARD
641 ? last_sp_adjust >= 0 : last_sp_adjust <= 0)
642 && GET_CODE (XEXP (dest, 0)) == PRE_MODIFY
643 && GET_CODE (XEXP (XEXP (dest, 0), 1)) == PLUS
644 && XEXP (XEXP (XEXP (dest, 0), 1), 0)
645 == stack_pointer_rtx
646 && GET_CODE (XEXP (XEXP (XEXP (dest, 0), 1), 1))
647 == CONST_INT
648 && INTVAL (XEXP (XEXP (XEXP (dest, 0), 1), 1))
649 == -last_sp_adjust))
650 && XEXP (XEXP (dest, 0), 0) == stack_pointer_rtx
651 && !reg_mentioned_p (stack_pointer_rtx, src)
652 && memory_address_p (GET_MODE (dest), stack_pointer_rtx)
653 && try_apply_stack_adjustment (insn, reflist, 0,
654 -last_sp_adjust))
656 if (last2_sp_set)
657 maybe_move_args_size_note (last2_sp_set, last_sp_set, false);
658 else
659 maybe_move_args_size_note (insn, last_sp_set, true);
660 delete_insn (last_sp_set);
661 free_csa_reflist (reflist);
662 reflist = NULL;
663 last_sp_set = NULL;
664 last_sp_adjust = 0;
665 continue;
669 if (!CALL_P (insn) && last_sp_set
670 && record_stack_refs (insn, &reflist))
671 continue;
673 /* Otherwise, we were not able to process the instruction.
674 Do not continue collecting data across such a one. */
675 if (last_sp_set
676 && (CALL_P (insn)
677 || reg_mentioned_p (stack_pointer_rtx, PATTERN (insn))))
679 if (last_sp_set && last_sp_adjust == 0)
681 force_move_args_size_note (bb, last2_sp_set, last_sp_set);
682 delete_insn (last_sp_set);
684 free_csa_reflist (reflist);
685 reflist = NULL;
686 last2_sp_set = NULL;
687 last_sp_set = NULL;
688 last_sp_adjust = 0;
692 if (last_sp_set && last_sp_adjust == 0)
694 force_move_args_size_note (bb, last2_sp_set, last_sp_set);
695 delete_insn (last_sp_set);
698 if (reflist)
699 free_csa_reflist (reflist);
702 static unsigned int
703 rest_of_handle_stack_adjustments (void)
705 df_note_add_problem ();
706 df_analyze ();
707 combine_stack_adjustments ();
708 return 0;
711 namespace {
713 const pass_data pass_data_stack_adjustments =
715 RTL_PASS, /* type */
716 "csa", /* name */
717 OPTGROUP_NONE, /* optinfo_flags */
718 TV_COMBINE_STACK_ADJUST, /* tv_id */
719 0, /* properties_required */
720 0, /* properties_provided */
721 0, /* properties_destroyed */
722 0, /* todo_flags_start */
723 TODO_df_finish, /* todo_flags_finish */
726 class pass_stack_adjustments : public rtl_opt_pass
728 public:
729 pass_stack_adjustments (gcc::context *ctxt)
730 : rtl_opt_pass (pass_data_stack_adjustments, ctxt)
733 /* opt_pass methods: */
734 virtual bool gate (function *);
735 virtual unsigned int execute (function *)
737 return rest_of_handle_stack_adjustments ();
740 }; // class pass_stack_adjustments
742 bool
743 pass_stack_adjustments::gate (function *)
745 /* This is kind of a heuristic. We need to run combine_stack_adjustments
746 even for machines with possibly nonzero TARGET_RETURN_POPS_ARGS
747 and ACCUMULATE_OUTGOING_ARGS. We expect that only ports having
748 push instructions will have popping returns. */
749 #ifndef PUSH_ROUNDING
750 if (ACCUMULATE_OUTGOING_ARGS)
751 return false;
752 #endif
753 return flag_combine_stack_adjustments;
756 } // anon namespace
758 rtl_opt_pass *
759 make_pass_stack_adjustments (gcc::context *ctxt)
761 return new pass_stack_adjustments (ctxt);