diff mbox

LTO plugin and comdat symbols

Message ID 20101007105450.GB31320@kam.mff.cuni.cz
State New
Headers show

Commit Message

Jan Hubicka Oct. 7, 2010, 10:54 a.m. UTC
> 
> The ipa.c changes caused:
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45926

Hi,
I reverted the cgraph_remove_unreachable_nodes hunk.  It originally wasn't
supposed to be in the patch, I must've grabbed earlier version of it
(it also explains why I had to re-write changelog).

The change is correct, however gomp code keeps functions without properly inserting
them to callgraph across some time so I will submit separate patch for this.

My apologizes for the breakage.
Honza
diff mbox

Patch

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 165089)
+++ ChangeLog	(working copy)
@@ -1,3 +1,8 @@ 
+2010-10-07  Jan Hubicka  <jh@suse.cz>
+
+	PR middle-end/45926
+	* ipa.c (cgraph_remove_unreachable_nodes): Revert my previous patch.
+
 2010-10-07  Richard Guenther  <rguenther@suse.de>
 
 	PR bootstrap/45914
Index: ipa.c
===================================================================
--- ipa.c	(revision 165088)
+++ ipa.c	(working copy)
@@ -238,19 +238,14 @@  cgraph_remove_unreachable_nodes (bool be
 #endif
   varpool_reset_queue ();
   for (node = cgraph_nodes; node; node = node->next)
-    if (!node->analyzed)
-      {
-        gcc_assert (!node->aux);
-	node->reachable = false;
-      }
-    else if ((!cgraph_can_remove_if_no_direct_calls_and_refs_p (node)
-	      /* Keep around virtual functions for possible devirtualization.  */
-	      || (!before_inlining_p
-		  && !node->global.inlined_to
-		  && DECL_VIRTUAL_P (node->decl)
-		  && (DECL_COMDAT (node->decl) || DECL_EXTERNAL (node->decl))))
-	     && ((!DECL_EXTERNAL (node->decl))
-		 || before_inlining_p))
+    if ((!cgraph_can_remove_if_no_direct_calls_and_refs_p (node)
+	 /* Keep around virtual functions for possible devirtualization.  */
+	 || (!before_inlining_p
+	     && !node->global.inlined_to
+	     && DECL_VIRTUAL_P (node->decl)
+	     && (DECL_COMDAT (node->decl) || DECL_EXTERNAL (node->decl))))
+	&& ((!DECL_EXTERNAL (node->decl))
+            || before_inlining_p))
       {
         gcc_assert (!node->global.inlined_to);
 	enqueue_cgraph_node (node, &first);