diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-01 15:27:58 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-01 15:27:58 +0000 |
commit | e1f3beab7eb8837d4a276d5e55dd15801fe285b2 (patch) | |
tree | 94ca730dbecf565a2483825a96b538ba2fd4a784 /gcc/final.c | |
parent | 5cd0159387ed6d495509431130373d7eb91aee6c (diff) | |
download | gcc-e1f3beab7eb8837d4a276d5e55dd15801fe285b2.tar.gz |
* final.c (final_scan_insn): Revert part of 2005-03-30 patch: when
doing a peephole optimization, once again put any notes in the
proper position.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97399 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/final.c')
-rw-r--r-- | gcc/final.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/gcc/final.c b/gcc/final.c index 76337244e4a..ea842550cfb 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -2306,11 +2306,23 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED, emit them before the peephole. */ if (next != 0 && next != NEXT_INSN (insn)) { - rtx note; + rtx note, prev = PREV_INSN (insn); for (note = NEXT_INSN (insn); note != next; note = NEXT_INSN (note)) final_scan_insn (note, file, optimize, nopeepholes, seen); + + /* Put the notes in the proper position for a later + rescan. For example, the SH target can do this + when generating a far jump in a delayed branch + sequence. */ + note = NEXT_INSN (insn); + PREV_INSN (note) = prev; + NEXT_INSN (prev) = note; + NEXT_INSN (PREV_INSN (next)) = insn; + PREV_INSN (insn) = PREV_INSN (next); + NEXT_INSN (insn) = next; + PREV_INSN (next) = insn; } /* PEEPHOLE might have changed this. */ |