aboutsummaryrefslogtreecommitdiff
path: root/gcc/reload1.c
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2002-09-05 20:41:11 +0000
committerDale Johannesen <dalej@gcc.gnu.org>2002-09-05 20:41:11 +0000
commit41e34bab133b719c014844f0d74248aa14d82394 (patch)
tree938f0913c28143dde7571a87afe922d2145e69fc /gcc/reload1.c
parentdc0ba55a5b813f1f91ca6d472d70de3021e8be9e (diff)
downloadgcc-41e34bab133b719c014844f0d74248aa14d82394.zip
gcc-41e34bab133b719c014844f0d74248aa14d82394.tar.gz
gcc-41e34bab133b719c014844f0d74248aa14d82394.tar.bz2
In reload, retain only those clobbers added for variable-array handling.
From-SVN: r56863
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r--gcc/reload1.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index c00426c..a85d250 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -1180,9 +1180,9 @@ 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
- or to memory (mem:BLK CLOBBERs must be retained to prevent the scheduler
- from misarranging variable-array code) and simplify (subreg (reg))
+ notes. Delete all CLOBBER insns, except those that refer to the return
+ value and the special mem:BLK CLOBBERs added 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. */
@@ -1203,7 +1203,10 @@ reload (first, global)
|| 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_MODE (XEXP (PATTERN (insn), 0)) != BLKmode
+ || (GET_CODE (XEXP (XEXP (PATTERN (insn), 0), 0)) != SCRATCH
+ && XEXP (XEXP (PATTERN (insn), 0), 0)
+ != stack_pointer_rtx))
&& (GET_CODE (XEXP (PATTERN (insn), 0)) != REG
|| ! REG_FUNCTION_VALUE_P (XEXP (PATTERN (insn), 0)))))
{