Hi,

On Tue, Jan 07 2020, Martin Liška wrote:
> Hi.
>
> I would like to make cgraph_node names consistent in cgraph_node::dump.
>

I try to use just the symtab_order numbers whenever I can to avoid
confusion but - at least if we care about the non-asm name at all -
shouldn't the dump have both the name and asm_name?  If not, then I
guess get_dump_name should print asm name too to get consistency
everywhere in the IPA dumps not just the graph dump bit. 

Martin


> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
>
> Ready to be installed?
> Thanks,
> Martin
>
> gcc/ChangeLog:
>
> 2020-01-02  Martin Liska  <mli...@suse.cz>
>
>       * cgraph.c (cgraph_node::dump): Use systematically
>       dump_asm_name.
> ---
>   gcc/cgraph.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
>
> diff --git a/gcc/cgraph.c b/gcc/cgraph.c
> index 13238d3d442..aa2c476842a 100644
> --- a/gcc/cgraph.c
> +++ b/gcc/cgraph.c
> @@ -2036,7 +2036,7 @@ cgraph_node::dump (FILE *f)
>    profile_count sum = profile_count::zero ();
>    for (edge = callers; edge; edge = edge->next_caller)
>      {
> -      fprintf (f, "%s ", edge->caller->dump_name ());
> +      fprintf (f, "%s ", edge->caller->dump_asm_name ());
>        edge->dump_edge_flags (f);
>        if (edge->count.initialized_p ())
>       sum += edge->count.ipa ();
> @@ -2045,7 +2045,7 @@ cgraph_node::dump (FILE *f)
>    fprintf (f, "\n  Calls: ");
>    for (edge = callees; edge; edge = edge->next_callee)
>      {
> -      fprintf (f, "%s ", edge->callee->dump_name ());
> +      fprintf (f, "%s ", edge->callee->dump_asm_name ());
>        edge->dump_edge_flags (f);
>      }
>    fprintf (f, "\n");

Reply via email to