This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
patch applied to reload1.c
- To: egcs-patches at egcs dot cygnus dot com
- Subject: patch applied to reload1.c
- From: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Date: Wed, 17 Mar 1999 21:33:59 +0000 (GMT)
- Cc: amylaar at cygnus dot co dot uk
Reviewed by Jim Wilson.
Wed Mar 17 21:29:12 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
* reload1.c (eliminate_regs): Don't keep REG_DEAD notes around for
things that were eliminated.
Index: reload1.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/reload1.c,v
retrieving revision 1.218.2.4
diff -p -r1.218.2.4 reload1.c
*** reload1.c 1999/03/10 22:39:56 1.218.2.4
--- reload1.c 1999/03/17 16:11:00
*************** eliminate_regs (x, mem_mode, insn)
*** 2875,2881 ****
{
new = eliminate_regs (XEXP (x, 0), mem_mode, insn);
if (new != XEXP (x, 0))
! x = gen_rtx_EXPR_LIST (REG_NOTE_KIND (x), new, XEXP (x, 1));
}
/* ... fall through ... */
--- 2882,2898 ----
{
new = eliminate_regs (XEXP (x, 0), mem_mode, insn);
if (new != XEXP (x, 0))
! {
! /* If this is a REG_DEAD note, it is not valid anymore.
! Using the eliminated version could result in creating a
! REG_DEAD note for the stack or frame pointer. */
! if (GET_MODE (x) == REG_DEAD)
! return (XEXP (x, 1)
! ? eliminate_regs (XEXP (x, 1), mem_mode, insn)
! : NULL_RTX);
!
! x = gen_rtx_EXPR_LIST (REG_NOTE_KIND (x), new, XEXP (x, 1));
! }
}
/* ... fall through ... */