From: Giuliano Belinassi Date: Tue, 22 Oct 2019 19:05:49 +0000 (+0000) Subject: Fix incorrect merge of conflictant names in `dump_graphviz` X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=51940760d7158aeb8d6747c9ee0b784d6869c7ef;p=gcc.git Fix incorrect merge of conflictant names in `dump_graphviz` When using lto-dump -callgraph with two or more .o files containing distinct functions with the same name, dump_graphviz incorrectly merged those functions into a single node. This patch fixes this issue by calling `dump_name` instead of `name`, therefore concat'ing the function name with the node's id. To understeand what was the issue, let's say you have two files: a.c: static void foo (void) { do_something (); } b.c: static void foo (void) { do_something_else (); } These are distinct functions and should be represented as distinct nodes in the callgraph dump. 2019-10-22 Giuliano Belinassi * cgraph.c (dump_graphviz): Change name to dump_name From-SVN: r277299 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b1a33679632..f3450eea617 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2019-10-22 Giuliano Belinassi + + * cgraph.c (dump_graphviz): Change name to dump_name + 2019-10-22 Richard Earnshaw * config/arm/arm.md (rsbsi_carryin_reg): New pattern. diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 8b752d83809..671306db5ca 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -2155,7 +2155,7 @@ cgraph_node::dump_graphviz (FILE *f) { cgraph_node *callee = edge->callee; - fprintf (f, "\t\"%s\" -> \"%s\"\n", name (), callee->name ()); + fprintf (f, "\t\"%s\" -> \"%s\"\n", dump_name (), callee->dump_name ()); } }