]> gcc.gnu.org Git - gcc.git/commitdiff
cgraphunit.c (cgraph_materialize_clone): Only remove calles, refs and body...
authorJan Hubicka <jh@suse.cz>
Sat, 29 May 2010 08:17:36 +0000 (10:17 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sat, 29 May 2010 08:17:36 +0000 (08:17 +0000)
* cgraphunit.c (cgraph_materialize_clone): Only remove calles, refs and body;
not the whole node for masters of materialized clones.

From-SVN: r160019

gcc/ChangeLog
gcc/cgraphunit.c

index 3184e7a8bfb0d01b37bb380c623832afcd7bf6e7..aed449207fddb8bfabba8abb68a7648a7a1a89ad 100644 (file)
@@ -1,3 +1,8 @@
+2010-05-29  Jan Hubicka  <jh@suse.cz>
+
+       * cgraphunit.c (cgraph_materialize_clone): Only remove calles, refs and body;
+       not the whole node for masters of materialized clones.
+
 2010-05-29  Mike Stump  <mikestump@comcast.net>
 
        * config/rs6000/rs6000-c.c: Remove c-tree.h include.
index ab6bf06c01a101d83d4b64afa7d80cd5115b3274..39711a3b1a7e4428984228e985034e4968ad15ae 100644 (file)
@@ -2311,7 +2311,11 @@ cgraph_materialize_clone (struct cgraph_node *node)
   node->next_sibling_clone = NULL;
   node->prev_sibling_clone = NULL;
   if (!node->clone_of->analyzed && !node->clone_of->clones)
-    cgraph_remove_node (node->clone_of);
+    {
+      cgraph_release_function_body (node->clone_of);
+      cgraph_node_remove_callees (node->clone_of);
+      ipa_remove_all_references (&node->clone_of->ref_list);
+    }
   node->clone_of = NULL;
   bitmap_obstack_release (NULL);
 }
This page took 0.079041 seconds and 5 git commands to generate.