This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix devirtualization ICE (PR tree-optimization/59622, take 3)
- From: Richard Biener <rguenther at suse dot de>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 9 Jan 2014 14:13:39 +0100 (CET)
- Subject: Re: [PATCH] Fix devirtualization ICE (PR tree-optimization/59622, take 3)
- Authentication-results: sourceware.org; auth=none
- References: <20140108111813 dot GE892 at tucnak dot redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1401081218500 dot 4623 at zhemvz dot fhfr dot qr> <20140108224457 dot GQ892 at tucnak dot redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1401090943520 dot 4623 at zhemvz dot fhfr dot qr> <20140109110935 dot GW892 at tucnak dot redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1401091212180 dot 4623 at zhemvz dot fhfr dot qr> <20140109111854 dot GY892 at tucnak dot redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1401091230240 dot 4623 at zhemvz dot fhfr dot qr> <20140109120657 dot GZ892 at tucnak dot redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1401091329580 dot 4623 at zhemvz dot fhfr dot qr> <20140109123637 dot GB892 at tucnak dot redhat dot com>
On Thu, 9 Jan 2014, Jakub Jelinek wrote:
> On Thu, Jan 09, 2014 at 01:30:53PM +0100, Richard Biener wrote:
> > > gimplify_modify_expr has:
> > >
> > > if (!gimple_call_noreturn_p (assign))
> > > gimple_call_set_lhs (assign, *to_p);
> >
> > Ok, it seems to be too early then - move it after the folding.
>
> That wouldn't help all the other early calls of fold_stmt though.
> E.g. lower_omp. Plus, even in gimplify_modify_expr, doing it
> after fold_stmt would mean having to walk all stmts created by the folding?,
> check if they are calls (because a call can fold into nothing or something
> completely different). Isn't it better then fold_stmt does that instead?
Hmm, maybe. Not sure why we are this anal about requiring noreturn
calls not to have a LHS. But if we require callers in SSA form
to update the stmt and properly cleanup the cfg if fold_stmt returns
true then it's reasonable to require at least "something" for callers
from non-SSA/CFG code.
That is, I don't like this special-casing. If so, then rather
don't fold at this point - thus if (... !inplace && in_ssa_form (cfun)
...) (or rather if we have a CFG - cfun && cfun->curr_properties &
PROP_cfg).
Richard.
- References:
- Re: [PATCH] Fix devirtualization ICE (PR tree-optimization/59622, take 3)
- Re: [PATCH] Fix devirtualization ICE (PR tree-optimization/59622, take 3)
- Re: [PATCH] Fix devirtualization ICE (PR tree-optimization/59622, take 3)
- Re: [PATCH] Fix devirtualization ICE (PR tree-optimization/59622, take 3)
- Re: [PATCH] Fix devirtualization ICE (PR tree-optimization/59622, take 3)
- Re: [PATCH] Fix devirtualization ICE (PR tree-optimization/59622, take 3)
- Re: [PATCH] Fix devirtualization ICE (PR tree-optimization/59622, take 3)
- Re: [PATCH] Fix devirtualization ICE (PR tree-optimization/59622, take 3)
- Re: [PATCH] Fix devirtualization ICE (PR tree-optimization/59622, take 3)
- Re: [PATCH] Fix devirtualization ICE (PR tree-optimization/59622, take 3)
- Re: [PATCH] Fix devirtualization ICE (PR tree-optimization/59622, take 3)