This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH]: Fix PR rtl-optimization/29841: cfgbuild.c: control_flow_insn_p () .
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Maxim Kuvyrkov <mkuvyrkov at ispras dot ru>
- Cc: Eric Botcazou <ebotcazou at libertysurf dot fr>, gcc-patches at gcc dot gnu dot org, Jan Hubicka <jh at suse dot cz>
- Date: Tue, 17 Apr 2007 17:49:02 +0200
- Subject: Re: [PATCH]: Fix PR rtl-optimization/29841: cfgbuild.c: control_flow_insn_p () .
- References: <45AB3F32.4020808@ispras.ru> <200704170953.59519.ebotcazou@libertysurf.fr> <46249AA5.504@ispras.ru>
> 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