aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
authorSteven Bosscher <steven@gcc.gnu.org>2012-12-12 13:17:27 +0000
committerSteven Bosscher <steven@gcc.gnu.org>2012-12-12 13:17:27 +0000
commit8899d763bfe5128de104cf58c513a15fba185b82 (patch)
tree980e3538eeff25f52a0d48f0a327f16560842cf7 /gcc/tree-cfg.c
parentf5518ed3734ed73961de7f07429901e5334c5144 (diff)
* 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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@194445 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c100
1 files changed, 0 insertions, 100 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index be89320559f..385f4c3bc57 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -111,7 +111,6 @@ static unsigned int split_critical_edges (void);
static inline bool stmt_starts_bb_p (gimple, gimple);
static int gimple_verify_flow_info (void);
static void gimple_make_forwarder_block (edge);
-static void gimple_cfg2vcg (FILE *);
static gimple first_non_label_stmt (basic_block);
static bool verify_gimple_transaction (gimple);
@@ -208,19 +207,6 @@ build_gimple_cfg (gimple_seq seq)
make_edges ();
cleanup_dead_labels ();
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
@@ -2150,92 +2136,6 @@ debug_cfg_stats (void)
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
---------------------------------------------------------------------------*/