Commit 04142cc3 by Jan Hubicka Committed by Jan Hubicka

cgraph.h (cgraph_remove_unreachable_nodes): Rename to ...

	* cgraph.h (cgraph_remove_unreachable_nodes): Rename to ...
	(symtab_remove_unreachable_nodes): ... this one.
	* ipa-cp.c (ipcp_driver): Do not remove unreachable nodes.
	* cgraphunit.c (ipa_passes): Update.
	* cgraphclones.c (cgraph_materialize_all_clones): Update.
	* cgraph.c (cgraph_release_function_body): Only turn initial
	into error mark when initial was previously set.
	* ipa-inline.c (ipa_inline): Update.
	* ipa.c: Include ipa-inline.h
	(enqueue_cgraph_node, enqueue_varpool_node): Remove.
	(enqueue_node): New function.
	(process_references): Update.
	(symtab_remove_unreachable_nodes): Cleanup.
	* passes.c (execute_todo, execute_one_pass): Update.

From-SVN: r187375
parent 3af2e3b5
2012-05-10 Jan Hubicka <jh@suse.cz>
* cgraph.h (cgraph_remove_unreachable_nodes): Rename to ...
(symtab_remove_unreachable_nodes): ... this one.
* ipa-cp.c (ipcp_driver): Do not remove unreachable nodes.
* cgraphunit.c (ipa_passes): Update.
* cgraphclones.c (cgraph_materialize_all_clones): Update.
* cgraph.c (cgraph_release_function_body): Only turn initial
into error mark when initial was previously set.
* ipa-inline.c (ipa_inline): Update.
* ipa.c: Include ipa-inline.h
(enqueue_cgraph_node, enqueue_varpool_node): Remove.
(enqueue_node): New function.
(process_references): Update.
(symtab_remove_unreachable_nodes): Cleanup.
* passes.c (execute_todo, execute_one_pass): Update.
2012-05-10 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/53125
......
......@@ -1162,7 +1162,7 @@ cgraph_release_function_body (struct cgraph_node *node)
/* If the node is abstract and needed, then do not clear DECL_INITIAL
of its associated function function declaration because it's
needed to emit debug info later. */
if (!node->abstract_and_needed)
if (!node->abstract_and_needed && DECL_INITIAL (node->symbol.decl))
DECL_INITIAL (node->symbol.decl) = error_mark_node;
}
......
......@@ -637,7 +637,7 @@ int compute_call_stmt_bb_frequency (tree, basic_block bb);
void record_references_in_initializer (tree, bool);
/* In ipa.c */
bool cgraph_remove_unreachable_nodes (bool, FILE *);
bool symtab_remove_unreachable_nodes (bool, FILE *);
cgraph_node_set cgraph_node_set_new (void);
cgraph_node_set_iterator cgraph_node_set_find (cgraph_node_set,
struct cgraph_node *);
......
......@@ -870,7 +870,7 @@ cgraph_materialize_all_clones (void)
#ifdef ENABLE_CHECKING
verify_cgraph ();
#endif
cgraph_remove_unreachable_nodes (false, cgraph_dump_file);
symtab_remove_unreachable_nodes (false, cgraph_dump_file);
}
#include "gt-cgraphclones.h"
......@@ -1836,7 +1836,7 @@ ipa_passes (void)
because TODO is run before the subpasses. It is important to remove
the unreachable functions to save works at IPA level and to get LTO
symbol tables right. */
cgraph_remove_unreachable_nodes (true, cgraph_dump_file);
symtab_remove_unreachable_nodes (true, cgraph_dump_file);
/* If pass_all_early_optimizations was not scheduled, the state of
the cgraph will not be properly updated. Update it now. */
......@@ -1962,7 +1962,7 @@ compile (void)
/* This pass remove bodies of extern inline functions we never inlined.
Do this later so other IPA passes see what is really going on. */
cgraph_remove_unreachable_nodes (false, dump_file);
symtab_remove_unreachable_nodes (false, dump_file);
cgraph_global_info_ready = true;
if (cgraph_dump_file)
{
......@@ -1987,7 +1987,7 @@ compile (void)
cgraph_materialize_all_clones ();
bitmap_obstack_initialize (NULL);
execute_ipa_pass_list (all_late_ipa_passes);
cgraph_remove_unreachable_nodes (true, dump_file);
symtab_remove_unreachable_nodes (true, dump_file);
#ifdef ENABLE_CHECKING
verify_symtab ();
#endif
......
......@@ -2445,7 +2445,6 @@ ipcp_driver (void)
struct cgraph_2edge_hook_list *edge_duplication_hook_holder;
struct topo_info topo;
cgraph_remove_unreachable_nodes (true,dump_file);
ipa_check_create_node_params ();
ipa_check_create_edge_args ();
grow_next_edge_clone_vector ();
......
......@@ -1717,7 +1717,7 @@ ipa_inline (void)
}
inline_small_functions ();
cgraph_remove_unreachable_nodes (true, dump_file);
symtab_remove_unreachable_nodes (true, dump_file);
free (order);
/* We already perform some inlining of functions called once during
......
......@@ -1865,7 +1865,7 @@ execute_todo (unsigned int flags)
if (flags & TODO_remove_functions)
{
gcc_assert (!cfun);
cgraph_remove_unreachable_nodes (true, dump_file);
symtab_remove_unreachable_nodes (true, dump_file);
}
if ((flags & TODO_dump_symtab) && dump_file && !current_function_decl)
......@@ -2150,7 +2150,7 @@ execute_one_pass (struct opt_pass *pass)
bool applied = false;
do_per_function (apply_ipa_transforms, (void *)&applied);
if (applied)
cgraph_remove_unreachable_nodes (true, dump_file);
symtab_remove_unreachable_nodes (true, dump_file);
/* Restore current_pass. */
current_pass = pass;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment