WHOR versus same_comdat_group

Richard Guenther rguenther@suse.de
Wed Apr 21 09:03:00 GMT 2010


On Tue, 20 Apr 2010, Jan Hubicka wrote:

> Hi,
> code in output_cgraph is trying to add functions from same comdat groups
> as to the same partition.  I think this is wrong.  We need to output
> into single group; adding them as boundary functions is not going to solve
> that (and causes ICE building DLV).
> Since our 1-1 partitioner is file based, all comdat groups will get
> to single partition, so I think it is safe to remove this code and not
> output comdat groups for any bounddary functions.
> 
> Bootstrapped/regtested x86_64-linux, OK?

I'm not 100% sure, but we can revisit that later.  So, Ok.

Thanks,
Richard.

> 	* lto-cgraph.c (lto_output_node): Do not output comdat groups
> 	for boundary nodes.
> 	(output_cgraph): Do not arrange comdat groups for boundary nodes.
> Index: lto-cgraph.c
> ===================================================================
> --- lto-cgraph.c	(revision 158563)
> +++ lto-cgraph.c	(working copy)
> @@ -324,7 +326,7 @@ lto_output_node (struct lto_simple_outpu
>    lto_output_sleb128_stream (ob->main_stream,
>  			     node->global.estimated_growth);
>    lto_output_uleb128_stream (ob->main_stream, node->global.inlined);
> -  if (node->same_comdat_group)
> +  if (node->same_comdat_group && !boundary_p)
>      {
>        ref = lto_cgraph_encoder_lookup (encoder, node->same_comdat_group);
>        gcc_assert (ref != LCC_NOT_FOUND);
> @@ -460,18 +461,8 @@ output_cgraph (cgraph_node_set set)
>  		}
>  	    }
>  	}
> -      /* Also with each included function include all other functions
> -	 in the same comdat group.  */
> -      if (node->same_comdat_group)
> -	{
> -	  struct cgraph_node *next;
> -	  for (next = node->same_comdat_group;
> -	       next != node;
> -	       next = next->same_comdat_group)
> -	    if (!cgraph_node_in_set_p (next, set))
> -	      add_node_to (encoder, next);
> -	}
>      }
>  
>    /* Write out the nodes.  We must first output a node and then its clones,
>       otherwise at a time reading back the node there would be nothing to clone
> 
> 

-- 
Richard Guenther <rguenther@suse.de>
Novell / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 - GF: Markus Rex



More information about the Gcc-patches mailing list