diff options
author | Gabriel Dos Reis <gdr@integrable-solutions.net> | 2013-08-05 08:58:27 +0000 |
---|---|---|
committer | Gabriel Dos Reis <gdr@gcc.gnu.org> | 2013-08-05 08:58:27 +0000 |
commit | 65f0a1207d8127d07a33089379bfd962f600bd19 (patch) | |
tree | 04ba52c5691b2bb5fbceff8571653c46f1dcbe00 /gcc | |
parent | b3f80694f51873709e2e0fee9e32484a32d28f85 (diff) | |
download | gcc-65f0a1207d8127d07a33089379bfd962f600bd19.zip gcc-65f0a1207d8127d07a33089379bfd962f600bd19.tar.gz gcc-65f0a1207d8127d07a33089379bfd962f600bd19.tar.bz2 |
graph.c (init_graph_slim_pretty_print): Remove.
* graph.c (init_graph_slim_pretty_print): Remove.
(print_graph_cfg): Do not call it. Use local pretty printer.
(start_graph_dump): Likewise.
From-SVN: r201483
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/graph.c | 30 |
2 files changed, 14 insertions, 22 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2fe5ac5..fb90848 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net> + * graph.c (init_graph_slim_pretty_print): Remove. + (print_graph_cfg): Do not call it. Use local pretty printer. + (start_graph_dump): Likewise. + +2013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net> + * gimple-pretty-print.c (buffer): Remove. (initialized): Likewise. (maybe_init_pretty_print): Likewise. diff --git a/gcc/graph.c b/gcc/graph.c index 5cfc27e..91391a6 100644 --- a/gcc/graph.c +++ b/gcc/graph.c @@ -56,26 +56,6 @@ open_graph_file (const char *base, const char *mode) return fp; } -/* Return a pretty-print buffer for output to file FP. */ - -static pretty_printer * -init_graph_slim_pretty_print (FILE *fp) -{ - static bool initialized = false; - static pretty_printer graph_slim_pp; - - if (! initialized) - { - pp_construct (&graph_slim_pp, /*prefix=*/NULL, /*linewidth=*/0); - initialized = true; - } - else - gcc_assert (! pp_last_position_in_text (&graph_slim_pp)); - - graph_slim_pp.buffer->stream = fp; - return &graph_slim_pp; -} - /* Draw a basic block BB belonging to the function with FUNCDEF_NO as its unique number. */ static void @@ -297,7 +277,10 @@ print_graph_cfg (const char *base, struct function *fun) { const char *funcname = function_name (fun); FILE *fp = open_graph_file (base, "a"); - pretty_printer *pp = init_graph_slim_pretty_print (fp); + pretty_printer graph_slim_pp; + pp_construct (&graph_slim_pp, /*prefix=*/NULL, /*linewidth=*/0); + graph_slim_pp.buffer->stream = fp; + pretty_printer *const pp = &graph_slim_pp; pp_printf (pp, "subgraph \"%s\" {\n" "\tcolor=\"black\";\n" "\tlabel=\"%s\";\n", @@ -313,7 +296,10 @@ print_graph_cfg (const char *base, struct function *fun) static void start_graph_dump (FILE *fp, const char *base) { - pretty_printer *pp = init_graph_slim_pretty_print (fp); + pretty_printer graph_slim_pp; + pp_construct (&graph_slim_pp, /*prefix=*/NULL, /*linewidth=*/0); + graph_slim_pp.buffer->stream = fp; + pretty_printer *const pp = &graph_slim_pp; pp_string (pp, "digraph \""); pp_write_text_to_stream (pp); pp_string (pp, base); |