comparison gcc/combine-stack-adj.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
1 /* Combine stack adjustments. 1 /* Combine stack adjustments.
2 Copyright (C) 1987-2018 Free Software Foundation, Inc. 2 Copyright (C) 1987-2020 Free Software Foundation, Inc.
3 3
4 This file is part of GCC. 4 This file is part of GCC.
5 5
6 GCC is free software; you can redistribute it and/or modify it under 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 7 the terms of the GNU General Public License as published by the Free
131 /* The special case is allowing a no-op set. */ 131 /* The special case is allowing a no-op set. */
132 if (GET_CODE (this_rtx) == SET 132 if (GET_CODE (this_rtx) == SET
133 && SET_SRC (this_rtx) == SET_DEST (this_rtx)) 133 && SET_SRC (this_rtx) == SET_DEST (this_rtx))
134 ; 134 ;
135 else if (GET_CODE (this_rtx) != CLOBBER 135 else if (GET_CODE (this_rtx) != CLOBBER
136 && GET_CODE (this_rtx) != CLOBBER_HIGH
137 && GET_CODE (this_rtx) != USE) 136 && GET_CODE (this_rtx) != USE)
138 return NULL_RTX; 137 return NULL_RTX;
139 } 138 }
140 139
141 return XVECEXP (tmp, 0, 0); 140 return XVECEXP (tmp, 0, 0);
538 we cannot merge the two stack adjustments. 537 we cannot merge the two stack adjustments.
539 538
540 Also we need to be careful to not move stack pointer 539 Also we need to be careful to not move stack pointer
541 such that we create stack accesses outside the allocated 540 such that we create stack accesses outside the allocated
542 area. We can combine an allocation into the first insn, 541 area. We can combine an allocation into the first insn,
543 or a deallocation into the second insn. We can not 542 or a deallocation into the second insn. We cannot
544 combine an allocation followed by a deallocation. 543 combine an allocation followed by a deallocation.
545 544
546 The only somewhat frequent occurrence of the later is when 545 The only somewhat frequent occurrence of the later is when
547 a function allocates a stack frame but does not use it. 546 a function allocates a stack frame but does not use it.
548 For this case, we would need to analyze rtl stream to be 547 For this case, we would need to analyze rtl stream to be