* cfgbuild.c (control_flow_insn_p): Notice noreturn call
authorJan Hubicka <jh@suse.cz>
Thu, 27 May 2004 12:56:30 +0000 (14:56 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Thu, 27 May 2004 12:56:30 +0000 (12:56 +0000)
From-SVN: r82321

gcc/ChangeLog
gcc/cfgbuild.c

index c6951713dd1b85f3c47782990218dd35d6ca05a0..6691fabb8ac47b079f97247320ddc32b100dfaaf 100644 (file)
@@ -1,3 +1,7 @@
+2004-05-27  Jan Hubicka  <jh@suse.cz>
+
+       * cfgbuild.c (control_flow_insn_p):  Notice noreturn call
+
 2004-05-25  Paolo Bonzini  <bonzini@gnu.org>
 
        * combine.c (gen_binary): Remove.
index 3e9a36cca4d44310a8ad070ed2dea97ab591c509..e184479cd169f2f5852f282856de5aa0e40073e6 100644 (file)
@@ -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,