diff mbox

[PR,48585] Do not create edges when materializing zombie clones

Message ID 20110422122952.GA331@virgil.arch.suse.de
State New
Headers show

Commit Message

Martin Jambor April 22, 2011, 12:29 p.m. UTC
Hi,

the following one-liner fixes LTO build of SPEC 2006 483.xalancbmk.
The problem is that code that adds new call graph edges for
newly-direct calls is triggered for "zombie clones," clones which
exist only to facilitate materialization of their descendant clones
and will be thrown away afterwards, and which do not have and should
not have any outgoing edges.

I have successfully bootstrapped and tested this patch on
x86-64-linux.  I have also verified that 483.xalancbmk builds (with
-g0) with it.  It was approved by Honza in bugzilla and it just looks
so safe that I'm going to commit it now even though it's Friday :-)

Thanks,

Martin



2011-04-22  Martin Jambor  <mjambor@suse.cz>

	PR middle-end/48585
	* tree-inline.c (copy_bb): Create new edges only for analyzed
	nodes.
diff mbox

Patch

Index: src/gcc/tree-inline.c
===================================================================
--- src.orig/gcc/tree-inline.c
+++ src/gcc/tree-inline.c
@@ -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->analyzed
 		  && (fn = gimple_call_fndecl (stmt)) != NULL)
 		{
 		  struct cgraph_node *dest = cgraph_get_node (fn);