This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
conditional noreturn call is not control flow instruction
- From: Jan Hubicka <jh at suse dot cz>
- To: rth at redhat dot com, gcc-patches at gcc dot gnu dot org
- Date: Wed, 31 Mar 2004 21:31:16 +0200
- Subject: conditional noreturn call is not control flow instruction
Hi,
this patch is needed to get tree-profiling branch to bootstrtap on ia64.
After conditionalizing the noreturn call we end up with noreturn call in the
middle of BB (that is IMO valid as we do so for other instructions that may
terminate program as well) but since it is considered control_flow_insn_p we
die in verify_cfg.
Bootstrapped/regtested on profiling-branch, mainline testing in procoess, OK
for mainline if it passes?
2004-03-31 Jan Hubicka <jh@suse.cz>
* cfgbuild.c (control_flow_insn_p): Conditional noreturn call is not
control flow insn.
Index: cfgbuild.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfgbuild.c,v
retrieving revision 1.25.2.13.2.2
diff -c -3 -p -r1.25.2.13.2.2 cfgbuild.c
*** cfgbuild.c 3 Mar 2004 14:17:33 -0000 1.25.2.13.2.2
--- cfgbuild.c 31 Mar 2004 19:23:51 -0000
*************** control_flow_insn_p (rtx insn)
*** 108,114 ****
&& GET_CODE (PATTERN (insn)) != ADDR_DIFF_VEC);
case CALL_INSN:
! if (find_reg_note (insn, REG_NORETURN, 0))
return true;
/* Call insn may return to the nonlocal goto handler. */
return ((nonlocal_goto_handler_labels
--- 108,117 ----
&& GET_CODE (PATTERN (insn)) != ADDR_DIFF_VEC);
case CALL_INSN:
! /* Noreturn instructions terminate the basic blocks only if they happen
! unconditionally. */
! if (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