> > Hi,
> > 
> > PR 63814 is caused by cgraph_edge_brings_value_p misidentifying an
> > edge to an expanded artificial thunk as an edge to the original node,
> > which then leads to crazy double-cloning and doubling the thunks along
> > the call.
> > 
> > This patch fixes the bug by strengthening the predicate so that it
> > knows where the value is supposed to go and can check that it goes
> > there and not anywhere else.  It also adds an extra availability check
> > that was probably missing in it.
> > 
> > Bootstrapped and tested on x86_64-linux, and i686-linux.  OK for
> > trunk?
> > 
> > Thanks,
> > 
> > Martin
> > 
> > 
> > 2014-11-20  Martin Jambor  <mjam...@suse.cz>
> > 
> >     PR ipa/63814
> >     * ipa-cp.c (same_node_or_its_all_contexts_clone_p): New function.
> >     (cgraph_edge_brings_value_p): New parameter dest, use
> >     same_node_or_its_all_contexts_clone_p and check availability.
> >     (cgraph_edge_brings_value_p): Likewise.
> >     (get_info_about_necessary_edges): New parameter dest, pass it to
> >     cgraph_edge_brings_value_p.  Update caller.
> >     (gather_edges_for_value): Likewise.
> >     (perhaps_add_new_callers): Use cgraph_edge_brings_value_p to check
> >     both the destination and availability.

OK

Reply via email to