diff options
author | rearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-11-13 14:05:55 +0000 |
---|---|---|
committer | rearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-11-13 14:05:55 +0000 |
commit | 7b8421337042b09c4a9cbc86a8528a43c316f677 (patch) | |
tree | f526b7583f5b27a5447dde025ecd1db4ce03f82a /gcc | |
parent | 36e89a6fd0e167ea12390e53aaea6787eb929317 (diff) | |
download | gcc-7b8421337042b09c4a9cbc86a8528a43c316f677.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73547 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/combine.c | 12 |
2 files changed, 13 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8fcf0a15b6b..019985241df 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +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> PR optimization/12926 diff --git a/gcc/combine.c b/gcc/combine.c index c36d9223724..0fbaeba9e72 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -12702,11 +12702,12 @@ distribute_notes (rtx notes, rtx from_insn, rtx i3, rtx i2) This might delete other dead insns recursively. First set the pattern to something that won't use any register. */ + rtx old_notes = REG_NOTES (tem); PATTERN (tem) = pc_rtx; + REG_NOTES (tem) = NULL; - distribute_notes (REG_NOTES (tem), tem, tem, - NULL_RTX); + distribute_notes (old_notes, tem, tem, NULL_RTX); distribute_links (LOG_LINKS (tem)); PUT_CODE (tem, NOTE); @@ -12718,10 +12719,11 @@ distribute_notes (rtx notes, rtx from_insn, rtx i3, rtx i2) if (cc0_setter) { PATTERN (cc0_setter) = pc_rtx; + old_notes = REG_NOTES (cc0_setter); + REG_NOTES (cc0_setter) = NULL; - distribute_notes (REG_NOTES (cc0_setter), - cc0_setter, cc0_setter, - NULL_RTX); + distribute_notes (old_notes, cc0_setter, + cc0_setter, NULL_RTX); distribute_links (LOG_LINKS (cc0_setter)); PUT_CODE (cc0_setter, NOTE); |