summaryrefslogtreecommitdiffstats
path: root/gcc/jump.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2001-08-22 14:51:32 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2001-08-22 14:51:32 +0000
commit3612339f889f1ee7385b52a5ef2b3b7435fba1ca (patch)
tree8b1e78e7c9911f3b44410182b978347eaa7f85b7 /gcc/jump.c
parent7a37f969179c9e7e0ef586e5e2940de6f6aa4087 (diff)
downloadppe42-gcc-3612339f889f1ee7385b52a5ef2b3b7435fba1ca.tar.gz
ppe42-gcc-3612339f889f1ee7385b52a5ef2b3b7435fba1ca.zip
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45107 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/jump.c')
-rw-r--r--gcc/jump.c33
1 files changed, 24 insertions, 9 deletions
diff --git a/gcc/jump.c b/gcc/jump.c
index 7ca135ef035..e8a859423ed 100644
--- a/gcc/jump.c
+++ b/gcc/jump.c
@@ -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. */
OpenPOWER on IntegriCloud