aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2009-11-16 14:26:40 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2009-11-16 13:26:40 +0000
commit0e3776dbeef569670b356754e9c38bcc9474a090 (patch)
treeece4c3265c5f578e93ab9450ccf60b597e2a02e3 /gcc/cgraphunit.c
parent0229b692f4cba2d23b960284c79384b6f5b2309a (diff)
downloadgcc-0e3776dbeef569670b356754e9c38bcc9474a090.zip
gcc-0e3776dbeef569670b356754e9c38bcc9474a090.tar.gz
gcc-0e3776dbeef569670b356754e9c38bcc9474a090.tar.bz2
cgraph.c (cgraph_release_function_body): Update use of ipa_transforms_to_apply.
* cgraph.c (cgraph_release_function_body): Update use of ipa_transforms_to_apply. (cgraph_remove_node): Remove ipa_transforms_to_apply. * cgraph.h (struct cgraph_node): Add ipa_transforms_to_apply. * cgraphunit.c (save_inline_function_body): Clear ipa_transforms for copied body. (cgraph_materialize_clone): Remove original if dead. * lto-streamer-in.c (lto_read_body): Remove FIXME and ipa_transforms_to_apply hack. * function.h (struct function): Add ipa_transforms_to_apply. * ipa.c (cgraph_remove_unreachable_nodes): Handle dead clone originals. * tree-inline.c (copy_bb): Update sanity check. (initialize_cfun): Do not copy ipa_transforms_to_apply. (expand_call_inline): remove dead clone originals. (tree_function_versioning): Merge transformation queues. * passes.c (add_ipa_transform_pass): Remove. (execute_one_ipa_transform_pass): Update ipa_transforms_to_apply tracking. (execute_all_ipa_transforms): Update. (execute_one_pass): Update. * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply. From-SVN: r154200
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r--gcc/cgraphunit.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 377e435..1c13f95 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -1777,8 +1777,8 @@ save_inline_function_body (struct cgraph_node *node)
TREE_PUBLIC (first_clone->decl) = 0;
DECL_COMDAT (first_clone->decl) = 0;
VEC_free (ipa_opt_pass, heap,
- DECL_STRUCT_FUNCTION (first_clone->decl)->ipa_transforms_to_apply);
- DECL_STRUCT_FUNCTION (first_clone->decl)->ipa_transforms_to_apply = NULL;
+ first_clone->ipa_transforms_to_apply);
+ first_clone->ipa_transforms_to_apply = NULL;
#ifdef ENABLE_CHECKING
verify_cgraph_node (first_clone);
@@ -1810,6 +1810,8 @@ cgraph_materialize_clone (struct cgraph_node *node)
node->clone_of->clones = node->next_sibling_clone;
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);
node->clone_of = NULL;
bitmap_obstack_release (NULL);
}