This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: SMS problem with emit_copy_of_insn_after copying REG_NOTEs
- From: Jan Hubicka <jh at suse dot cz>
- To: Vladimir Yanovsky <volodyan at gmail dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, gcc at gcc dot gnu dot org, jh at suse dot cz, Vladimir Yanovsky <yanov at il dot ibm dot com>, Ayal Zaks <zaks at il dot ibm dot com>, gcc-patches at gcc dot gnu dot org
- Date: Sat, 30 Dec 2006 13:00:26 +0100
- Subject: Re: RFC: SMS problem with emit_copy_of_insn_after copying REG_NOTEs
- References: <48ee23ef0612181248l255833bcjd529c1651aef7a28@mail.gmail.com> <20061218205823.GA2339@atrey.karlin.mff.cuni.cz> <48ee23ef0612190443q59f0937cp4eceeb1c579bb77a@mail.gmail.com>
Hi,
thanks for testing. I've bootstrapped/regtested this variant of patch
and comitted it as obvious.
Honza
2006-12-30 Jan Hubicka <jh@suse.cz>
Vladimir Yanovsky <volodyan@gmail.com>
* emit-rt.c (emit_copy_of_insn_after): Fix bug causing exponential
amount of copies of INSN_NOTEs list.
Index: emit-rtl.c
===================================================================
--- emit-rtl.c (revision 120274)
+++ emit-rtl.c (working copy)
@@ -5297,14 +5297,12 @@ emit_copy_of_insn_after (rtx insn, rtx a
{
if (GET_CODE (link) == EXPR_LIST)
REG_NOTES (new)
- = copy_insn_1 (gen_rtx_EXPR_LIST (REG_NOTE_KIND (link),
- XEXP (link, 0),
- REG_NOTES (new)));
+ = gen_rtx_EXPR_LIST (REG_NOTE_KIND (link),
+ copy_insn_1 (XEXP (link, 0)), REG_NOTES (new));
else
REG_NOTES (new)
- = copy_insn_1 (gen_rtx_INSN_LIST (REG_NOTE_KIND (link),
- XEXP (link, 0),
- REG_NOTES (new)));
+ = gen_rtx_INSN_LIST (REG_NOTE_KIND (link),
+ copy_insn_1 (XEXP (link, 0)), REG_NOTES (new));
}
/* Fix the libcall sequences. */