From: Jan Hubicka Date: Thu, 27 May 2004 12:56:30 +0000 (+0200) Subject: * cfgbuild.c (control_flow_insn_p): Notice noreturn call X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=baf8706c69b80fbf100bdb854d96d1d19bb1ad52;p=gcc.git * cfgbuild.c (control_flow_insn_p): Notice noreturn call From-SVN: r82321 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c6951713dd1..6691fabb8ac 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2004-05-27 Jan Hubicka + + * cfgbuild.c (control_flow_insn_p): Notice noreturn call + 2004-05-25 Paolo Bonzini * combine.c (gen_binary): Remove. diff --git a/gcc/cfgbuild.c b/gcc/cfgbuild.c index 3e9a36cca4d..e184479cd16 100644 --- a/gcc/cfgbuild.c +++ b/gcc/cfgbuild.c @@ -108,6 +108,12 @@ control_flow_insn_p (rtx insn) && GET_CODE (PATTERN (insn)) != ADDR_DIFF_VEC); case CALL_INSN: + /* Noreturn and sibling call instructions terminate the basic blocks + (but only if they happen unconditionally). */ + if ((SIBLING_CALL_P (insn) + || find_reg_note (insn, REG_NORETURN, 0)) + && GET_CODE (PATTERN (insn)) != COND_EXEC) + return true; /* Call insn may return to the nonlocal goto handler. */ return ((nonlocal_goto_handler_labels && (0 == (note = find_reg_note (insn, REG_EH_REGION,