From 0e3776dbeef569670b356754e9c38bcc9474a090 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Mon, 16 Nov 2009 14:26:40 +0100 Subject: 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 --- gcc/lto/lto.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'gcc/lto/lto.c') diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index 323f6b3..40f3c30 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -1826,9 +1826,19 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames) phase. */ if (flag_ltrans) for (node = cgraph_nodes; node; node = node->next) - if (!node->global.inlined_to - && cgraph_decide_is_function_needed (node, node->decl)) - cgraph_mark_needed_node (node); + { + if (!node->global.inlined_to + && cgraph_decide_is_function_needed (node, node->decl)) + cgraph_mark_needed_node (node); + /* FIXME: ipa_transforms_to_apply holds list of passes that have optimization + summaries computed and needs to apply changes. At the moment WHOPR only + supports inlining, so we can push it here by hand. In future we need to stream + this field into ltrans compilation. */ + if (node->analyzed) + VEC_safe_push (ipa_opt_pass, heap, + node->ipa_transforms_to_apply, + (ipa_opt_pass)&pass_ipa_inline); + } timevar_push (TV_IPA_LTO_DECL_IO); -- cgit v1.1