From: hubicka Date: Sat, 29 May 2010 08:17:36 +0000 (+0000) Subject: * cgraphunit.c (cgraph_materialize_clone): Only remove calles, refs and body; X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d6a1ec8b38fa3740fc89abde240044bc98490d9;p=thirdparty%2Fgcc.git * cgraphunit.c (cgraph_materialize_clone): Only remove calles, refs and body; not the whole node for masters of materialized clones. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160019 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3184e7a8bfb0..aed449207fdd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-05-29 Jan Hubicka + + * 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 * config/rs6000/rs6000-c.c: Remove c-tree.h include. diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index ab6bf06c01a1..39711a3b1a7e 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -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); }