From baf8706c69b80fbf100bdb854d96d1d19bb1ad52 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Thu, 27 May 2004 14:56:30 +0200 Subject: [PATCH] * cfgbuild.c (control_flow_insn_p): Notice noreturn call From-SVN: r82321 --- gcc/ChangeLog | 4 ++++ gcc/cfgbuild.c | 6 ++++++ 2 files changed, 10 insertions(+) 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, -- 2.30.2