Commit f9af39d0 by Richard Earnshaw Committed by Richard Earnshaw

combine.c (distribute_notes): When re-distributing the notes from an insn we are about to delete...

* combine.c (distribute_notes): When re-distributing the notes from
an insn we are about to delete, ensure we can't end up with a cyclic
list of notes.

From-SVN: r73547
parent 650dc9b3
2003-11-13 Richard Earnshaw <rearnsha@arm.com>
* combine.c (distribute_notes): When re-distributing the notes from
an insn we are about to delete, ensure we can't end up with a cyclic
list of notes.
2003-11-13 Eric Botcazou <ebotcazou@libertysurf.fr> 2003-11-13 Eric Botcazou <ebotcazou@libertysurf.fr>
PR optimization/12926 PR optimization/12926
......
...@@ -12702,11 +12702,12 @@ distribute_notes (rtx notes, rtx from_insn, rtx i3, rtx i2) ...@@ -12702,11 +12702,12 @@ distribute_notes (rtx notes, rtx from_insn, rtx i3, rtx i2)
This might delete other dead insns recursively. This might delete other dead insns recursively.
First set the pattern to something that won't use First set the pattern to something that won't use
any register. */ any register. */
rtx old_notes = REG_NOTES (tem);
PATTERN (tem) = pc_rtx; PATTERN (tem) = pc_rtx;
REG_NOTES (tem) = NULL;
distribute_notes (REG_NOTES (tem), tem, tem, distribute_notes (old_notes, tem, tem, NULL_RTX);
NULL_RTX);
distribute_links (LOG_LINKS (tem)); distribute_links (LOG_LINKS (tem));
PUT_CODE (tem, NOTE); PUT_CODE (tem, NOTE);
...@@ -12718,10 +12719,11 @@ distribute_notes (rtx notes, rtx from_insn, rtx i3, rtx i2) ...@@ -12718,10 +12719,11 @@ distribute_notes (rtx notes, rtx from_insn, rtx i3, rtx i2)
if (cc0_setter) if (cc0_setter)
{ {
PATTERN (cc0_setter) = pc_rtx; PATTERN (cc0_setter) = pc_rtx;
old_notes = REG_NOTES (cc0_setter);
REG_NOTES (cc0_setter) = NULL;
distribute_notes (REG_NOTES (cc0_setter), distribute_notes (old_notes, cc0_setter,
cc0_setter, cc0_setter, cc0_setter, NULL_RTX);
NULL_RTX);
distribute_links (LOG_LINKS (cc0_setter)); distribute_links (LOG_LINKS (cc0_setter));
PUT_CODE (cc0_setter, NOTE); PUT_CODE (cc0_setter, NOTE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment