aboutsummaryrefslogtreecommitdiff
path: root/gcc/jump.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2006-11-27 16:07:10 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2006-11-27 15:07:10 +0000
commit071a42f958c1514d608870c965de88af5f797ec2 (patch)
tree3174477a8d1b3916f3d18072026872cc7db41e00 /gcc/jump.c
parent2505a3f233da445e15c2a5d6bdb82c7a6dd6a2d4 (diff)
downloadgcc-071a42f958c1514d608870c965de88af5f797ec2.zip
gcc-071a42f958c1514d608870c965de88af5f797ec2.tar.gz
gcc-071a42f958c1514d608870c965de88af5f797ec2.tar.bz2
cfgexpand.c (construct_exit_block): Don't disturb end of last BB.
* cfgexpand.c (construct_exit_block): Don't disturb end of last BB. * rtl.texi (NOTE_INSN_FUNCTION_END): Remove. * final.c (final_scan_insn): Don't scan NOTE_INSN_FUNCTION_END. * insn-notes.def (FUNCTION_END): Remove. * jump.c (delete_related_insns): Don't worry about FUNCTION_END. (redicect_jump_2): Don't accept -1 parameter to remove FUNCTION_END note. * ifcvt.c (dead_or_predictable): Update call of redirect_jump_2. * function.c (expand_function_end): Don't emit NOTE_INSN_FUNCTION_END * cfglayout.c (duplicate_insn_chain): Don't worry about NOTE_FUNCTION_END. From-SVN: r119250
Diffstat (limited to 'gcc/jump.c')
-rw-r--r--gcc/jump.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/gcc/jump.c b/gcc/jump.c
index 127e8a8..807f2c6 100644
--- a/gcc/jump.c
+++ b/gcc/jump.c
@@ -1467,8 +1467,7 @@ delete_related_insns (rtx insn)
while (next)
{
code = GET_CODE (next);
- if (code == NOTE
- && NOTE_LINE_NUMBER (next) != NOTE_INSN_FUNCTION_END)
+ if (code == NOTE)
next = NEXT_INSN (next);
/* Keep going past other deleted labels to delete what follows. */
else if (code == CODE_LABEL && INSN_DELETED_P (next))
@@ -1631,8 +1630,7 @@ redirect_jump (rtx jump, rtx nlabel, int delete_unused)
}
/* Fix up JUMP_LABEL and label ref counts after OLABEL has been replaced with
- NLABEL in JUMP. If DELETE_UNUSED is non-negative, copy a
- NOTE_INSN_FUNCTION_END found after OLABEL to the place after NLABEL.
+ NLABEL in JUMP.
If DELETE_UNUSED is positive, delete related insn to OLABEL if its ref
count has dropped to zero. */
void
@@ -1641,6 +1639,10 @@ redirect_jump_2 (rtx jump, rtx olabel, rtx nlabel, int delete_unused,
{
rtx note;
+ /* negative DELETE_UNUSED used to be used to signalize behaviour on
+ moving FUNCTION_END note. Just sanity check that no user still worry
+ about this. */
+ gcc_assert (delete_unused >= 0);
JUMP_LABEL (jump) = nlabel;
if (nlabel)
++LABEL_NUSES (nlabel);
@@ -1657,15 +1659,6 @@ redirect_jump_2 (rtx jump, rtx olabel, rtx nlabel, int delete_unused,
}
}
- /* If we're eliding the jump over exception cleanups at the end of a
- function, move the function end note so that -Wreturn-type works. */
- if (olabel && nlabel
- && NEXT_INSN (olabel)
- && NOTE_P (NEXT_INSN (olabel))
- && NOTE_LINE_NUMBER (NEXT_INSN (olabel)) == NOTE_INSN_FUNCTION_END
- && delete_unused >= 0)
- emit_note_after (NOTE_INSN_FUNCTION_END, nlabel);
-
if (olabel && --LABEL_NUSES (olabel) == 0 && delete_unused > 0
/* Undefined labels will remain outside the insn stream. */
&& INSN_UID (olabel))