OSDN Git Service

Revert:
[pf3gnuchains/gcc-fork.git] / gcc / graph.c
index 56fbc8c..38e7294 100644 (file)
@@ -1,5 +1,5 @@
 /* Output routines for graphical representation.
-   Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2007
+   Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2007, 2008
    Free Software Foundation, Inc.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -165,25 +165,25 @@ darkgrey\n  shape: ellipse" : "white",
 }
 
 static void
-draw_edge (FILE *fp, int from, int to, int bb_edge, int class)
+draw_edge (FILE *fp, int from, int to, int bb_edge, int color_class)
 {
   const char * color;
   switch (graph_dump_format)
     {
     case vcg:
       color = "";
-      if (class == 2)
+      if (color_class == 2)
        color = "color: red ";
       else if (bb_edge)
        color = "color: blue ";
-      else if (class == 3)
+      else if (color_class == 3)
        color = "color: green ";
       fprintf (fp,
               "edge: { sourcename: \"%s.%d\" targetname: \"%s.%d\" %s",
               current_function_name (), from,
               current_function_name (), to, color);
-      if (class)
-       fprintf (fp, "class: %d ", class);
+      if (color_class)
+       fprintf (fp, "class: %d ", color_class);
       fputs ("}\n", fp);
       break;
     case no_graph:
@@ -226,7 +226,7 @@ print_rtl_graph_with_bb (const char *base, rtx rtx_first)
   rtx tmp_rtx;
   size_t namelen = strlen (base);
   size_t extlen = strlen (graph_ext[graph_dump_format]) + 1;
-  char *buf = alloca (namelen + extlen);
+  char *buf = XALLOCAVEC (char, namelen + extlen);
   FILE *fp;
 
   if (basic_block_info == NULL)
@@ -389,7 +389,7 @@ clean_graph_dump_file (const char *base)
 {
   size_t namelen = strlen (base);
   size_t extlen = strlen (graph_ext[graph_dump_format]) + 1;
-  char *buf = alloca (namelen + extlen);
+  char *buf = XALLOCAVEC (char, namelen + extlen);
   FILE *fp;
 
   memcpy (buf, base, namelen);
@@ -413,7 +413,7 @@ finish_graph_dump_file (const char *base)
 {
   size_t namelen = strlen (base);
   size_t extlen = strlen (graph_ext[graph_dump_format]) + 1;
-  char *buf = alloca (namelen + extlen);
+  char *buf = XALLOCAVEC (char, namelen + extlen);
   FILE *fp;
 
   memcpy (buf, base, namelen);