graph.c (start_graph_dump): Print dumpfile base as digraph label.

* graph.c (start_graph_dump): Print dumpfile base as digraph label.
	(clean_graph_dump_file): Pass base to start_graph_dump.

From-SVN: r196074
This commit is contained in:
Steven Bosscher 2013-02-15 09:30:52 +00:00
parent fab99ea2d2
commit 3fb7c69995
2 changed files with 15 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2013-02-15 Steven Bosscher <steven@gcc.gnu.org>
* graph.c (start_graph_dump): Print dumpfile base as digraph label.
(clean_graph_dump_file): Pass base to start_graph_dump.
2013-02-14 Richard Henderson <rth@redhat.com>
PR target/55941

View File

@ -308,11 +308,16 @@ print_graph_cfg (const char *base, struct function *fun)
/* Start the dump of a graph. */
static void
start_graph_dump (FILE *fp)
start_graph_dump (FILE *fp, const char *base)
{
fputs ("digraph \"\" {\n"
"overlap=false;\n",
fp);
pretty_printer *pp = init_graph_slim_pretty_print (fp);
pp_string (pp, "digraph \"");
pp_write_text_to_stream (pp);
pp_string (pp, base);
pp_write_text_as_dot_label_to_stream (pp, /*for_record=*/false);
pp_string (pp, "\" {\n");
pp_string (pp, "overlap=false;\n");
pp_flush (pp);
}
/* End the dump of a graph. */
@ -327,7 +332,7 @@ void
clean_graph_dump_file (const char *base)
{
FILE *fp = open_graph_file (base, "w");
start_graph_dump (fp);
start_graph_dump (fp, base);
fclose (fp);
}