http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48585

--- Comment #13 from Jan Hubicka <hubicka at ucw dot cz> 2011-04-22 08:45:38 
UTC ---
> Index: gcc/tree-inline.c
> ===================================================================
> --- gcc/tree-inline.c   (revision 172817)
> +++ gcc/tree-inline.c   (working copy)
> @@ -1725,6 +1725,7 @@ copy_bb (copy_body_data *id, basic_block
>               if ((!edge
>                    || (edge->indirect_inlining_edge
>                        && id->transform_call_graph_edges ==
> CB_CGE_MOVE_CLONES))
> +                 && id->dst_node->reachable

Reachable flag is not really maningful in this aspect.  You probably want
analyzed flag here.

As my recolection goes, I remember I had problems with missing edges in the
clones being materialized for later materialization alone.  The problem was
that edges gets redirected to new statement when they exists but when
they not, they are not updated and we need to update the statements in
clones that are in callgraph.
Back then I decided to temporarily create the edges so redirection mechanizm
works.  I think since then we fixed it properly by looking for edges in the
descendands even if edge does not exist, so I guess the fix above should work.

Thanks for looking into that!

Honza
>                   && (fn = gimple_call_fndecl (stmt)) != NULL)
>                 { 
>                   struct cgraph_node *dest = cgraph_get_node (fn);
> 
> -- 
> Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug.

Reply via email to