aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-08-07 04:00:44 +0000
committerRichard Stallman <rms@gnu.org>1992-08-07 04:00:44 +0000
commitd8c8b8e36bf0a82d38f69fa8e918abc49bd2c25a (patch)
treeb2545cdb1afb814415779c745c550a2d8f523069 /gcc
parent1f6fc4de69d7ece6ff5f988f3c600d0f0493cbc7 (diff)
downloadgcc-d8c8b8e36bf0a82d38f69fa8e918abc49bd2c25a.zip
gcc-d8c8b8e36bf0a82d38f69fa8e918abc49bd2c25a.tar.gz
gcc-d8c8b8e36bf0a82d38f69fa8e918abc49bd2c25a.tar.bz2
(mark_used_regs): Do recurse in setting of global hard reg.
Do set reg_next_use for global hard reg. From-SVN: r1778
Diffstat (limited to 'gcc')
-rw-r--r--gcc/flow.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/flow.c b/gcc/flow.c
index 93b76f7..7e3b207 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -1524,6 +1524,7 @@ insn_dead_p (x, needed, call_ok)
register REGSET_ELT_TYPE bit
= (REGSET_ELT_TYPE) 1 << (regno % REGSET_ELT_BITS);
+ /* Don't delete insns to set global regs. */
if ((regno < FIRST_PSEUDO_REGISTER && global_regs[regno])
/* Make sure insns to set frame pointer aren't deleted. */
|| regno == FRAME_POINTER_REGNUM
@@ -2167,7 +2168,11 @@ mark_used_regs (needed, live, x, final, insn)
/* No death notes for global register variables;
their values are live after this function exits. */
if (global_regs[regno])
- return;
+ {
+ if (final)
+ reg_next_use[regno] = insn;
+ return;
+ }
n = HARD_REGNO_NREGS (regno, GET_MODE (x));
while (--n > 0)
@@ -2311,7 +2316,9 @@ mark_used_regs (needed, live, x, final, insn)
#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
&& ! (regno == ARG_POINTER_REGNUM && fixed_regs[regno])
#endif
- && ! (regno < FIRST_PSEUDO_REGISTER && global_regs[regno]))
+ )
+ /* We used to exclude global_regs here, but that seems wrong.
+ Storing in them is like storing in mem. */
{
mark_used_regs (needed, live, SET_SRC (x), final, insn);
if (mark_dest)