dumpfile.h (enum tree_dump_index): Remove TDI_vcg.
authorSteven Bosscher <steven@gcc.gnu.org>
Wed, 12 Dec 2012 13:17:27 +0000 (13:17 +0000)
committerSteven Bosscher <steven@gcc.gnu.org>
Wed, 12 Dec 2012 13:17:27 +0000 (13:17 +0000)
* 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

gcc/ChangeLog
gcc/doc/invoke.texi
gcc/dumpfile.c
gcc/dumpfile.h
gcc/tree-cfg.c

index d9630ed74146fe04dde65eb6542fb764eeabfd63..61e19df65c9724c7d7da4c1e9bc2bcb1468759d3 100644 (file)
@@ -1,3 +1,13 @@
+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>
 
        PR tree-optimization/55481
index 4d917d1f28c5fab7c49f7f9eb5df02b4519783df..06ba770454b1a3593677a5ef0b8a5bc7e9b868bf 100644 (file)
@@ -305,7 +305,7 @@ Objective-C and Objective-C++ Dialects}.
 -fdump-tree-all @gol
 -fdump-tree-original@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-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
@@ -5858,10 +5858,9 @@ Enable showing basic block boundaries (disabled in raw dumps).
 @item graph
 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
-GraphViz to @file{@var{file}.@var{passid}.@var{pass}.dot}.  Note that if
-the file contains more than one function, the generated file cannot be
-used directly by GraphViz@.  You must cut and paste each function's
-graph into its own separate file first.
+GraphViz to @file{@var{file}.@var{passid}.@var{pass}.dot}.  Each function in
+the file is pretty-printed as a subgraph, so that GraphViz can render them
+all in a single plot.
 
 This option currently only works for RTL dumps, and the RTL is always
 dumped in slim form.
@@ -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
 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
 @opindex fdump-tree-ch
 Dump each function after copying loop headers.  The file name is made by
index 55543cc158ab95306aa0bdeb21665c7af80fefeb..2887a57b5126b51738d097fdc5c56f428db33ef3 100644 (file)
@@ -62,9 +62,7 @@ static struct dump_file_info dump_files[TDI_end] =
    0, 0, 0, 0, 4},
   {".nested", "tree-nested", NULL, NULL, NULL, NULL, NULL, TDF_TREE,
    0, 0, 0, 0, 5},
-  {".vcg", "tree-vcg", NULL, NULL, NULL, NULL, NULL, TDF_TREE,
-   0, 0, 0, 0, 6},
-#define FIRST_AUTO_NUMBERED_DUMP 7
+#define FIRST_AUTO_NUMBERED_DUMP 6
 
   {NULL, "tree-all", NULL, NULL, NULL, NULL, NULL, TDF_TREE,
    0, 0, 0, 0, 0},
index 9697a2c6f35e856f851ed41b2f76570545a15950..6c74b5e30bb00c37eb48ba8c3d1792b26ebafc38 100644 (file)
@@ -35,8 +35,6 @@ enum tree_dump_index
   TDI_original,                        /* dump each function before optimizing it */
   TDI_generic,                 /* dump each function after genericizing 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_rtl_all,                  /* enable all the RTL dumps.  */
   TDI_ipa_all,                  /* enable all the IPA dumps.  */
index be89320559f7ba1a09bda42fbd68f8007c4412d6..385f4c3bc57d3b13d85ead26dbb85cf203ce030c 100644 (file)
@@ -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
 ---------------------------------------------------------------------------*/