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]

Re: [PATCH]: Fix PR rtl-optimization/29841: cfgbuild.c: control_flow_insn_p () .


> Eric Botcazou wrote:
> 
> ...
> 
> >Index: cfgbuild.c
> >===================================================================
> >--- cfgbuild.c	(revision 123843)
> >+++ cfgbuild.c	(working copy)
> >@@ -120,6 +120,11 @@ control_flow_insn_p (rtx insn)
> > 	      || can_throw_internal (insn));
> > 
> >     case INSN:
> >+      /* Treat trap instructions like noreturn calls (same provision).  */
> >+      if (GET_CODE (PATTERN (insn)) == TRAP_IF
> >+	  && XEXP (PATTERN (insn), 0) == const1_rtx)
> >+	return true;
> >+
> >       return (flag_non_call_exceptions && can_throw_internal (insn));
> > 
> >     case BARRIER:
> 
> Did you consider fixing cfgrtl.c: rtl_verify_flow_info_1 () as well? 
> The workaround for a barrier inside a basic block should no longer be 
> needed with you patch.

Please do add the sanity check.  The reason why we have barriers still
arround was partly the fact that we was never able to consistently
recognize instructions that terminate control flow (like the trap), so
perhaps it is time to work out what are the remaining cases.

Honza


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