diff options
author | Richard Henderson <rth@redhat.com> | 2003-06-26 13:45:18 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2003-06-26 13:45:18 -0700 |
commit | 99af0d26bd5e46ec40030ff2d3c68029d7129aa9 (patch) | |
tree | d0b6efec06fda2d75566b9c4fc1fd650678c76bd | |
parent | d444b5e897369d3e8de7e9e8d93daf75cef2d9a3 (diff) | |
download | gcc-99af0d26bd5e46ec40030ff2d3c68029d7129aa9.zip gcc-99af0d26bd5e46ec40030ff2d3c68029d7129aa9.tar.gz gcc-99af0d26bd5e46ec40030ff2d3c68029d7129aa9.tar.bz2 |
flow.c (propagate_one_insn): Kill function return value registers across tail calls.
* flow.c (propagate_one_insn): Kill function return value
registers across tail calls.
From-SVN: r68546
-rw-r--r-- | gcc/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/flow.c | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 274e7a5..31b9815 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2003-06-26 Richard Henderson <rth@redhat.com> + * flow.c (propagate_one_insn): Kill function return value + registers across tail calls. + * flow.c (propagate_one_insn): Preserve live-at-end registers across tail calls. @@ -1799,13 +1799,16 @@ propagate_one_insn (pbi, insn) cond, insn, pbi->flags); /* Calls change all call-used and global registers; sibcalls do not - clobber anything that must be preserved at end-of-function. */ + clobber anything that must be preserved at end-of-function, + except for return values. */ sibcall_p = SIBLING_CALL_P (insn); live_at_end = EXIT_BLOCK_PTR->global_live_at_start; for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) if (TEST_HARD_REG_BIT (regs_invalidated_by_call, i) - && ! (sibcall_p && REGNO_REG_SET_P (live_at_end, i))) + && ! (sibcall_p + && REGNO_REG_SET_P (live_at_end, i) + && !FUNCTION_VALUE_REGNO_P (i))) { /* We do not want REG_UNUSED notes for these registers. */ mark_set_1 (pbi, CLOBBER, regno_reg_rtx[i], cond, insn, |