This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.

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);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]