summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2003-06-26 20:45:18 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2003-06-26 20:45:18 +0000
commitdf20515d40e3a676322e930880085ca37e7ab18a (patch)
treed0b6efec06fda2d75566b9c4fc1fd650678c76bd
parentb685e98d5ece5b46bca890899a57ae0b0f05dc2d (diff)
downloadppe42-gcc-df20515d40e3a676322e930880085ca37e7ab18a.tar.gz
ppe42-gcc-df20515d40e3a676322e930880085ca37e7ab18a.zip
* flow.c (propagate_one_insn): Kill function return value
registers across tail calls. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68546 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/flow.c7
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 274e7a531ab..31b98151711 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.
diff --git a/gcc/flow.c b/gcc/flow.c
index 58859405aab..e51d477c94f 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -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,
OpenPOWER on IntegriCloud