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> 2012-05-10 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/53125 PR rtl-optimization/53125
......
...@@ -1162,7 +1162,7 @@ cgraph_release_function_body (struct cgraph_node *node) ...@@ -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 /* If the node is abstract and needed, then do not clear DECL_INITIAL
of its associated function function declaration because it's of its associated function function declaration because it's
needed to emit debug info later. */ 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; DECL_INITIAL (node->symbol.decl) = error_mark_node;
} }
......
...@@ -637,7 +637,7 @@ int compute_call_stmt_bb_frequency (tree, basic_block bb); ...@@ -637,7 +637,7 @@ int compute_call_stmt_bb_frequency (tree, basic_block bb);
void record_references_in_initializer (tree, bool); void record_references_in_initializer (tree, bool);
/* In ipa.c */ /* 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 cgraph_node_set_new (void);
cgraph_node_set_iterator cgraph_node_set_find (cgraph_node_set, cgraph_node_set_iterator cgraph_node_set_find (cgraph_node_set,
struct cgraph_node *); struct cgraph_node *);
......
...@@ -870,7 +870,7 @@ cgraph_materialize_all_clones (void) ...@@ -870,7 +870,7 @@ cgraph_materialize_all_clones (void)
#ifdef ENABLE_CHECKING #ifdef ENABLE_CHECKING
verify_cgraph (); verify_cgraph ();
#endif #endif
cgraph_remove_unreachable_nodes (false, cgraph_dump_file); symtab_remove_unreachable_nodes (false, cgraph_dump_file);
} }
#include "gt-cgraphclones.h" #include "gt-cgraphclones.h"
...@@ -1836,7 +1836,7 @@ ipa_passes (void) ...@@ -1836,7 +1836,7 @@ ipa_passes (void)
because TODO is run before the subpasses. It is important to remove 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 the unreachable functions to save works at IPA level and to get LTO
symbol tables right. */ 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 /* If pass_all_early_optimizations was not scheduled, the state of
the cgraph will not be properly updated. Update it now. */ the cgraph will not be properly updated. Update it now. */
...@@ -1962,7 +1962,7 @@ compile (void) ...@@ -1962,7 +1962,7 @@ compile (void)
/* This pass remove bodies of extern inline functions we never inlined. /* This pass remove bodies of extern inline functions we never inlined.
Do this later so other IPA passes see what is really going on. */ 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; cgraph_global_info_ready = true;
if (cgraph_dump_file) if (cgraph_dump_file)
{ {
...@@ -1987,7 +1987,7 @@ compile (void) ...@@ -1987,7 +1987,7 @@ compile (void)
cgraph_materialize_all_clones (); cgraph_materialize_all_clones ();
bitmap_obstack_initialize (NULL); bitmap_obstack_initialize (NULL);
execute_ipa_pass_list (all_late_ipa_passes); 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 #ifdef ENABLE_CHECKING
verify_symtab (); verify_symtab ();
#endif #endif
......
...@@ -2445,7 +2445,6 @@ ipcp_driver (void) ...@@ -2445,7 +2445,6 @@ ipcp_driver (void)
struct cgraph_2edge_hook_list *edge_duplication_hook_holder; struct cgraph_2edge_hook_list *edge_duplication_hook_holder;
struct topo_info topo; struct topo_info topo;
cgraph_remove_unreachable_nodes (true,dump_file);
ipa_check_create_node_params (); ipa_check_create_node_params ();
ipa_check_create_edge_args (); ipa_check_create_edge_args ();
grow_next_edge_clone_vector (); grow_next_edge_clone_vector ();
......
...@@ -1717,7 +1717,7 @@ ipa_inline (void) ...@@ -1717,7 +1717,7 @@ ipa_inline (void)
} }
inline_small_functions (); inline_small_functions ();
cgraph_remove_unreachable_nodes (true, dump_file); symtab_remove_unreachable_nodes (true, dump_file);
free (order); free (order);
/* We already perform some inlining of functions called once during /* We already perform some inlining of functions called once during
......
...@@ -1865,7 +1865,7 @@ execute_todo (unsigned int flags) ...@@ -1865,7 +1865,7 @@ execute_todo (unsigned int flags)
if (flags & TODO_remove_functions) if (flags & TODO_remove_functions)
{ {
gcc_assert (!cfun); 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) if ((flags & TODO_dump_symtab) && dump_file && !current_function_decl)
...@@ -2150,7 +2150,7 @@ execute_one_pass (struct opt_pass *pass) ...@@ -2150,7 +2150,7 @@ execute_one_pass (struct opt_pass *pass)
bool applied = false; bool applied = false;
do_per_function (apply_ipa_transforms, (void *)&applied); do_per_function (apply_ipa_transforms, (void *)&applied);
if (applied) if (applied)
cgraph_remove_unreachable_nodes (true, dump_file); symtab_remove_unreachable_nodes (true, dump_file);
/* Restore current_pass. */ /* Restore current_pass. */
current_pass = 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