diff options
author | Dale Johannesen <dalej@apple.com> | 2002-08-14 17:41:52 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@gcc.gnu.org> | 2002-08-14 17:41:52 +0000 |
commit | 260f91c2927c3850919f8ebdcbc294cfbd04daa9 (patch) | |
tree | b89a47d1833a43c5e6808e162a723c626e81adbb /gcc/reload1.c | |
parent | 615d009f6d673f288348c4394d36da2fb0dbbcc8 (diff) | |
download | gcc-260f91c2927c3850919f8ebdcbc294cfbd04daa9.zip gcc-260f91c2927c3850919f8ebdcbc294cfbd04daa9.tar.gz gcc-260f91c2927c3850919f8ebdcbc294cfbd04daa9.tar.bz2 |
Insert memory clobbers before the code that pops variable arrays.
This prevents the scheduler from moving references to the arrays
below the stack pop.
From-SVN: r56328
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r-- | gcc/reload1.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c index 58b0bd04..c00426c 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -1181,9 +1181,11 @@ reload (first, global) /* Make a pass over all the insns and delete all USEs which we inserted only to tag a REG_EQUAL note on them. Remove all REG_DEAD and REG_UNUSED notes. Delete all CLOBBER insns that don't refer to the return value - and simplify (subreg (reg)) operands. Also remove all REG_RETVAL and - REG_LIBCALL notes since they are no longer useful or accurate. Strip - and regenerate REG_INC notes that may have been moved around. */ + or to memory (mem:BLK CLOBBERs must be retained to prevent the scheduler + from misarranging variable-array code) and simplify (subreg (reg)) + operands. Also remove all REG_RETVAL and REG_LIBCALL notes since they + are no longer useful or accurate. Strip and regenerate REG_INC notes + that may have been moved around. */ for (insn = first; insn; insn = NEXT_INSN (insn)) if (INSN_P (insn)) @@ -1200,6 +1202,8 @@ reload (first, global) && (GET_MODE (insn) == QImode || find_reg_note (insn, REG_EQUAL, NULL_RTX))) || (GET_CODE (PATTERN (insn)) == CLOBBER + && (GET_CODE (XEXP (PATTERN (insn), 0)) != MEM + || GET_MODE (XEXP (PATTERN (insn), 0)) != BLKmode) && (GET_CODE (XEXP (PATTERN (insn), 0)) != REG || ! REG_FUNCTION_VALUE_P (XEXP (PATTERN (insn), 0))))) { |