This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Tree profiling merge 2 - noreturn calls..


Hi,
we currently rely on barrier past noreturn call to terminate the basic block.
In the new code I am trying to avoid any use of barriers, so I need to discover
the boundary myself.

Bootstrapped/regtested i686-pc-gnu-linux, OK?
2004-05-25  Jan Hubicka  <jh@suse.cz>

	* cfgbuild.c (control_flow_insn_p):  Notice noreturn call
Index: cfgbuild.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfgbuild.c,v
retrieving revision 1.45
diff -c -3 -p -r1.45 cfgbuild.c
*** cfgbuild.c	13 May 2004 06:39:32 -0000	1.45
--- cfgbuild.c	25 May 2004 15:20:23 -0000
*************** control_flow_insn_p (rtx insn)
*** 108,113 ****
--- 108,119 ----
  	      && 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,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]