From 3629ff8ad6b73b35f4168df465f47f5a302691e2 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Wed, 8 Jan 2020 16:30:24 +0100 Subject: [PATCH] Use cgraph_node::dump_{asm_},name where possible. 2020-01-08 Martin Liska * cgraph.c (cgraph_node::dump): Use ::dump_name or ::dump_asm_name instead of (::name or ::asm_name). * cgraphclones.c (symbol_table::materialize_all_clones): Likewise. * cgraphunit.c (walk_polymorphic_call_targets): Likewise. (analyze_functions): Likewise. (expand_all_functions): Likewise. * ipa-cp.c (ipcp_cloning_candidate_p): Likewise. (propagate_bits_across_jump_function): Likewise. (dump_profile_updates): Likewise. (ipcp_store_bits_results): Likewise. (ipcp_store_vr_results): Likewise. * ipa-devirt.c (dump_targets): Likewise. * ipa-fnsummary.c (analyze_function_body): Likewise. * ipa-hsa.c (check_warn_node_versionable): Likewise. (process_hsa_functions): Likewise. * ipa-icf.c (sem_item_optimizer::merge_classes): Likewise. (set_alias_uids): Likewise. * ipa-inline-transform.c (save_inline_function_body): Likewise. * ipa-inline.c (recursive_inlining): Likewise. (inline_to_all_callers_1): Likewise. (ipa_inline): Likewise. * ipa-profile.c (ipa_propagate_frequency_1): Likewise. (ipa_propagate_frequency): Likewise. * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise. (remove_described_reference): Likewise. * ipa-pure-const.c (worse_state): Likewise. (check_retval_uses): Likewise. (analyze_function): Likewise. (propagate_pure_const): Likewise. (propagate_nothrow): Likewise. (dump_malloc_lattice): Likewise. (propagate_malloc): Likewise. (pass_local_pure_const::execute): Likewise. * ipa-visibility.c (optimize_weakref): Likewise. (function_and_variable_visibility): Likewise. * ipa.c (symbol_table::remove_unreachable_nodes): Likewise. (ipa_discover_variable_flags): Likewise. * lto-streamer-out.c (output_function): Likewise. (output_constructor): Likewise. * tree-inline.c (copy_bb): Likewise. * tree-ssa-structalias.c (ipa_pta_execute): Likewise. * varpool.c (symbol_table::remove_unreferenced_decls): Likewise. 2020-01-08 Martin Liska * lto-partition.c (add_symbol_to_partition_1): Use ::dump_name or ::dump_asm_name instead of (::name or ::asm_name). (lto_balanced_map): Likewise. (promote_symbol): Likewise. (rename_statics): Likewise. * lto.c (lto_wpa_write_files): Likewise. 2020-01-08 Martin Liska * gcc.dg/ipa/ipa-icf-1.c: Update expected scanned output. * gcc.dg/ipa/ipa-icf-10.c: Likewise. * gcc.dg/ipa/ipa-icf-11.c: Likewise. * gcc.dg/ipa/ipa-icf-12.c: Likewise. * gcc.dg/ipa/ipa-icf-13.c: Likewise. * gcc.dg/ipa/ipa-icf-16.c: Likewise. * gcc.dg/ipa/ipa-icf-18.c: Likewise. * gcc.dg/ipa/ipa-icf-2.c: Likewise. * gcc.dg/ipa/ipa-icf-20.c: Likewise. * gcc.dg/ipa/ipa-icf-21.c: Likewise. * gcc.dg/ipa/ipa-icf-23.c: Likewise. * gcc.dg/ipa/ipa-icf-25.c: Likewise. * gcc.dg/ipa/ipa-icf-26.c: Likewise. * gcc.dg/ipa/ipa-icf-27.c: Likewise. * gcc.dg/ipa/ipa-icf-3.c: Likewise. * gcc.dg/ipa/ipa-icf-35.c: Likewise. * gcc.dg/ipa/ipa-icf-36.c: Likewise. * gcc.dg/ipa/ipa-icf-37.c: Likewise. * gcc.dg/ipa/ipa-icf-38.c: Likewise. * gcc.dg/ipa/ipa-icf-5.c: Likewise. * gcc.dg/ipa/ipa-icf-7.c: Likewise. * gcc.dg/ipa/ipa-icf-8.c: Likewise. * gcc.dg/ipa/ipa-icf-merge-1.c: Likewise. * gcc.dg/ipa/pr64307.c: Likewise. * gcc.dg/ipa/pr90555.c: Likewise. * gcc.dg/ipa/propmalloc-1.c: Likewise. * gcc.dg/ipa/propmalloc-2.c: Likewise. * gcc.dg/ipa/propmalloc-3.c: Likewise. From-SVN: r280009 --- gcc/ChangeLog | 45 ++++++++++++++++++++++ gcc/cgraph.c | 2 +- gcc/cgraphclones.c | 3 +- gcc/cgraphunit.c | 9 +++-- gcc/ipa-cp.c | 22 +++++------ gcc/ipa-devirt.c | 3 +- gcc/ipa-fnsummary.c | 2 +- gcc/ipa-hsa.c | 10 ++--- gcc/ipa-icf.c | 10 ++--- gcc/ipa-inline-transform.c | 2 +- gcc/ipa-inline.c | 11 +++--- gcc/ipa-profile.c | 18 ++++----- gcc/ipa-prop.c | 4 +- gcc/ipa-pure-const.c | 24 ++++++------ gcc/ipa-visibility.c | 8 ++-- gcc/ipa.c | 11 +++--- gcc/lto-streamer-out.c | 8 ++-- gcc/lto/ChangeLog | 9 +++++ gcc/lto/lto-partition.c | 10 ++--- gcc/lto/lto.c | 4 +- gcc/testsuite/ChangeLog | 31 +++++++++++++++ gcc/testsuite/gcc.dg/ipa/ipa-icf-1.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-10.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-11.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-12.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-13.c | 6 +-- gcc/testsuite/gcc.dg/ipa/ipa-icf-16.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-18.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-2.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-20.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-21.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-23.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-25.c | 4 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-26.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-27.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-3.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-35.c | 6 +-- gcc/testsuite/gcc.dg/ipa/ipa-icf-36.c | 10 ++--- gcc/testsuite/gcc.dg/ipa/ipa-icf-37.c | 10 ++--- gcc/testsuite/gcc.dg/ipa/ipa-icf-38.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-5.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-7.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-8.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-merge-1.c | 2 +- gcc/testsuite/gcc.dg/ipa/pr64307.c | 2 +- gcc/testsuite/gcc.dg/ipa/pr90555.c | 2 +- gcc/testsuite/gcc.dg/ipa/propmalloc-1.c | 4 +- gcc/testsuite/gcc.dg/ipa/propmalloc-2.c | 4 +- gcc/testsuite/gcc.dg/ipa/propmalloc-3.c | 4 +- gcc/tree-inline.c | 2 +- gcc/tree-ssa-structalias.c | 5 ++- gcc/varpool.c | 4 +- 52 files changed, 215 insertions(+), 130 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b733b56059e..f960eb4be68 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,48 @@ +2020-01-08 Martin Liska + + * cgraph.c (cgraph_node::dump): Use ::dump_name or + ::dump_asm_name instead of (::name or ::asm_name). + * cgraphclones.c (symbol_table::materialize_all_clones): Likewise. + * cgraphunit.c (walk_polymorphic_call_targets): Likewise. + (analyze_functions): Likewise. + (expand_all_functions): Likewise. + * ipa-cp.c (ipcp_cloning_candidate_p): Likewise. + (propagate_bits_across_jump_function): Likewise. + (dump_profile_updates): Likewise. + (ipcp_store_bits_results): Likewise. + (ipcp_store_vr_results): Likewise. + * ipa-devirt.c (dump_targets): Likewise. + * ipa-fnsummary.c (analyze_function_body): Likewise. + * ipa-hsa.c (check_warn_node_versionable): Likewise. + (process_hsa_functions): Likewise. + * ipa-icf.c (sem_item_optimizer::merge_classes): Likewise. + (set_alias_uids): Likewise. + * ipa-inline-transform.c (save_inline_function_body): Likewise. + * ipa-inline.c (recursive_inlining): Likewise. + (inline_to_all_callers_1): Likewise. + (ipa_inline): Likewise. + * ipa-profile.c (ipa_propagate_frequency_1): Likewise. + (ipa_propagate_frequency): Likewise. + * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise. + (remove_described_reference): Likewise. + * ipa-pure-const.c (worse_state): Likewise. + (check_retval_uses): Likewise. + (analyze_function): Likewise. + (propagate_pure_const): Likewise. + (propagate_nothrow): Likewise. + (dump_malloc_lattice): Likewise. + (propagate_malloc): Likewise. + (pass_local_pure_const::execute): Likewise. + * ipa-visibility.c (optimize_weakref): Likewise. + (function_and_variable_visibility): Likewise. + * ipa.c (symbol_table::remove_unreachable_nodes): Likewise. + (ipa_discover_variable_flags): Likewise. + * lto-streamer-out.c (output_function): Likewise. + (output_constructor): Likewise. + * tree-inline.c (copy_bb): Likewise. + * tree-ssa-structalias.c (ipa_pta_execute): Likewise. + * varpool.c (symbol_table::remove_unreferenced_decls): Likewise. + 2020-01-08 Richard Biener PR middle-end/93199 diff --git a/gcc/cgraph.c b/gcc/cgraph.c index aa2c476842a..bd9e5a17288 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -1948,7 +1948,7 @@ cgraph_node::dump (FILE *f) if (tp_first_run > 0) fprintf (f, " first_run:%" PRId64, (int64_t) tp_first_run); if (origin) - fprintf (f, " nested in:%s", origin->asm_name ()); + fprintf (f, " nested in:%s", origin->dump_asm_name ()); if (gimple_has_body_p (decl)) fprintf (f, " body"); if (process) diff --git a/gcc/cgraphclones.c b/gcc/cgraphclones.c index bd44063a1ac..789564ba335 100644 --- a/gcc/cgraphclones.c +++ b/gcc/cgraphclones.c @@ -1148,8 +1148,7 @@ symbol_table::materialize_all_clones (void) if (symtab->dump_file) { fprintf (symtab->dump_file, "cloning %s to %s\n", - xstrdup_for_dump (node->clone_of->name ()), - xstrdup_for_dump (node->name ())); + node->clone_of->dump_name (), node->name ()); if (node->clone.tree_map) { unsigned int i; diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 6201444694c..c4ddc61c4d6 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -1020,7 +1020,8 @@ walk_polymorphic_call_targets (hash_set *reachable_call_targets, { dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, edge->call_stmt, "devirtualizing call in %s to %s\n", - edge->caller->name (), target->name ()); + edge->caller->dump_name (), + target->dump_name ()); } edge->make_direct (target); @@ -1167,7 +1168,7 @@ analyze_functions (bool first_time) fprintf (symtab->dump_file, "Trivially needed symbols:"); changed = true; if (symtab->dump_file) - fprintf (symtab->dump_file, " %s", node->asm_name ()); + fprintf (symtab->dump_file, " %s", node->dump_asm_name ()); if (!changed && symtab->dump_file) fprintf (symtab->dump_file, "\n"); } @@ -1324,7 +1325,7 @@ analyze_functions (bool first_time) if (!node->aux && !node->referred_to_p ()) { if (symtab->dump_file) - fprintf (symtab->dump_file, " %s", node->name ()); + fprintf (symtab->dump_file, " %s", node->dump_name ()); /* See if the debugger can use anything before the DECL passes away. Perhaps it can notice a DECL that is now a @@ -2436,7 +2437,7 @@ expand_all_functions (void) if (symtab->dump_file) fprintf (symtab->dump_file, "Time profile order in expand_all_functions:%s:%d\n", - node->asm_name (), node->tp_first_run); + node->dump_asm_name (), node->tp_first_run); node->process = 0; node->expand (); } diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c index 11631986293..7515a9504f6 100644 --- a/gcc/ipa-cp.c +++ b/gcc/ipa-cp.c @@ -717,7 +717,7 @@ ipcp_cloning_candidate_p (struct cgraph_node *node) if (dump_file) fprintf (dump_file, "Not considering %s for cloning; " "-fipa-cp-clone disabled.\n", - node->name ()); + node->dump_name ()); return false; } @@ -726,7 +726,7 @@ ipcp_cloning_candidate_p (struct cgraph_node *node) if (dump_file) fprintf (dump_file, "Not considering %s for cloning; " "optimizing it for size.\n", - node->name ()); + node->dump_name ()); return false; } @@ -737,7 +737,7 @@ ipcp_cloning_candidate_p (struct cgraph_node *node) { if (dump_file) fprintf (dump_file, "Considering %s for cloning; code might shrink.\n", - node->name ()); + node->dump_name ()); return true; } @@ -751,7 +751,7 @@ ipcp_cloning_candidate_p (struct cgraph_node *node) if (dump_file) fprintf (dump_file, "Considering %s for cloning; " "usually called directly.\n", - node->name ()); + node->dump_name ()); return true; } } @@ -759,12 +759,12 @@ ipcp_cloning_candidate_p (struct cgraph_node *node) { if (dump_file) fprintf (dump_file, "Not considering %s for cloning; no hot calls.\n", - node->name ()); + node->dump_name ()); return false; } if (dump_file) fprintf (dump_file, "Considering %s for cloning.\n", - node->name ()); + node->dump_name ()); return true; } @@ -2292,7 +2292,7 @@ propagate_bits_across_jump_function (cgraph_edge *cs, int idx, if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, "Setting dest_lattice to bottom, because type of " "param %i of %s is NULL or unsuitable for bits propagation\n", - idx, cs->callee->name ()); + idx, cs->callee->dump_name ()); return dest_lattice->set_to_bottom (); } @@ -4246,7 +4246,7 @@ dump_profile_updates (struct cgraph_node *orig_node, for (cs = new_node->callees; cs; cs = cs->next_callee) { fprintf (dump_file, " edge to %s has count ", - cs->callee->name ()); + cs->callee->dump_name ()); cs->count.dump (dump_file); fprintf (dump_file, "\n"); } @@ -4257,7 +4257,7 @@ dump_profile_updates (struct cgraph_node *orig_node, for (cs = orig_node->callees; cs; cs = cs->next_callee) { fprintf (dump_file, " edge to %s is left with ", - cs->callee->name ()); + cs->callee->dump_name ()); cs->count.dump (dump_file); fprintf (dump_file, "\n"); } @@ -5675,7 +5675,7 @@ ipcp_store_bits_results (void) if (dump_file) fprintf (dump_file, "Not considering %s for ipa bitwise propagation " "; -fipa-bit-cp: disabled.\n", - node->name ()); + node->dump_name ()); continue; } @@ -5751,7 +5751,7 @@ ipcp_store_vr_results (void) if (dump_file) fprintf (dump_file, "Not considering %s for VR discovery " "and propagate; -fipa-ipa-vrp: disabled.\n", - node->name ()); + node->dump_name ()); continue; } diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c index 21832cbfc97..b888186134c 100644 --- a/gcc/ipa-devirt.c +++ b/gcc/ipa-devirt.c @@ -3350,8 +3350,7 @@ dump_targets (FILE *f, vec targets, bool verbose) char *name = NULL; if (in_lto_p) name = cplus_demangle_v3 (targets[i]->asm_name (), 0); - fprintf (f, " %s/%i", name ? name : targets[i]->name (), - targets[i]->order); + fprintf (f, " %s", name ? name : targets[i]->dump_name ()); if (in_lto_p) free (name); if (!targets[i]->definition) diff --git a/gcc/ipa-fnsummary.c b/gcc/ipa-fnsummary.c index 7c0b6f98e25..ce2c251693d 100644 --- a/gcc/ipa-fnsummary.c +++ b/gcc/ipa-fnsummary.c @@ -2460,7 +2460,7 @@ analyze_function_body (struct cgraph_node *node, bool early) if (dump_file) fprintf (dump_file, "\nAnalyzing function body size: %s\n", - node->name ()); + node->dump_name ()); /* When we run into maximal number of entries, we assign everything to the constant truth case. Be sure to have it in list. */ diff --git a/gcc/ipa-hsa.c b/gcc/ipa-hsa.c index 7ecb13299ae..f2980ba3688 100644 --- a/gcc/ipa-hsa.c +++ b/gcc/ipa-hsa.c @@ -56,7 +56,7 @@ check_warn_node_versionable (cgraph_node *node) { warning_at (EXPR_LOCATION (node->decl), OPT_Whsa, "could not emit HSAIL for function %s: function cannot be " - "cloned", node->name ()); + "cloned", node->dump_name ()); return false; } return true; @@ -98,7 +98,7 @@ process_hsa_functions (void) if (dump_file) fprintf (dump_file, "Created a new HSA clone: %s, type: %s\n", - clone->name (), + clone->dump_name (), s->m_kind == HSA_KERNEL ? "kernel" : "function"); } else if (hsa_callable_function_p (node->decl) @@ -120,7 +120,7 @@ process_hsa_functions (void) if (dump_file) fprintf (dump_file, "Created a new HSA function clone: %s\n", - clone->name ()); + clone->dump_name ()); } } @@ -141,8 +141,8 @@ process_hsa_functions (void) if (dump_file) fprintf (dump_file, "Redirecting edge to HSA function: %s->%s\n", - xstrdup_for_dump (e->caller->name ()), - xstrdup_for_dump (e->callee->name ())); + e->caller->dump_name (), + e->callee->dump_name ()); } } diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c index 2f9fd06ee55..17a0ed9760b 100644 --- a/gcc/ipa-icf.c +++ b/gcc/ipa-icf.c @@ -3322,12 +3322,12 @@ sem_item_optimizer::merge_classes (unsigned int prev_class_count, { dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, loc, "Semantic equality hit:%s->%s\n", - xstrdup_for_dump (source->node->name ()), - xstrdup_for_dump (alias->node->name ())); + source->node->dump_name (), + alias->node->dump_name ()); dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, loc, "Assembler symbol names:%s->%s\n", - xstrdup_for_dump (source->node->asm_name ()), - xstrdup_for_dump (alias->node->asm_name ())); + source->node->dump_asm_name (), + alias->node->dump_asm_name ()); } if (lookup_attribute ("no_icf", DECL_ATTRIBUTES (alias->decl))) @@ -3390,7 +3390,7 @@ set_alias_uids (symtab_node *n, int uid) { if (dump_file) fprintf (dump_file, " Setting points-to UID of [%s] as %d\n", - xstrdup_for_dump (ref->referring->asm_name ()), uid); + ref->referring->dump_asm_name (), uid); SET_DECL_PT_UID (ref->referring->decl, uid); set_alias_uids (ref->referring, uid); diff --git a/gcc/ipa-inline-transform.c b/gcc/ipa-inline-transform.c index c53cd423b75..1fe5a5c1c5a 100644 --- a/gcc/ipa-inline-transform.c +++ b/gcc/ipa-inline-transform.c @@ -553,7 +553,7 @@ save_inline_function_body (struct cgraph_node *node) if (dump_file) fprintf (dump_file, "\nSaving body of %s for later reuse\n", - node->name ()); + node->dump_name ()); gcc_assert (node == cgraph_node::get (node->decl)); diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index 3b68fc47d01..2a3f31e03a2 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -1611,8 +1611,7 @@ recursive_inlining (struct cgraph_edge *edge, if (dump_file) fprintf (dump_file, - " Performing recursive inlining on %s\n", - node->name ()); + " Performing recursive inlining on %s\n", node->dump_name ()); /* Do the inlining and update list of recursive call during process. */ while (!heap.empty ()) @@ -2396,11 +2395,11 @@ inline_to_all_callers_1 (struct cgraph_node *node, void *data, cgraph_node *ultimate = node->ultimate_alias_target (); fprintf (dump_file, "\nInlining %s size %i.\n", - ultimate->name (), + ultimate->dump_name (), ipa_size_summaries->get (ultimate)->size); fprintf (dump_file, " Called once from %s %i insns.\n", - node->callers->caller->name (), + node->callers->caller->dump_name (), ipa_size_summaries->get (node->callers->caller)->size); } @@ -2411,7 +2410,7 @@ inline_to_all_callers_1 (struct cgraph_node *node, void *data, if (dump_file) fprintf (dump_file, " Inlined into %s which now has %i size\n", - caller->name (), + caller->dump_name (), ipa_size_summaries->get (caller)->size); if (!(*num_calls)--) { @@ -2671,7 +2670,7 @@ ipa_inline (void) try to flatten itself turning it into a self-recursive function. */ if (dump_file) - fprintf (dump_file, "Flattening %s\n", node->name ()); + fprintf (dump_file, "Flattening %s\n", node->dump_name ()); flatten_function (node, false, true); } diff --git a/gcc/ipa-profile.c b/gcc/ipa-profile.c index b2b272e3365..017f63e80a3 100644 --- a/gcc/ipa-profile.c +++ b/gcc/ipa-profile.c @@ -340,7 +340,7 @@ ipa_propagate_frequency_1 (struct cgraph_node *node, void *data) { if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, " Called by %s that is executed once\n", - edge->caller->name ()); + edge->caller->dump_name ()); d->maybe_unlikely_executed = false; ipa_call_summary *s = ipa_call_summaries->get (edge); if (s != NULL && s->loop_depth) @@ -355,7 +355,7 @@ ipa_propagate_frequency_1 (struct cgraph_node *node, void *data) case NODE_FREQUENCY_NORMAL: if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, " Called by %s that is normal or hot\n", - edge->caller->name ()); + edge->caller->dump_name ()); d->maybe_unlikely_executed = false; d->maybe_executed_once = false; break; @@ -399,7 +399,7 @@ ipa_propagate_frequency (struct cgraph_node *node) return false; gcc_assert (node->analyzed); if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, "Processing frequency %s\n", node->name ()); + fprintf (dump_file, "Processing frequency %s\n", node->dump_name ()); node->call_for_symbol_and_aliases (ipa_propagate_frequency_1, &d, true); @@ -410,7 +410,7 @@ ipa_propagate_frequency (struct cgraph_node *node) node->only_called_at_startup = true; if (dump_file) fprintf (dump_file, "Node %s promoted to only called at startup.\n", - node->name ()); + node->dump_name ()); changed = true; } if ((d.only_called_at_exit && !d.only_called_at_startup) @@ -419,7 +419,7 @@ ipa_propagate_frequency (struct cgraph_node *node) node->only_called_at_exit = true; if (dump_file) fprintf (dump_file, "Node %s promoted to only called at exit.\n", - node->name ()); + node->dump_name ()); changed = true; } @@ -438,7 +438,7 @@ ipa_propagate_frequency (struct cgraph_node *node) { if (dump_file) fprintf (dump_file, "Node %s promoted to hot.\n", - node->name ()); + node->dump_name ()); node->frequency = NODE_FREQUENCY_HOT; return true; } @@ -448,7 +448,7 @@ ipa_propagate_frequency (struct cgraph_node *node) { if (dump_file) fprintf (dump_file, "Node %s reduced to normal.\n", - node->name ()); + node->dump_name ()); node->frequency = NODE_FREQUENCY_NORMAL; changed = true; } @@ -462,7 +462,7 @@ ipa_propagate_frequency (struct cgraph_node *node) node->frequency = NODE_FREQUENCY_UNLIKELY_EXECUTED; if (dump_file) fprintf (dump_file, "Node %s promoted to unlikely executed.\n", - node->name ()); + node->dump_name ()); changed = true; } else if (d.maybe_executed_once && node->frequency != NODE_FREQUENCY_EXECUTED_ONCE) @@ -470,7 +470,7 @@ ipa_propagate_frequency (struct cgraph_node *node) node->frequency = NODE_FREQUENCY_EXECUTED_ONCE; if (dump_file) fprintf (dump_file, "Node %s promoted to executed once.\n", - node->name ()); + node->dump_name ()); changed = true; } return changed; diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index 035730d180d..a6e32a50377 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -3294,7 +3294,7 @@ ipa_make_edge_direct_to_target (struct cgraph_edge *ie, tree target, { dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, ie->call_stmt, "converting indirect call in %s to direct call to %s\n", - ie->caller->name (), callee->name ()); + ie->caller->dump_name (), callee->dump_name ()); } if (!speculative) { @@ -3489,7 +3489,7 @@ remove_described_reference (symtab_node *symbol, struct ipa_cst_ref_desc *rdesc) to_del->remove_reference (); if (dump_file) fprintf (dump_file, "ipa-prop: Removed a reference from %s to %s.\n", - origin->caller->dump_name (), xstrdup_for_dump (symbol->name ())); + origin->caller->dump_name (), symbol->dump_name ()); return true; } diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c index 4c3dcf3c64c..ccd0918c120 100644 --- a/gcc/ipa-pure-const.c +++ b/gcc/ipa-pure-const.c @@ -500,7 +500,7 @@ worse_state (enum pure_const_state_e *state, bool *looping, { if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, "Dropping state to PURE because call to %s may not " - "bind to current def.\n", to->name ()); + "bind to current def.\n", to->dump_name ()); state2 = IPA_PURE; } *state = MAX (*state, state2); @@ -874,7 +874,7 @@ check_retval_uses (tree retval, gimple *stmt) { \ if (dump_file && (dump_flags & TDF_DETAILS)) \ fprintf (dump_file, "\n%s is not a malloc candidate, reason: %s\n", \ - (node->name()), (reason)); \ + (node->dump_name ()), (reason)); \ return false; \ } @@ -1037,7 +1037,7 @@ analyze_function (struct cgraph_node *fn, bool ipa) if (dump_file) { fprintf (dump_file, "\n\n local analysis of %s\n ", - fn->name ()); + fn->dump_name ()); } push_cfun (DECL_STRUCT_FUNCTION (decl)); @@ -1657,7 +1657,7 @@ propagate_pure_const (void) w->nonfreeing_fn = !can_free; if (!can_free && dump_file) fprintf (dump_file, "Function found not to call free: %s\n", - w->name ()); + w->dump_name ()); if (w_l->state_previously_known != IPA_NEITHER && this_state > w_l->state_previously_known) @@ -1688,7 +1688,7 @@ propagate_pure_const (void) if (dump_file) fprintf (dump_file, "Function found to be %sconst: %s\n", this_looping ? "looping " : "", - w->name ()); + w->dump_name ()); } /* Turning constructor or destructor to non-looping const/pure enables us to possibly remove the function completely. */ @@ -1703,7 +1703,7 @@ propagate_pure_const (void) fprintf (dump_file, "Declaration updated to be %sconst: %s\n", this_looping ? "looping " : "", - w->name ()); + w->dump_name ()); remove_p |= has_cdtor; } break; @@ -1715,7 +1715,7 @@ propagate_pure_const (void) if (dump_file) fprintf (dump_file, "Function found to be %spure: %s\n", this_looping ? "looping " : "", - w->name ()); + w->dump_name ()); } if (this_looping) has_cdtor = false; @@ -1728,7 +1728,7 @@ propagate_pure_const (void) fprintf (dump_file, "Declaration updated to be %spure: %s\n", this_looping ? "looping " : "", - w->name ()); + w->dump_name ()); remove_p |= has_cdtor; } break; @@ -1844,7 +1844,7 @@ propagate_nothrow (void) w->set_nothrow_flag (true); if (dump_file) fprintf (dump_file, "Function found to be nothrow: %s\n", - w->name ()); + w->dump_name ()); } } else if (can_throw && !TREE_NOTHROW (w->decl)) @@ -1873,7 +1873,7 @@ dump_malloc_lattice (FILE *dump_file, const char *s) { funct_state fs = funct_state_summaries->get (node); if (fs) - fprintf (dump_file, "%s: %s\n", node->name (), + fprintf (dump_file, "%s: %s\n", node->dump_name (), malloc_state_names[fs->malloc_state]); } } @@ -1970,7 +1970,7 @@ propagate_malloc (void) { if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, "Function %s found to be malloc\n", - node->name ()); + node->dump_name ()); bool malloc_decl_p = DECL_IS_MALLOC (node->decl); node->set_malloc_flag (true); @@ -2199,7 +2199,7 @@ pass_local_pure_const::execute (function *fun) changed = true; if (dump_file) fprintf (dump_file, "Function found to be malloc: %s\n", - node->name ()); + node->dump_name ()); } free (l); diff --git a/gcc/ipa-visibility.c b/gcc/ipa-visibility.c index 67d500b759b..a09282d4825 100644 --- a/gcc/ipa-visibility.c +++ b/gcc/ipa-visibility.c @@ -509,7 +509,7 @@ optimize_weakref (symtab_node *node) if (dump_file) fprintf (dump_file, "Optimizing weakref %s %s\n", - node->name(), + node->dump_name (), static_alias ? "as static alias" : "as transparent alias"); if (static_alias) @@ -876,17 +876,17 @@ function_and_variable_visibility (bool whole_program) fprintf (dump_file, "\nMarking local functions:"); FOR_EACH_DEFINED_FUNCTION (node) if (node->local) - fprintf (dump_file, " %s", node->name ()); + fprintf (dump_file, " %s", node->dump_name ()); fprintf (dump_file, "\n\n"); fprintf (dump_file, "\nMarking externally visible functions:"); FOR_EACH_DEFINED_FUNCTION (node) if (node->externally_visible) - fprintf (dump_file, " %s", node->name ()); + fprintf (dump_file, " %s", node->dump_name ()); fprintf (dump_file, "\n\n"); fprintf (dump_file, "\nMarking externally visible variables:"); FOR_EACH_DEFINED_VARIABLE (vnode) if (vnode->externally_visible) - fprintf (dump_file, " %s", vnode->name ()); + fprintf (dump_file, " %s", vnode->dump_name ()); fprintf (dump_file, "\n\n"); } symtab->function_flags_ready = true; diff --git a/gcc/ipa.c b/gcc/ipa.c index 6129633b303..6979c38377d 100644 --- a/gcc/ipa.c +++ b/gcc/ipa.c @@ -616,7 +616,7 @@ symbol_table::remove_unreachable_nodes (FILE *file) if (vnode->definition) { if (file) - fprintf (file, " %s", vnode->name ()); + fprintf (file, " %s", vnode->dump_name ()); changed = true; } /* Keep body if it may be useful for constant folding. */ @@ -649,7 +649,7 @@ symbol_table::remove_unreachable_nodes (FILE *file) (has_addr_references_p, NULL, true)) { if (file) - fprintf (file, " %s", node->name ()); + fprintf (file, " %s", node->dump_name ()); node->address_taken = false; changed = true; if (node->local_p () @@ -794,7 +794,8 @@ ipa_discover_variable_flags (void) if (!address_taken) { if (TREE_ADDRESSABLE (vnode->decl) && dump_file) - fprintf (dump_file, " %s (non-addressable)", vnode->name ()); + fprintf (dump_file, " %s (non-addressable)", + vnode->dump_name ()); vnode->call_for_symbol_and_aliases (clear_addressable_bit, NULL, true); } @@ -805,13 +806,13 @@ ipa_discover_variable_flags (void) && vnode->get_section () == NULL) { if (!TREE_READONLY (vnode->decl) && dump_file) - fprintf (dump_file, " %s (read-only)", vnode->name ()); + fprintf (dump_file, " %s (read-only)", vnode->dump_name ()); vnode->call_for_symbol_and_aliases (set_readonly_bit, NULL, true); } if (!vnode->writeonly && !read && !address_taken && written) { if (dump_file) - fprintf (dump_file, " %s (write-only)", vnode->name ()); + fprintf (dump_file, " %s (write-only)", vnode->dump_name ()); vnode->call_for_symbol_and_aliases (set_writeonly_bit, &remove_p, true); } diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c index a3306e01851..1faf31c0551 100644 --- a/gcc/lto-streamer-out.c +++ b/gcc/lto-streamer-out.c @@ -2137,7 +2137,7 @@ output_function (struct cgraph_node *node) if (streamer_dump_file) fprintf (streamer_dump_file, "\nStreaming body of %s\n", - node->name ()); + node->dump_name ()); function = node->decl; fn = DECL_STRUCT_FUNCTION (function); @@ -2211,7 +2211,7 @@ output_function (struct cgraph_node *node) destroy_output_block (ob); if (streamer_dump_file) fprintf (streamer_dump_file, "Finished streaming %s\n", - node->name ()); + node->dump_name ()); } /* Output the body of function NODE->DECL. */ @@ -2224,7 +2224,7 @@ output_constructor (struct varpool_node *node) if (streamer_dump_file) fprintf (streamer_dump_file, "\nStreaming constructor of %s\n", - node->name ()); + node->dump_name ()); timevar_push (TV_IPA_LTO_CTORS_OUT); ob = create_output_block (LTO_section_function_body); @@ -2245,7 +2245,7 @@ output_constructor (struct varpool_node *node) destroy_output_block (ob); if (streamer_dump_file) fprintf (streamer_dump_file, "Finished streaming %s\n", - node->name ()); + node->dump_name ()); timevar_pop (TV_IPA_LTO_CTORS_OUT); } diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 233ac37cd78..821a6fa9dc6 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,12 @@ +2020-01-08 Martin Liska + + * lto-partition.c (add_symbol_to_partition_1): Use ::dump_name or + ::dump_asm_name instead of (::name or ::asm_name). + (lto_balanced_map): Likewise. + (promote_symbol): Likewise. + (rename_statics): Likewise. + * lto.c (lto_wpa_write_files): Likewise. + 2020-01-08 Martin Liska * lto-partition.c (lto_balanced_map): Use symtab_node::dump_name. diff --git a/gcc/lto/lto-partition.c b/gcc/lto/lto-partition.c index 5b153c9759e..3a9990903c7 100644 --- a/gcc/lto/lto-partition.c +++ b/gcc/lto/lto-partition.c @@ -162,7 +162,7 @@ add_symbol_to_partition_1 (ltrans_partition part, symtab_node *node) if (dump_file) fprintf (dump_file, "Symbol node %s now used in multiple partitions\n", - node->name ()); + node->dump_name ()); } node->aux = (void *)((size_t)node->aux + 1); @@ -515,10 +515,10 @@ lto_balanced_map (int n_lto_partitions, int max_partition_size) { for (unsigned i = 0; i < order.length (); i++) fprintf (dump_file, "Balanced map symbol order:%s:%u\n", - order[i]->name (), order[i]->tp_first_run); + order[i]->dump_name (), order[i]->tp_first_run); for (unsigned i = 0; i < noreorder.length (); i++) fprintf (dump_file, "Balanced map symbol no_reorder:%s:%u\n", - noreorder[i]->name (), noreorder[i]->tp_first_run); + noreorder[i]->dump_name (), noreorder[i]->tp_first_run); } /* Collect all variables that should not be reordered. */ @@ -995,7 +995,7 @@ promote_symbol (symtab_node *node) DECL_VISIBILITY_SPECIFIED (node->decl) = true; if (dump_file) fprintf (dump_file, - "Promoting as hidden: %s (%s)\n", node->name (), + "Promoting as hidden: %s (%s)\n", node->dump_name (), IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (node->decl))); /* Promoting a symbol also promotes all transparent aliases with exception @@ -1079,7 +1079,7 @@ rename_statics (lto_symtab_encoder_t encoder, symtab_node *node) if (dump_file) fprintf (dump_file, - "Renaming statics with asm name: %s\n", node->name ()); + "Renaming statics with asm name: %s\n", node->dump_name ()); /* Assign every symbol in the set that shares the same ASM name an unique mangled name. */ diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index 350c9e52e30..39bb5f45c95 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -355,7 +355,7 @@ lto_wpa_write_files (void) lsei_next_in_partition (&lsei)) { symtab_node *node = lsei_node (lsei); - fprintf (symtab->dump_file, "%s ", node->asm_name ()); + fprintf (symtab->dump_file, "%s ", node->dump_asm_name ()); } fprintf (symtab->dump_file, "\n Symbols in boundary: "); for (lsei = lsei_start (part->encoder); !lsei_end_p (lsei); @@ -364,7 +364,7 @@ lto_wpa_write_files (void) symtab_node *node = lsei_node (lsei); if (!lto_symtab_encoder_in_partition_p (part->encoder, node)) { - fprintf (symtab->dump_file, "%s ", node->asm_name ()); + fprintf (symtab->dump_file, "%s ", node->dump_asm_name ()); cgraph_node *cnode = dyn_cast (node); if (cnode && lto_symtab_encoder_encode_body_p (part->encoder, diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b50476981f1..972bb6d155d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,34 @@ +2020-01-08 Martin Liska + + * gcc.dg/ipa/ipa-icf-1.c: Update expected scanned output. + * gcc.dg/ipa/ipa-icf-10.c: Likewise. + * gcc.dg/ipa/ipa-icf-11.c: Likewise. + * gcc.dg/ipa/ipa-icf-12.c: Likewise. + * gcc.dg/ipa/ipa-icf-13.c: Likewise. + * gcc.dg/ipa/ipa-icf-16.c: Likewise. + * gcc.dg/ipa/ipa-icf-18.c: Likewise. + * gcc.dg/ipa/ipa-icf-2.c: Likewise. + * gcc.dg/ipa/ipa-icf-20.c: Likewise. + * gcc.dg/ipa/ipa-icf-21.c: Likewise. + * gcc.dg/ipa/ipa-icf-23.c: Likewise. + * gcc.dg/ipa/ipa-icf-25.c: Likewise. + * gcc.dg/ipa/ipa-icf-26.c: Likewise. + * gcc.dg/ipa/ipa-icf-27.c: Likewise. + * gcc.dg/ipa/ipa-icf-3.c: Likewise. + * gcc.dg/ipa/ipa-icf-35.c: Likewise. + * gcc.dg/ipa/ipa-icf-36.c: Likewise. + * gcc.dg/ipa/ipa-icf-37.c: Likewise. + * gcc.dg/ipa/ipa-icf-38.c: Likewise. + * gcc.dg/ipa/ipa-icf-5.c: Likewise. + * gcc.dg/ipa/ipa-icf-7.c: Likewise. + * gcc.dg/ipa/ipa-icf-8.c: Likewise. + * gcc.dg/ipa/ipa-icf-merge-1.c: Likewise. + * gcc.dg/ipa/pr64307.c: Likewise. + * gcc.dg/ipa/pr90555.c: Likewise. + * gcc.dg/ipa/propmalloc-1.c: Likewise. + * gcc.dg/ipa/propmalloc-2.c: Likewise. + * gcc.dg/ipa/propmalloc-3.c: Likewise. + 2020-01-08 Richard Biener PR testsuite/92997 diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-1.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-1.c index 8cb9186238c..05f500e7a64 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-1.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-1.c @@ -56,5 +56,5 @@ int main(int argc, char **argv) return 0; } -/* { dg-final { scan-ipa-dump "Semantic equality hit:x1->x2" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:x1/\[0-9+\]+->x2/\[0-9+\]+" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-10.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-10.c index 8fdac3883ee..2383d1217f0 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-10.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-10.c @@ -29,5 +29,5 @@ int main(int argc, char **argv) return 0; } -/* { dg-final { scan-ipa-dump "Semantic equality hit:ferda->funkce" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:ferda/\[0-9+\]+->funkce/\[0-9+\]+" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-11.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-11.c index dbc0cbe7b61..36ba88070b7 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-11.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-11.c @@ -24,5 +24,5 @@ int main(int argc, char **argv) return f0(argc) * f1(argc); } -/* { dg-final { scan-ipa-dump "Semantic equality hit:f0->f1" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:f0/\[0-9+\]+->f1/\[0-9+\]+" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-12.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-12.c index 7ed75f8bfd9..015384fbd20 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-12.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-12.c @@ -73,5 +73,5 @@ int main(int argc, char **argv) return 0; } -/* { dg-final { scan-ipa-dump "Semantic equality hit:gcd->nsd" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:gcd/\[0-9+\]+->nsd/\[0-9+\]+" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-13.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-13.c index d58f182d237..9bd16b0c1cb 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-13.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-13.c @@ -187,7 +187,7 @@ int main(int argc, char **argv) printf("Test2: %d, %d, gdc: %d\n", a, b, nsd(a, b)); } -/* { dg-final { scan-ipa-dump "Semantic equality hit:s1->s2" "icf" } } */ -/* { dg-final { scan-ipa-dump "Semantic equality hit:nsd_different_result->nsd_different_result2" "icf" } } */ -/* { dg-final { scan-ipa-dump "Semantic equality hit:gcd->nsd" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:s1/\[0-9+\]+->s2/\[0-9+\]+" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:nsd_different_result/\[0-9+\]+->nsd_different_result2/\[0-9+\]+" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:gcd/\[0-9+\]+->nsd/\[0-9+\]+" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 3" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-16.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-16.c index b11cae06534..bd7358c5cf1 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-16.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-16.c @@ -22,5 +22,5 @@ int main() return foo() + bar(); } -/* { dg-final { scan-ipa-dump "Semantic equality hit:foo->bar" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:foo/\[0-9+\]+->bar/\[0-9+\]+" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-18.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-18.c index 7753e1e4abb..55fd877fa74 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-18.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-18.c @@ -32,5 +32,5 @@ int main() return 0; } -/* { dg-final { scan-ipa-dump "Semantic equality hit:foo->bar" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:foo/\[0-9+\]+->bar/\[0-9+\]+" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-2.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-2.c index e6e165a9a62..7068bb069d6 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-2.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-2.c @@ -64,5 +64,5 @@ int main(int argc, char **argv) return 0; } -/* { dg-final { scan-ipa-dump "Semantic equality hit:f1->f2" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:f1/\[0-9+\]+->f2/\[0-9+\]+" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-20.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-20.c index 42e9ce95f09..c9155ddaf40 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-20.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-20.c @@ -23,5 +23,5 @@ int main() return 0; } -/* { dg-final { scan-ipa-dump "Semantic equality hit:foo->bar" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:foo/\[0-9+\]+->bar/\[0-9+\]+" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-21.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-21.c index ea7164c2ef7..9afc42ce7d0 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-21.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-21.c @@ -22,5 +22,5 @@ int main() return 2; } -/* { dg-final { scan-ipa-dump "Semantic equality hit:foo->bar" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:foo/\[0-9+\]+->bar/\[0-9+\]+" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-23.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-23.c index 805a406efed..20f468d245c 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-23.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-23.c @@ -24,5 +24,5 @@ int main() return foo(0) + bar(0); } -/* { dg-final { scan-ipa-dump "Semantic equality hit:foo->bar" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:foo/\[0-9+\]+->bar/\[0-9+\]+" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-25.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-25.c index 5b963a843e7..fad0891283e 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-25.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-25.c @@ -46,6 +46,6 @@ int main() return foo() + bar(); } -/* { dg-final { scan-ipa-dump "Semantic equality hit:foo->bar" "icf" } } */ -/* { dg-final { scan-ipa-dump "Semantic equality hit:zip->zap" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:foo/\[0-9+\]+->bar/\[0-9+\]+" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:zip/\[0-9+\]+->zap/\[0-9+\]+" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 2" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-26.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-26.c index 42c538630c2..5dc0062bbe5 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-26.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-26.c @@ -38,5 +38,5 @@ int main() return 0; } -/* { dg-final { scan-ipa-dump "Semantic equality hit:destroy->remove" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:destroy/\[0-9+\]+->remove/\[0-9+\]+" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-27.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-27.c index a2ce86ab1db..45e2c5689ce 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-27.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-27.c @@ -25,5 +25,5 @@ int main() return 0; } -/* { dg-final { scan-ipa-dump "Semantic equality hit:destroy->remove" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:destroy/\[0-9+\]+->remove/\[0-9+\]+" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-3.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-3.c index 8d83a281cd0..aa238329180 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-3.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-3.c @@ -31,5 +31,5 @@ int main() return 0; } -/* { dg-final { scan-ipa-dump "Semantic equality hit:foo->bar" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:foo/\[0-9+\]+->bar/\[0-9+\]+" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-35.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-35.c index 03bac84bdbe..d6dd2680591 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-35.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-35.c @@ -25,6 +25,6 @@ int main() } /* { dg-final { scan-ipa-dump "Equal symbols: 3" "icf" } } */ -/* { dg-final { scan-ipa-dump "Semantic equality hit:f1->f2" "icf" } } */ -/* { dg-final { scan-ipa-dump "Semantic equality hit:c->d" "icf" } } */ -/* { dg-final { scan-ipa-dump "Semantic equality hit:a->b" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:f1/\[0-9+\]+->f2/\[0-9+\]+" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:c/\[0-9+\]+->d/\[0-9+\]+" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:a/\[0-9+\]+->b/\[0-9+\]+" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-36.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-36.c index e1f26302cc7..a6a8ef90b0f 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-36.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-36.c @@ -31,8 +31,8 @@ int t(int tt) } /* { dg-final { scan-ipa-dump "Equal symbols: 6" "icf" } } */ -/* { dg-final { scan-ipa-dump "Semantic equality hit:a->b" "icf" } } */ -/* { dg-final { scan-ipa-dump "Semantic equality hit:c->d" "icf" } } */ -/* { dg-final { scan-ipa-dump "Semantic equality hit:e->f" "icf" } } */ -/* { dg-final { scan-ipa-dump "Semantic equality hit:g->h" "icf" } } */ -/* { dg-final { scan-ipa-dump "Semantic equality hit:i->k" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:a/\[0-9+\]+->b/\[0-9+\]+" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:c/\[0-9+\]+->d/\[0-9+\]+" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:e/\[0-9+\]+->f/\[0-9+\]+" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:g/\[0-9+\]+->h/\[0-9+\]+" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:i/\[0-9+\]+->k/\[0-9+\]+" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-37.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-37.c index b3816552e7f..509c687d9e9 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-37.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-37.c @@ -31,8 +31,8 @@ int t(int tt) } /* { dg-final { scan-ipa-dump "Equal symbols: 5" "icf" } } */ -/* { dg-final { scan-ipa-dump "Semantic equality hit:a->b" "icf" } } */ -/* { dg-final { scan-ipa-dump "Semantic equality hit:c->d" "icf" } } */ -/* { dg-final { scan-ipa-dump "Semantic equality hit:e->f" "icf" } } */ -/* { dg-final { scan-ipa-dump "Semantic equality hit:g->h" "icf" } } */ -/* { dg-final { scan-ipa-dump "Semantic equality hit:i->j" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:a/\[0-9+\]+->b/\[0-9+\]+" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:c/\[0-9+\]+->d/\[0-9+\]+" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:e/\[0-9+\]+->f/\[0-9+\]+" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:g/\[0-9+\]+->h/\[0-9+\]+" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:i/\[0-9+\]+->j/\[0-9+\]+" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-38.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-38.c index b9aea90b400..452e1b88514 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-38.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-38.c @@ -27,7 +27,7 @@ int main() return 0; } -/* { dg-final { scan-wpa-ipa-dump "Semantic equality hit:foo->bar" "icf" } } */ +/* { dg-final { scan-wpa-ipa-dump "Semantic equality hit:foo/\[0-9+\]+->bar/\[0-9+\]+" "icf" } } */ /* { dg-final { scan-wpa-ipa-dump "Equal symbols: 1" "icf" } } */ /* { dg-final { scan-ltrans-tree-dump "Function foo" "optimized" } } */ /* { dg-final { scan-ltrans-tree-dump-not "Function bar" "optimized" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-5.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-5.c index 1125bbd80c5..b564ac301fa 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-5.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-5.c @@ -50,5 +50,5 @@ int main() return 1; } -/* { dg-final { scan-ipa-dump "Semantic equality hit:f1->f2" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:f1/\[0-9+\]+->f2/\[0-9+\]+" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-7.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-7.c index d498b10255b..8d53455eb01 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-7.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-7.c @@ -67,5 +67,5 @@ int main() return 1; } -/* { dg-final { scan-ipa-dump "Semantic equality hit:foo->foo2" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:foo/\[0-9+\]+->foo2/\[0-9+\]+" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-8.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-8.c index fe95c2ccd56..c8c009cf005 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-8.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-8.c @@ -40,5 +40,5 @@ int main(int argc, char **argv) printf("fce2: %d\n", fce2(argc, 2 * argc)); } -/* { dg-final { scan-ipa-dump "Semantic equality hit:fce1->fce2" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:fce1/\[0-9+\]+->fce2/\[0-9+\]+" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-merge-1.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-merge-1.c index f96e8e866a4..d5ce5eb18f4 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-merge-1.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-merge-1.c @@ -18,7 +18,7 @@ int main () } /* Notice the two functions are the same. */ -/* { dg-final { scan-ipa-dump "Semantic equality hit:foo->main" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:foo/\[0-9+\]+->main/\[0-9+\]+" "icf" } } */ /* Make sure we don't tail call main. */ /* { dg-final { scan-ipa-dump-not "= main \\(\\);" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/pr64307.c b/gcc/testsuite/gcc.dg/ipa/pr64307.c index e2c9121c037..345a51c2baa 100644 --- a/gcc/testsuite/gcc.dg/ipa/pr64307.c +++ b/gcc/testsuite/gcc.dg/ipa/pr64307.c @@ -27,5 +27,5 @@ int main() return r1 - r2; } -/* { dg-final { scan-ipa-dump "Semantic equality hit:real_part->real_part_2" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:real_part/\[0-9+\]+->real_part_2/\[0-9+\]+" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/pr90555.c b/gcc/testsuite/gcc.dg/ipa/pr90555.c index d357405bb9a..80c5c9fc85b 100644 --- a/gcc/testsuite/gcc.dg/ipa/pr90555.c +++ b/gcc/testsuite/gcc.dg/ipa/pr90555.c @@ -62,5 +62,5 @@ test_simduid2 (int j, int b) return c2; } -/* { dg-final { scan-ipa-dump "Semantic equality hit:test_simduid1->test_simduid2" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:test_simduid1/\[0-9+\]+->test_simduid2/\[0-9+\]+" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/propmalloc-1.c b/gcc/testsuite/gcc.dg/ipa/propmalloc-1.c index 48136275590..d7c13af400d 100644 --- a/gcc/testsuite/gcc.dg/ipa/propmalloc-1.c +++ b/gcc/testsuite/gcc.dg/ipa/propmalloc-1.c @@ -17,5 +17,5 @@ static void *bar(__SIZE_TYPE__ n) return p; } -/* { dg-final { scan-ipa-dump "Function f found to be malloc" "pure-const" } } */ -/* { dg-final { scan-ipa-dump "Function bar found to be malloc" "pure-const" } } */ +/* { dg-final { scan-ipa-dump "Function f/\[0-9+\]+ found to be malloc" "pure-const" } } */ +/* { dg-final { scan-ipa-dump "Function bar/\[0-9+\]+ found to be malloc" "pure-const" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/propmalloc-2.c b/gcc/testsuite/gcc.dg/ipa/propmalloc-2.c index 4ad8fb1e751..2332d9a4b44 100644 --- a/gcc/testsuite/gcc.dg/ipa/propmalloc-2.c +++ b/gcc/testsuite/gcc.dg/ipa/propmalloc-2.c @@ -19,5 +19,5 @@ static void *bar(__SIZE_TYPE__ n, int cond) return p; } -/* { dg-final { scan-ipa-dump "Function foo found to be malloc" "pure-const" } } */ -/* { dg-final { scan-ipa-dump "Function bar found to be malloc" "pure-const" } } */ +/* { dg-final { scan-ipa-dump "Function foo/\[0-9+\]+ found to be malloc" "pure-const" } } */ +/* { dg-final { scan-ipa-dump "Function bar/\[0-9+\]+ found to be malloc" "pure-const" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/propmalloc-3.c b/gcc/testsuite/gcc.dg/ipa/propmalloc-3.c index c32254489a5..5386695dcb0 100644 --- a/gcc/testsuite/gcc.dg/ipa/propmalloc-3.c +++ b/gcc/testsuite/gcc.dg/ipa/propmalloc-3.c @@ -20,5 +20,5 @@ static void *foo(__SIZE_TYPE__ n, int m) return p; } -/* { dg-final { scan-ipa-dump "Function foo found to be malloc" "pure-const" } } */ -/* { dg-final { scan-ipa-dump "Function bar found to be malloc" "pure-const" } } */ +/* { dg-final { scan-ipa-dump "Function foo/\[0-9+\]+ found to be malloc" "pure-const" } } */ +/* { dg-final { scan-ipa-dump "Function bar/\[0-9+\]+ found to be malloc" "pure-const" } } */ diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 58c6739eb7e..ee4670c94a5 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -2263,7 +2263,7 @@ copy_bb (copy_body_data *id, basic_block bb, if (dump_file) { fprintf (dump_file, "Created new direct edge to %s\n", - dest->name ()); + dest->dump_name ()); } } diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 22e904444f1..f189f756261 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -8157,7 +8157,8 @@ ipa_pta_execute (void) && from != constraints.length ()) { fprintf (dump_file, - "Generating intial constraints for %s", node->name ()); + "Generating initial constraints for %s", + node->dump_name ()); if (DECL_ASSEMBLER_NAME_SET_P (node->decl)) fprintf (dump_file, " (%s)", IDENTIFIER_POINTER @@ -8214,7 +8215,7 @@ ipa_pta_execute (void) if (dump_file) { fprintf (dump_file, - "Generating constraints for %s", node->name ()); + "Generating constraints for %s", node->dump_name ()); if (DECL_ASSEMBLER_NAME_SET_P (node->decl)) fprintf (dump_file, " (%s)", IDENTIFIER_POINTER diff --git a/gcc/varpool.c b/gcc/varpool.c index cb9a82d61a8..e5d632e0eb5 100644 --- a/gcc/varpool.c +++ b/gcc/varpool.c @@ -639,7 +639,7 @@ symbol_table::remove_unreferenced_decls (void) { enqueue_node (node, &first); if (dump_file) - fprintf (dump_file, " %s", node->asm_name ()); + fprintf (dump_file, " %s", node->dump_asm_name ()); } } while (first != (varpool_node *)(void *)1) @@ -687,7 +687,7 @@ symbol_table::remove_unreferenced_decls (void) if (!node->aux && !node->no_reorder) { if (dump_file) - fprintf (dump_file, " %s", node->asm_name ()); + fprintf (dump_file, " %s", node->dump_asm_name ()); if (referenced.contains(node)) node->remove_initializer (); else -- 2.30.2