diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1994-01-26 10:56:51 -0800 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1994-01-26 10:56:51 -0800 |
commit | 5124001030dc20e5f754fca846c0a3c07d2dcfa2 (patch) | |
tree | 7675133175cb6c264f46646c2135c05ef0100de7 | |
parent | 2197a88a8c524354d687e395a355ee45938ac727 (diff) | |
download | gcc-5124001030dc20e5f754fca846c0a3c07d2dcfa2.zip gcc-5124001030dc20e5f754fca846c0a3c07d2dcfa2.tar.gz gcc-5124001030dc20e5f754fca846c0a3c07d2dcfa2.tar.bz2 |
(attach_deaths_insn): Add REG_DEAD notes to CLOBBER if
it is for a MEM.
From-SVN: r6432
-rw-r--r-- | gcc/sched.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/sched.c b/gcc/sched.c index 6de2446..f74d96f 100644 --- a/gcc/sched.c +++ b/gcc/sched.c @@ -2885,8 +2885,11 @@ attach_deaths_insn (insn) attach_deaths (XVECEXP (x, 0, i), insn, 0); } } - /* Flow does not add REG_DEAD notes to registers that die in - clobbers, so we can't either. */ + /* If this is a CLOBBER, only add REG_DEAD notes to registers inside a + MEM being clobbered, just like flow. */ + else if (code == CLOBBER && GET_CODE (XEXP (x, 0)) == MEM) + attach_deaths (XEXP (XEXP (x, 0), 0), insn, 0); + /* Otherwise don't add a death note to things being clobbered. */ else if (code != CLOBBER) attach_deaths (x, insn, 0); } |