diff options
author | J"orn Rennecke <joern.rennecke@st.com> | 2005-05-13 12:25:28 +0000 |
---|---|---|
committer | Joern Rennecke <amylaar@gcc.gnu.org> | 2005-05-13 13:25:28 +0100 |
commit | 86d9571b8c64318fea4cc928d59abade80e2cc81 (patch) | |
tree | d0c2231c504647c3430df625b25f132830d3501f | |
parent | a1aed706562a160e9d304a6806ce5ac70de89910 (diff) | |
download | gcc-86d9571b8c64318fea4cc928d59abade80e2cc81.zip gcc-86d9571b8c64318fea4cc928d59abade80e2cc81.tar.gz gcc-86d9571b8c64318fea4cc928d59abade80e2cc81.tar.bz2 |
re PR rtl-optimization/20756 (Clobbers of deleted insns are processed, but left out)
PR rtl-optimization/20756:
* basic-block.h (PROP_DEAD_INSN): Define.
* flow.c (propagate_one_insn): Set during mark_set_regs call
for a dead insn.
(mark_set_1): Emit a clobber when we are about to delete a dead insn
that kills a live register.
From-SVN: r99655
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/flow.c | 8 |
2 files changed, 16 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 00f3607..d11964b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2005-05-13 J"orn Rennecke <joern.rennecke@st.com> + + PR rtl-optimization/20756: + * basic-block.h (PROP_DEAD_INSN): Define. + * flow.c (propagate_one_insn): Set during mark_set_regs call + for a dead insn. + (mark_set_1): Emit a clobber when we are about to delete a dead insn + that kills a live register. + 2005-05-13 Adrian Straetling <straetling@de.ibm.com> * config/s390.md: ("DBL"): New mode attribute. @@ -1692,8 +1692,12 @@ propagate_one_insn (struct propagate_block_info *pbi, rtx insn) fatal_insn ("Attempt to delete prologue/epilogue insn:", insn); /* Record sets. Do this even for dead instructions, since they - would have killed the values if they hadn't been deleted. */ + would have killed the values if they hadn't been deleted. To + be consistent, we also have to emit a clobber when we delete + an insn that clobbers a live register. */ + pbi->flags |= PROP_DEAD_INSN; mark_set_regs (pbi, PATTERN (insn), insn); + pbi->flags &= ~PROP_DEAD_INSN; /* CC0 is now known to be dead. Either this insn used it, in which case it doesn't anymore, or clobbered it, @@ -2960,6 +2964,8 @@ mark_set_1 (struct propagate_block_info *pbi, enum rtx_code code, rtx reg, rtx c } CLEAR_REGNO_REG_SET (pbi->reg_live, i); } + if (flags & PROP_DEAD_INSN) + emit_insn_after (gen_rtx_CLOBBER (VOIDmode, reg), insn); } } else if (REG_P (reg)) |