On Mon, 2025-04-28 at 16:10:58 +0200, Martin Jambor wrote: > Hi, > > starting with GCC 15 the order is not unique for any symtab_nodes but > m_uid is, I believe we ought to dump the latter in the ipa-clones dump, > if only so that people can reliably match entries about new clones to > those about removed nodes (if any). > > Bootstrapped and tested on x86_64-linux. OK for master and gcc 15? > > Thanks, > > Martin >
We probably want the following changes as well. These should cover all dumps affected by the order/uid change. Not sure whether as part of this patch or a separate one. Michal --- gcc/ipa-cp.cc | 2 +- gcc/ipa-sra.cc | 2 +- gcc/symtab.cc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/ipa-cp.cc b/gcc/ipa-cp.cc index f7e5aa9bfd5..16ab608e82b 100644 --- a/gcc/ipa-cp.cc +++ b/gcc/ipa-cp.cc @@ -288,7 +288,7 @@ ipcp_lattice<valtype>::print (FILE * f, bool dump_sources, bool dump_benefits) else fprintf (f, " [scc: %i, from:", val->scc_no); for (s = val->sources; s; s = s->next) - fprintf (f, " %i(%f)", s->cs->caller->order, + fprintf (f, " %i(%f)", s->cs->caller->get_uid (), s->cs->sreal_frequency ().to_double ()); fprintf (f, "]"); } diff --git a/gcc/ipa-sra.cc b/gcc/ipa-sra.cc index 1331ba49b50..88bfae9502c 100644 --- a/gcc/ipa-sra.cc +++ b/gcc/ipa-sra.cc @@ -4644,7 +4644,7 @@ ipa_sra_summarize_function (cgraph_node *node) { if (dump_file) fprintf (dump_file, "Creating summary for %s/%i:\n", node->name (), - node->order); + node->get_uid ()); gcc_obstack_init (&gensum_obstack); loaded_decls = new hash_set<tree>; diff --git a/gcc/symtab.cc b/gcc/symtab.cc index fe9c031247f..fc1155f4696 100644 --- a/gcc/symtab.cc +++ b/gcc/symtab.cc @@ -989,10 +989,10 @@ symtab_node::dump_base (FILE *f) same_comdat_group->dump_asm_name ()); if (next_sharing_asm_name) fprintf (f, " next sharing asm name: %i\n", - next_sharing_asm_name->order); + next_sharing_asm_name->get_uid ()); if (previous_sharing_asm_name) fprintf (f, " previous sharing asm name: %i\n", - previous_sharing_asm_name->order); + previous_sharing_asm_name->get_uid ()); if (address_taken) fprintf (f, " Address is taken.\n"); -- 2.49.0