diff options
author | Jeffrey A Law <law@cygnus.com> | 1997-10-07 15:52:32 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1997-10-07 09:52:32 -0600 |
commit | 1447b516d2392c5c68bd44709366b41fc80a24a6 (patch) | |
tree | 5afd64815f07f4c6935f510f9b5dd4f19f7077fc | |
parent | 1a42ead7f38bc5ec0d238fabc0738802b91d79e5 (diff) | |
download | gcc-1447b516d2392c5c68bd44709366b41fc80a24a6.zip gcc-1447b516d2392c5c68bd44709366b41fc80a24a6.tar.gz gcc-1447b516d2392c5c68bd44709366b41fc80a24a6.tar.bz2 |
haifa-sched.c (schedule_block): If the first real insn in a block has any special notes attached to it, remove them.
* haifa-sched.c (schedule_block): If the first real insn in a
block has any special notes attached to it, remove them.
Fixes bug reported by Weiwen Liu.
From-SVN: r15853
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/haifa-sched.c | 19 |
2 files changed, 24 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 938bf56..edb1de0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Tue Oct 7 09:54:35 1997 Jeffrey A Law (law@cygnus.com) + + * haifa-sched.c (schedule_block): If the first real insn in a + block has any special notes attached to it, remove them. + Tue Oct 7 09:48:51 1997 Richard Henderson <rth@cygnus.com> * alpha.h (FLOAT_STORE_FLAG_VALUE): It's 2.0 not 0.5. diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c index 36f3c92..a88b8c4 100644 --- a/gcc/haifa-sched.c +++ b/gcc/haifa-sched.c @@ -6601,6 +6601,25 @@ schedule_block (bb, rgn, rgn_n_insns) had different notions of what the "head" insn was. */ get_block_head_tail (bb, &head, &tail); + /* Interblock scheduling could have moved the original head insn from this + block into a proceeding block. This may also cause schedule_block and + compute_forward_dependences to have different notions of what the + "head" insn was. + + If the interblock movement happened to make this block start with + some notes (LOOP, EH or SETJMP) before the first real insn, then + HEAD will have various special notes attached to it which must be + removed so that we don't end up with extra copies of the notes. */ + if (GET_RTX_CLASS (GET_CODE (head)) == 'i') + { + rtx note; + + for (note = REG_NOTES (head); note; note = XEXP (note, 1)) + if (REG_NOTE_KIND (note) == REG_DEAD + && GET_CODE (XEXP (note, 0)) == CONST_INT) + remove_note (head, note); + } + next_tail = NEXT_INSN (tail); prev_head = PREV_INSN (head); |