diff options
author | Jason Merrill <jason@redhat.com> | 2001-08-22 10:51:32 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2001-08-22 10:51:32 -0400 |
commit | 2270623af33a51bb6776a775bee05f142db83e7c (patch) | |
tree | 8b1e78e7c9911f3b44410182b978347eaa7f85b7 /gcc/jump.c | |
parent | fd10dd09c8c9de14a7b30deddd4e5dd8481b92f4 (diff) | |
download | gcc-2270623af33a51bb6776a775bee05f142db83e7c.zip gcc-2270623af33a51bb6776a775bee05f142db83e7c.tar.gz gcc-2270623af33a51bb6776a775bee05f142db83e7c.tar.bz2 |
jump.c (squeeze_notes): Take parms by reference.
* jump.c (squeeze_notes): Take parms by reference. Handle END being
a squeezable note.
* rtl.h: Adjust.
* ifcvt.c (dead_or_predicable): Adjust.
* loop.c (find_and_verify_loops): Adjust.
* stmt.c (expand_end_case): Adjust.
* flow.c (merge_blocks_move_successor_nojumps): Adjust. Modify the
head and end insn pointers in the basic block, not just local copies.
(merge_blocks_move_predecessor_nojumps): Likewise.
From-SVN: r45107
Diffstat (limited to 'gcc/jump.c')
-rw-r--r-- | gcc/jump.c | 33 |
1 files changed, 24 insertions, 9 deletions
@@ -539,19 +539,24 @@ duplicate_loop_exit_test (loop_start) } /* Move all block-beg, block-end, loop-beg, loop-cont, loop-vtop, loop-end, - notes between START and END out before START. Assume that END is not - such a note. START may be such a note. Returns the value of the new - starting insn, which may be different if the original start was such a - note. */ + notes between START and END out before START. START and END may be such + notes. Returns the values of the new starting and ending insns, which + may be different if the original ones were such notes. */ -rtx -squeeze_notes (start, end) - rtx start, end; +void +squeeze_notes (startp, endp) + rtx* startp; + rtx* endp; { + rtx start = *startp; + rtx end = *endp; + rtx insn; rtx next; + rtx last = NULL; + rtx past_end = NEXT_INSN (end); - for (insn = start; insn != end; insn = next) + for (insn = start; insn != past_end; insn = next) { next = NEXT_INSN (insn); if (GET_CODE (insn) == NOTE @@ -575,9 +580,19 @@ squeeze_notes (start, end) PREV_INSN (next) = prev; } } + else + last = insn; } - return start; + /* There were no real instructions, and we can't represent an empty + range. Die. */ + if (start == past_end) + abort (); + + end = last; + + *startp = start; + *endp = end; } /* Return the label before INSN, or put a new label there. */ |