Commit af9acf91 by Steven Bosscher

dumpfile.h (enum tree_dump_index): Remove TDI_vcg.

	* dumpfile.h (enum tree_dump_index): Remove TDI_vcg.
	* dumpfile.c (dump_files[]): Remove entry for TDI_vcg.
	* tree-cfg.c (gimple_cfg2vcg): Remove.
	(build_gimple_cfg): Don't call it.
	* doc/invoke.texi (-fdump-tree-vcg): Remove documentation.
	Correct GraphViz documentation, it does handle multiple functions
	in a single dump.

From-SVN: r194445
parent d06a01bf
2012-12-12 Steven Bosscher <steven@gcc.gnu.org>
* dumpfile.h (enum tree_dump_index): Remove TDI_vcg.
* dumpfile.c (dump_files[]): Remove entry for TDI_vcg.
* tree-cfg.c (gimple_cfg2vcg): Remove.
(build_gimple_cfg): Don't call it.
* doc/invoke.texi (-fdump-tree-vcg): Remove documentation.
Correct GraphViz documentation, it does handle multiple functions
in a single dump.
2012-12-12 Zdenek Dvorak <ook@ucw.cz> 2012-12-12 Zdenek Dvorak <ook@ucw.cz>
PR tree-optimization/55481 PR tree-optimization/55481
...@@ -305,7 +305,7 @@ Objective-C and Objective-C++ Dialects}. ...@@ -305,7 +305,7 @@ Objective-C and Objective-C++ Dialects}.
-fdump-tree-all @gol -fdump-tree-all @gol
-fdump-tree-original@r{[}-@var{n}@r{]} @gol -fdump-tree-original@r{[}-@var{n}@r{]} @gol
-fdump-tree-optimized@r{[}-@var{n}@r{]} @gol -fdump-tree-optimized@r{[}-@var{n}@r{]} @gol
-fdump-tree-cfg -fdump-tree-vcg -fdump-tree-alias @gol -fdump-tree-cfg -fdump-tree-alias @gol
-fdump-tree-ch @gol -fdump-tree-ch @gol
-fdump-tree-ssa@r{[}-@var{n}@r{]} -fdump-tree-pre@r{[}-@var{n}@r{]} @gol -fdump-tree-ssa@r{[}-@var{n}@r{]} -fdump-tree-pre@r{[}-@var{n}@r{]} @gol
-fdump-tree-ccp@r{[}-@var{n}@r{]} -fdump-tree-dce@r{[}-@var{n}@r{]} @gol -fdump-tree-ccp@r{[}-@var{n}@r{]} -fdump-tree-dce@r{[}-@var{n}@r{]} @gol
...@@ -5858,10 +5858,9 @@ Enable showing basic block boundaries (disabled in raw dumps). ...@@ -5858,10 +5858,9 @@ Enable showing basic block boundaries (disabled in raw dumps).
@item graph @item graph
For each of the other indicated dump files (@option{-fdump-rtl-@var{pass}}), For each of the other indicated dump files (@option{-fdump-rtl-@var{pass}}),
dump a representation of the control flow graph suitable for viewing with dump a representation of the control flow graph suitable for viewing with
GraphViz to @file{@var{file}.@var{passid}.@var{pass}.dot}. Note that if GraphViz to @file{@var{file}.@var{passid}.@var{pass}.dot}. Each function in
the file contains more than one function, the generated file cannot be the file is pretty-printed as a subgraph, so that GraphViz can render them
used directly by GraphViz@. You must cut and paste each function's all in a single plot.
graph into its own separate file first.
This option currently only works for RTL dumps, and the RTL is always This option currently only works for RTL dumps, and the RTL is always
dumped in slim form. dumped in slim form.
...@@ -5932,14 +5931,6 @@ file name is made by appending @file{.gimple} to the source file name. ...@@ -5932,14 +5931,6 @@ file name is made by appending @file{.gimple} to the source file name.
Dump the control flow graph of each function to a file. The file name is Dump the control flow graph of each function to a file. The file name is
made by appending @file{.cfg} to the source file name. made by appending @file{.cfg} to the source file name.
@item vcg
@opindex fdump-tree-vcg
Dump the control flow graph of each function to a file in VCG format. The
file name is made by appending @file{.vcg} to the source file name. Note
that if the file contains more than one function, the generated file cannot
be used directly by VCG@. You must cut and paste each function's
graph into its own separate file first.
@item ch @item ch
@opindex fdump-tree-ch @opindex fdump-tree-ch
Dump each function after copying loop headers. The file name is made by Dump each function after copying loop headers. The file name is made by
......
...@@ -62,9 +62,7 @@ static struct dump_file_info dump_files[TDI_end] = ...@@ -62,9 +62,7 @@ static struct dump_file_info dump_files[TDI_end] =
0, 0, 0, 0, 4}, 0, 0, 0, 0, 4},
{".nested", "tree-nested", NULL, NULL, NULL, NULL, NULL, TDF_TREE, {".nested", "tree-nested", NULL, NULL, NULL, NULL, NULL, TDF_TREE,
0, 0, 0, 0, 5}, 0, 0, 0, 0, 5},
{".vcg", "tree-vcg", NULL, NULL, NULL, NULL, NULL, TDF_TREE, #define FIRST_AUTO_NUMBERED_DUMP 6
0, 0, 0, 0, 6},
#define FIRST_AUTO_NUMBERED_DUMP 7
{NULL, "tree-all", NULL, NULL, NULL, NULL, NULL, TDF_TREE, {NULL, "tree-all", NULL, NULL, NULL, NULL, NULL, TDF_TREE,
0, 0, 0, 0, 0}, 0, 0, 0, 0, 0},
......
...@@ -35,8 +35,6 @@ enum tree_dump_index ...@@ -35,8 +35,6 @@ enum tree_dump_index
TDI_original, /* dump each function before optimizing it */ TDI_original, /* dump each function before optimizing it */
TDI_generic, /* dump each function after genericizing it */ TDI_generic, /* dump each function after genericizing it */
TDI_nested, /* dump each function after unnesting it */ TDI_nested, /* dump each function after unnesting it */
TDI_vcg, /* create a VCG graph file for each
function's flowgraph. */
TDI_tree_all, /* enable all the GENERIC/GIMPLE dumps. */ TDI_tree_all, /* enable all the GENERIC/GIMPLE dumps. */
TDI_rtl_all, /* enable all the RTL dumps. */ TDI_rtl_all, /* enable all the RTL dumps. */
TDI_ipa_all, /* enable all the IPA dumps. */ TDI_ipa_all, /* enable all the IPA dumps. */
......
...@@ -111,7 +111,6 @@ static unsigned int split_critical_edges (void); ...@@ -111,7 +111,6 @@ static unsigned int split_critical_edges (void);
static inline bool stmt_starts_bb_p (gimple, gimple); static inline bool stmt_starts_bb_p (gimple, gimple);
static int gimple_verify_flow_info (void); static int gimple_verify_flow_info (void);
static void gimple_make_forwarder_block (edge); static void gimple_make_forwarder_block (edge);
static void gimple_cfg2vcg (FILE *);
static gimple first_non_label_stmt (basic_block); static gimple first_non_label_stmt (basic_block);
static bool verify_gimple_transaction (gimple); static bool verify_gimple_transaction (gimple);
...@@ -208,19 +207,6 @@ build_gimple_cfg (gimple_seq seq) ...@@ -208,19 +207,6 @@ build_gimple_cfg (gimple_seq seq)
make_edges (); make_edges ();
cleanup_dead_labels (); cleanup_dead_labels ();
htab_delete (discriminator_per_locus); htab_delete (discriminator_per_locus);
/* Debugging dumps. */
/* Write the flowgraph to a VCG file. */
{
int local_dump_flags;
FILE *vcg_file = dump_begin (TDI_vcg, &local_dump_flags);
if (vcg_file)
{
gimple_cfg2vcg (vcg_file);
dump_end (TDI_vcg, vcg_file);
}
}
} }
static unsigned int static unsigned int
...@@ -2150,92 +2136,6 @@ debug_cfg_stats (void) ...@@ -2150,92 +2136,6 @@ debug_cfg_stats (void)
dump_cfg_stats (stderr); dump_cfg_stats (stderr);
} }
/* Dump the flowgraph to a .vcg FILE. */
static void
gimple_cfg2vcg (FILE *file)
{
edge e;
edge_iterator ei;
basic_block bb;
const char *funcname = current_function_name ();
/* Write the file header. */
fprintf (file, "graph: { title: \"%s\"\n", funcname);
fprintf (file, "node: { title: \"ENTRY\" label: \"ENTRY\" }\n");
fprintf (file, "node: { title: \"EXIT\" label: \"EXIT\" }\n");
/* Write blocks and edges. */
FOR_EACH_EDGE (e, ei, ENTRY_BLOCK_PTR->succs)
{
fprintf (file, "edge: { sourcename: \"ENTRY\" targetname: \"%d\"",
e->dest->index);
if (e->flags & EDGE_FAKE)
fprintf (file, " linestyle: dotted priority: 10");
else
fprintf (file, " linestyle: solid priority: 100");
fprintf (file, " }\n");
}
fputc ('\n', file);
FOR_EACH_BB (bb)
{
enum gimple_code head_code, end_code;
const char *head_name, *end_name;
int head_line = 0;
int end_line = 0;
gimple first = first_stmt (bb);
gimple last = last_stmt (bb);
if (first)
{
head_code = gimple_code (first);
head_name = gimple_code_name[head_code];
head_line = get_lineno (first);
}
else
head_name = "no-statement";
if (last)
{
end_code = gimple_code (last);
end_name = gimple_code_name[end_code];
end_line = get_lineno (last);
}
else
end_name = "no-statement";
fprintf (file, "node: { title: \"%d\" label: \"#%d\\n%s (%d)\\n%s (%d)\"}\n",
bb->index, bb->index, head_name, head_line, end_name,
end_line);
FOR_EACH_EDGE (e, ei, bb->succs)
{
if (e->dest == EXIT_BLOCK_PTR)
fprintf (file, "edge: { sourcename: \"%d\" targetname: \"EXIT\"", bb->index);
else
fprintf (file, "edge: { sourcename: \"%d\" targetname: \"%d\"", bb->index, e->dest->index);
if (e->flags & EDGE_FAKE)
fprintf (file, " priority: 10 linestyle: dotted");
else
fprintf (file, " priority: 100 linestyle: solid");
fprintf (file, " }\n");
}
if (bb->next_bb != EXIT_BLOCK_PTR)
fputc ('\n', file);
}
fputs ("}\n\n", file);
}
/*--------------------------------------------------------------------------- /*---------------------------------------------------------------------------
Miscellaneous helpers Miscellaneous helpers
---------------------------------------------------------------------------*/ ---------------------------------------------------------------------------*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment