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]

WHOR versus same_comdat_group


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?

	* 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


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