Commit 6c52831d by Martin Liska Committed by Martin Liska

Move symtab_node::dump_table to symbol_table::dump

2017-05-23  Martin Liska  <mliska@suse.cz>

	* cgraph.h: Move symtab_node::dump_table to symbol_table::dump
	and symtab_node::debug_symtab to symbol_table::debug.
	* cgraphunit.c (analyze_functions): Use the renamed function.
	(symbol_table::compile): Likewise.
	* ipa-cp.c (ipcp_verify_propagated_values): Likewise.
	* ipa-icf.c (sem_item_optimizer::execute): Likewise.
	* passes.c (execute_todo): Likewise.
	* symtab.c (symbol_table::dump): New function.
	* tree-ssa-structalias.c (ipa_pta_execute): Use the renamed function.
2017-05-23  Martin Liska  <mliska@suse.cz>

	* lto.c (read_cgraph_and_symbols): Use the renamed function.
	(do_whole_program_analysis): Use the renamed function.

From-SVN: r248368
parent 3494e738
2017-05-23 Martin Liska <mliska@suse.cz>
* cgraph.h: Move symtab_node::dump_table to symbol_table::dump
and symtab_node::debug_symtab to symbol_table::debug.
* cgraphunit.c (analyze_functions): Use the renamed function.
(symbol_table::compile): Likewise.
* ipa-cp.c (ipcp_verify_propagated_values): Likewise.
* ipa-icf.c (sem_item_optimizer::execute): Likewise.
* passes.c (execute_todo): Likewise.
* symtab.c (symbol_table::dump): New function.
* tree-ssa-structalias.c (ipa_pta_execute): Use the renamed function.
2017-05-23 Jan Hubicka <hubicka@ucw.cz>
* ipa-fnsummary.c (estimate_node_size_and_time): Do not sanity check
......
......@@ -411,12 +411,6 @@ public:
Return NULL if there's no such node. */
static symtab_node *get_for_asmname (const_tree asmname);
/* Dump symbol table to F. */
static void dump_table (FILE *);
/* Dump symbol table to stderr. */
static void DEBUG_FUNCTION debug_symtab (void);
/* Verify symbol table for internal consistency. */
static DEBUG_FUNCTION void verify_symtab_nodes (void);
......@@ -2178,6 +2172,15 @@ public:
/* Set the DECL_ASSEMBLER_NAME and update symtab hashtables. */
void change_decl_assembler_name (tree decl, tree name);
/* Dump symbol table to F. */
void dump (FILE *f);
/* Dump symbol table to stderr. */
inline DEBUG_FUNCTION void debug (void)
{
dump (stderr);
}
/* Return true if assembler names NAME1 and NAME2 leads to the same symbol
name. */
static bool assembler_names_equal_p (const char *name1, const char *name2);
......
......@@ -1208,7 +1208,7 @@ analyze_functions (bool first_time)
if (symtab->dump_file)
{
fprintf (symtab->dump_file, "\n\nInitial ");
symtab_node::dump_table (symtab->dump_file);
symtab->dump (symtab->dump_file);
}
if (first_time)
......@@ -1278,7 +1278,7 @@ analyze_functions (bool first_time)
if (symtab->dump_file)
{
fprintf (symtab->dump_file, "\n\nReclaimed ");
symtab_node::dump_table (symtab->dump_file);
symtab->dump (symtab->dump_file);
}
bitmap_obstack_release (NULL);
ggc_collect ();
......@@ -2485,7 +2485,7 @@ symbol_table::compile (void)
if (dump_file)
{
fprintf (dump_file, "Optimized ");
symtab_node:: dump_table (dump_file);
symtab->dump (dump_file);
}
if (post_ipa_mem_report)
{
......@@ -2551,7 +2551,7 @@ symbol_table::compile (void)
if (dump_file)
{
fprintf (dump_file, "\nFinal ");
symtab_node::dump_table (dump_file);
symtab->dump (dump_file);
}
if (!flag_checking)
return;
......
......@@ -1399,7 +1399,7 @@ ipcp_verify_propagated_values (void)
{
if (dump_file)
{
symtab_node::dump_table (dump_file);
symtab->dump (dump_file);
fprintf (dump_file, "\nIPA lattices after constant "
"propagation, before gcc_unreachable:\n");
print_all_lattices (dump_file, true, false);
......
......@@ -2643,7 +2643,7 @@ sem_item_optimizer::execute (void)
bool merged_p = merge_classes (prev_class_count);
if (dump_file && (dump_flags & TDF_DETAILS))
symtab_node::dump_table (dump_file);
symtab->dump (dump_file);
return merged_p;
}
......
2017-05-23 Martin Liska <mliska@suse.cz>
* lto.c (read_cgraph_and_symbols): Use the renamed function.
(do_whole_program_analysis): Use the renamed function.
2017-05-22 Jan Hubicka <hubicka@ucw.cz>
* lto.c: Replace ipa-inline.h by ipa-fnsummary.h
......
......@@ -2927,7 +2927,7 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames)
if (symtab->dump_file)
{
fprintf (symtab->dump_file, "Before merging:\n");
symtab_node::dump_table (symtab->dump_file);
symtab->dump (symtab->dump_file);
}
if (!flag_ltrans)
{
......@@ -3092,7 +3092,7 @@ do_whole_program_analysis (void)
symtab->function_flags_ready = true;
if (symtab->dump_file)
symtab_node::dump_table (symtab->dump_file);
symtab->dump (symtab->dump_file);
bitmap_obstack_initialize (NULL);
symtab->state = IPA_SSA;
......@@ -3105,7 +3105,7 @@ do_whole_program_analysis (void)
if (symtab->dump_file)
{
fprintf (symtab->dump_file, "Optimized ");
symtab_node::dump_table (symtab->dump_file);
symtab->dump (symtab->dump_file);
}
symtab_node::checking_verify_symtab_nodes ();
......
......@@ -2040,7 +2040,7 @@ execute_todo (unsigned int flags)
if ((flags & TODO_dump_symtab) && dump_file && !current_function_decl)
{
gcc_assert (!cfun);
symtab_node::dump_table (dump_file);
symtab->dump (dump_file);
/* Flush the file. If verification fails, we won't be able to
close the file before aborting. */
fflush (dump_file);
......
......@@ -913,10 +913,8 @@ symtab_node::dump (FILE *f)
vnode->dump (f);
}
/* Dump symbol table to F. */
void
symtab_node::dump_table (FILE *f)
symbol_table::dump (FILE *f)
{
symtab_node *node;
fprintf (f, "Symbol table:\n\n");
......@@ -924,15 +922,6 @@ symtab_node::dump_table (FILE *f)
node->dump (f);
}
/* Dump symbol table to stderr. */
DEBUG_FUNCTION void
symtab_node::debug_symtab (void)
{
dump_table (stderr);
}
/* Return the cgraph node that has ASMNAME for its DECL_ASSEMBLER_NAME.
Return NULL if there's no such node. */
......
......@@ -7800,7 +7800,7 @@ ipa_pta_execute (void)
if (dump_file && (dump_flags & TDF_DETAILS))
{
symtab_node::dump_table (dump_file);
symtab->dump (dump_file);
fprintf (dump_file, "\n");
}
......
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