aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-cp.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2017-05-23 16:39:11 +0200
committerMartin Liska <marxin@gcc.gnu.org>2017-05-23 14:39:11 +0000
commit464d01188e46ccdb19b4783c5d28ef6bc72d32f9 (patch)
tree5307a5518829adcac991e9a7bab2b1ded50a7a3c /gcc/ipa-cp.c
parent6c52831d98b00d02a3c11b46fbf80991ef0dc0fa (diff)
downloadgcc-464d01188e46ccdb19b4783c5d28ef6bc72d32f9.zip
gcc-464d01188e46ccdb19b4783c5d28ef6bc72d32f9.tar.gz
gcc-464d01188e46ccdb19b4783c5d28ef6bc72d32f9.tar.bz2
Introduce symtab_node::dump_{asm_,}name functions.
2017-05-23 Martin Liska <mliska@suse.cz> * cgraph.c (cgraph_node::get_create): Use symtab_node::dump_{asm_,}name functions. (cgraph_edge::make_speculative): Likewise. (cgraph_edge::resolve_speculation): Likewise. (cgraph_edge::redirect_call_stmt_to_callee): Likewise. (cgraph_node::dump): Likewise. * cgraph.h: Likewise. * cgraphunit.c (analyze_functions): Likewise. (symbol_table::compile): Likewise. * ipa-cp.c (print_all_lattices): Likewise. (determine_versionability): Likewise. (initialize_node_lattices): Likewise. (ipcp_verify_propagated_values): Likewise. (estimate_local_effects): Likewise. (update_profiling_info): Likewise. (create_specialized_node): Likewise. (perhaps_add_new_callers): Likewise. (decide_about_value): Likewise. (decide_whether_version_node): Likewise. (identify_dead_nodes): Likewise. (ipcp_store_bits_results): Likewise. * ipa-devirt.c (dump_targets): Likewise. (ipa_devirt): Likewise. * ipa-icf.c (sem_item::dump): Likewise. (sem_function::equals): Likewise. (sem_variable::equals): Likewise. (sem_item_optimizer::read_section): Likewise. (sem_item_optimizer::execute): Likewise. (congruence_class::dump): Likewise. * ipa-inline-analysis.c (dump_ipa_call_summary): Likewise. (dump_inline_summary): Likewise. (estimate_node_size_and_time): Likewise. (inline_analyze_function): Likewise. * ipa-inline-transform.c (inline_call): Likewise. * ipa-inline.c (report_inline_failed_reason): Likewise. (want_early_inline_function_p): Likewise. (edge_badness): Likewise. (update_edge_key): Likewise. (inline_small_functions): Likewise. * ipa-profile.c (ipa_profile): Likewise. * ipa-prop.c (ipa_print_node_jump_functions): Likewise. (ipa_make_edge_direct_to_target): Likewise. (remove_described_reference): Likewise. (ipa_impossible_devirt_target): Likewise. (propagate_controlled_uses): Likewise. (ipa_print_node_params): Likewise. (ipcp_transform_function): Likewise. * ipa-pure-const.c (pure_const_read_summary): Likewise. (propagate_pure_const): Likewise. * ipa-reference.c (generate_summary): Likewise. (read_write_all_from_decl): Likewise. (propagate): Likewise. (ipa_reference_read_optimization_summary): Likewise. * ipa-utils.c (ipa_merge_profiles): Likewise. * ipa.c (walk_polymorphic_call_targets): Likewise. (symbol_table::remove_unreachable_nodes): Likewise. (ipa_single_use): Likewise. * passes.c (execute_todo): Likewise. * predict.c (drop_profile): Likewise. * symtab.c (symtab_node::get_dump_name): New function. (symtab_node::dump_name): Likewise. (symtab_node::dump_asm_name): Likewise. (symtab_node::dump_references): Likewise. (symtab_node::dump_referring): Likewise. (symtab_node::dump_base): Likewise. (symtab_node::debug_symtab): Likewise. * tree-sra.c (convert_callers_for_node): Likewise. * tree-ssa-structalias.c (ipa_pta_execute): Likewise. * value-prof.c (init_node_map): Likewise. 2017-05-23 Martin Liska <mliska@suse.cz> * lto-symtab.c (lto_cgraph_replace_node): Use symtab_node::dump_{asm_,}name functions. * lto.c (read_cgraph_and_symbols): Likewise. (do_whole_program_analysis): Likewise. From-SVN: r248369
Diffstat (limited to 'gcc/ipa-cp.c')
-rw-r--r--gcc/ipa-cp.c51
1 files changed, 21 insertions, 30 deletions
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index f35e515..f5e023e74 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -539,8 +539,7 @@ print_all_lattices (FILE * f, bool dump_sources, bool dump_benefits)
struct ipa_node_params *info;
info = IPA_NODE_REF (node);
- fprintf (f, " Node: %s/%i:\n", node->name (),
- node->order);
+ fprintf (f, " Node: %s:\n", node->dump_name ());
count = ipa_get_param_count (info);
for (i = 0; i < count; i++)
{
@@ -622,8 +621,8 @@ determine_versionability (struct cgraph_node *node,
}
if (reason && dump_file && !node->alias && !node->thunk.thunk_p)
- fprintf (dump_file, "Function %s/%i is not versionable, reason: %s.\n",
- node->name (), node->order, reason);
+ fprintf (dump_file, "Function %s is not versionable, reason: %s.\n",
+ node->dump_name (), reason);
info->versionable = (reason == NULL);
}
@@ -1195,9 +1194,8 @@ initialize_node_lattices (struct cgraph_node *node)
}
if (dump_file && (dump_flags & TDF_DETAILS)
&& !node->alias && !node->thunk.thunk_p)
- fprintf (dump_file, "Marking all lattices of %s/%i as %s\n",
- node->name (), node->order,
- disable ? "BOTTOM" : "VARIABLE");
+ fprintf (dump_file, "Marking all lattices of %s as %s\n",
+ node->dump_name (), disable ? "BOTTOM" : "VARIABLE");
}
for (ie = node->indirect_calls; ie; ie = ie->next_callee)
@@ -2842,8 +2840,7 @@ estimate_local_effects (struct cgraph_node *node)
return;
if (dump_file && (dump_flags & TDF_DETAILS))
- fprintf (dump_file, "\nEstimating effects for %s/%i.\n",
- node->name (), node->order);
+ fprintf (dump_file, "\nEstimating effects for %s.\n", node->dump_name ());
always_const = gather_context_independent_values (info, &known_csts,
&known_contexts, &known_aggs,
@@ -3656,10 +3653,10 @@ update_profiling_info (struct cgraph_node *orig_node,
if (orig_node_count < orig_sum + new_sum)
{
if (dump_file)
- fprintf (dump_file, " Problem: node %s/%i has too low count "
+ fprintf (dump_file, " Problem: node %s has too low count "
HOST_WIDE_INT_PRINT_DEC " while the sum of incoming "
"counts is " HOST_WIDE_INT_PRINT_DEC "\n",
- orig_node->name (), orig_node->order,
+ orig_node->dump_name (),
(HOST_WIDE_INT) orig_node_count,
(HOST_WIDE_INT) (orig_sum + new_sum));
@@ -3798,8 +3795,7 @@ create_specialized_node (struct cgraph_node *node,
if (dump_file && (dump_flags & TDF_DETAILS))
{
- fprintf (dump_file, " the new node is %s/%i.\n",
- new_node->name (), new_node->order);
+ fprintf (dump_file, " the new node is %s.\n", new_node->dump_name ());
if (known_contexts.exists ())
{
for (i = 0; i < count; i++)
@@ -4439,12 +4435,9 @@ perhaps_add_new_callers (cgraph_node *node, ipcp_value<valtype> *val)
&& cgraph_edge_brings_all_agg_vals_for_node (cs, val->spec_node))
{
if (dump_file)
- fprintf (dump_file, " - adding an extra caller %s/%i"
- " of %s/%i\n",
- xstrdup_for_dump (cs->caller->name ()),
- cs->caller->order,
- xstrdup_for_dump (val->spec_node->name ()),
- val->spec_node->order);
+ fprintf (dump_file, " - adding an extra caller %s of %s\n",
+ cs->caller->dump_name (),
+ val->spec_node->dump_name ());
cs->redirect_callee_duplicating_thunks (val->spec_node);
val->spec_node->expand_all_artificial_thunks ();
@@ -4600,8 +4593,8 @@ decide_about_value (struct cgraph_node *node, int index, HOST_WIDE_INT offset,
return false;
if (dump_file)
- fprintf (dump_file, " Creating a specialized node of %s/%i.\n",
- node->name (), node->order);
+ fprintf (dump_file, " Creating a specialized node of %s.\n",
+ node->dump_name ());
callers = gather_edges_for_value (val, node, caller_count);
if (offset == -1)
@@ -4642,8 +4635,8 @@ decide_whether_version_node (struct cgraph_node *node)
return false;
if (dump_file && (dump_flags & TDF_DETAILS))
- fprintf (dump_file, "\nEvaluating opportunities for %s/%i.\n",
- node->name (), node->order);
+ fprintf (dump_file, "\nEvaluating opportunities for %s.\n",
+ node->dump_name ());
gather_context_independent_values (info, &known_csts, &known_contexts,
info->do_clone_for_all_contexts ? &known_aggs
@@ -4697,9 +4690,8 @@ decide_whether_version_node (struct cgraph_node *node)
vec<cgraph_edge *> callers;
if (dump_file)
- fprintf (dump_file, " - Creating a specialized node of %s/%i "
- "for all known contexts.\n", node->name (),
- node->order);
+ fprintf (dump_file, " - Creating a specialized node of %s "
+ "for all known contexts.\n", node->dump_name ());
callers = node->collect_callers ();
@@ -4794,8 +4786,7 @@ identify_dead_nodes (struct cgraph_node *node)
{
for (v = node; v; v = ((struct ipa_dfs_info *) v->aux)->next_cycle)
if (IPA_NODE_REF (v)->node_dead)
- fprintf (dump_file, " Marking node as dead: %s/%i.\n",
- v->name (), v->order);
+ fprintf (dump_file, " Marking node as dead: %s.\n", v->dump_name ());
}
}
@@ -4892,8 +4883,8 @@ ipcp_store_bits_results (void)
continue;
if (!dumped_sth)
{
- fprintf (dump_file, "Propagated bits info for function %s/%i:\n",
- node->name (), node->order);
+ fprintf (dump_file, "Propagated bits info for function %s:\n",
+ node->dump_name ());
dumped_sth = true;
}
fprintf (dump_file, " param %i: value = ", i);