diff options
author | Richard Henderson <rth@gcc.gnu.org> | 1999-11-04 16:35:10 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 1999-11-04 16:35:10 -0800 |
commit | bd695e1e9d018a98de8d09bd855574dc6e183ad9 (patch) | |
tree | 3bf8e0ad4395b139c88e9c1ff7b7933ea4b1d9db /gcc/reload1.c | |
parent | 49886fe1cef61d4d3957033290d324dd27f7d389 (diff) | |
download | gcc-bd695e1e9d018a98de8d09bd855574dc6e183ad9.zip gcc-bd695e1e9d018a98de8d09bd855574dc6e183ad9.tar.gz gcc-bd695e1e9d018a98de8d09bd855574dc6e183ad9.tar.bz2 |
function.c (diddle_return_value): New.
* function.c (diddle_return_value): New.
(expand_function_end): Use it.
* stmt.c (expand_null_return): Likewise.
(expand_value_return): Likewise.
* reg-stack.c (subst_stack_regs_pat): Handle clobbers at top-level.
* reload1.c (reload): Don't remove return value clobbers.
From-SVN: r30401
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r-- | gcc/reload1.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c index 5291d9b..2f50fb3 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -1106,13 +1106,12 @@ reload (first, global, dumpfile) which are only valid during and after reload. */ reload_completed = 1; - /* 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 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. */ + /* 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. */ for (insn = first; insn; insn = NEXT_INSN (insn)) if (GET_RTX_CLASS (GET_CODE (insn)) == 'i') @@ -1121,7 +1120,9 @@ reload (first, global, dumpfile) if ((GET_CODE (PATTERN (insn)) == USE && find_reg_note (insn, REG_EQUAL, NULL_RTX)) - || GET_CODE (PATTERN (insn)) == CLOBBER) + || (GET_CODE (PATTERN (insn)) == CLOBBER + && (GET_CODE (XEXP (PATTERN (insn), 0)) != REG + || ! REG_FUNCTION_VALUE_P (XEXP (PATTERN (insn), 0))))) { PUT_CODE (insn, NOTE); NOTE_SOURCE_FILE (insn) = 0; |