F^C the vcg dump bug.

From-SVN: r165444
This commit is contained in:
Tijs Wiebe Lefering 2010-10-14 01:48:43 +00:00 committed by Mingjie Xing
parent 8943989dda
commit 208d8b55ac
2 changed files with 16 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2010-10-14 Tijs Wiebe Lefering <twlevo@gmail.com>
* graph.c (inbb): New variable.
(start_bb): Set inbb to 1 if output is inside of a building block.
(end_bb): Check if output is inside of a building block.
2010-10-13 Eric Botcazou <ebotcazou@adacore.com>
PR rtl-optimization/45912

View File

@ -40,6 +40,9 @@ static const char *const graph_ext[] =
/* vcg */ ".vcg",
};
/* The flag to indicate if output is inside of a building block. */
static int inbb = 0;
static void start_fct (FILE *);
static void start_bb (FILE *, int);
static void node_data (FILE *, rtx);
@ -77,6 +80,7 @@ start_bb (FILE *fp, int bb)
graph: {\ntitle: \"%s.BB%d\"\nfolding: 1\ncolor: lightblue\n\
label: \"basic block %d",
current_function_name (), bb, bb);
inbb = 1; /* Now We are inside of a building block. */
break;
case no_graph:
break;
@ -198,7 +202,12 @@ end_bb (FILE *fp)
switch (graph_dump_format)
{
case vcg:
fputs ("}\n", fp);
/* Check if we are inside of a building block. */
if (inbb != 0)
{
fputs ("}\n", fp);
inbb = 0; /* Now we are outside of a building block. */
}
break;
case no_graph:
break;