Patchwork [2/8] Fix pretty printers.

login
register
mail settings
Submitter Sebastian Pop
Date Sept. 9, 2010, 7:30 p.m.
Message ID <1284060606-26216-2-git-send-email-sebpop@gmail.com>
Download mbox | patch
Permalink /patch/64322/
State New
Headers show

Comments

Sebastian Pop - Sept. 9, 2010, 7:30 p.m.
2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-poly.c (print_pbb_body): Add missing closing parenthesis.
	(print_scop_header): Removed.  Inlined in the only call place...
	(print_scop): ... here.
---
 gcc/ChangeLog.graphite |    6 ++++++
 gcc/graphite-poly.c    |   36 +++++++++++++++---------------------
 2 files changed, 21 insertions(+), 21 deletions(-)

Patch

diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite
index 028da12..3cc99df 100644
--- a/gcc/ChangeLog.graphite
+++ b/gcc/ChangeLog.graphite
@@ -1,5 +1,11 @@ 
 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
 
+	* graphite-poly.c (print_pbb_body): Add missing closing parenthesis.
+	(print_scop_header): Removed.  Inlined in the only call place...
+	(print_scop): ... here.
+
+2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
+
 	* graphite-poly.h (lst_dewey_number): Use FOR_EACH_VEC_ELT.
 
 2010-09-02  Vladimir Kargov  <kargov@gmail.com>
diff --git a/gcc/graphite-poly.c b/gcc/graphite-poly.c
index 2bc0023..a648b45 100644
--- a/gcc/graphite-poly.c
+++ b/gcc/graphite-poly.c
@@ -1247,13 +1247,16 @@  print_pbb_body (FILE *file, poly_bb_p pbb, int verbosity,
     fprintf (file, "# Body (\n");
 
   if (!statement_body_provided)
-  {
-    if (verbosity > 0)
-      fprintf (file, "# Statement body is not provided\n");
+    {
+      if (verbosity > 0)
+	fprintf (file, "# Statement body is not provided\n");
 
-   fprintf (file, "0\n");
-   return;
-  }
+      fprintf (file, "0\n");
+
+      if (verbosity > 1)
+	fprintf (file, "#)\n");
+      return;
+    }
 
   if (verbosity > 0)
     fprintf (file, "# Statement body is provided\n");
@@ -1392,12 +1395,14 @@  print_scop_context (FILE *file, scop_p scop, int verbosity)
     fprintf (file, "# )\n");
 }
 
-/* Print to FILE the SCOP header: context, parameters, and statements
-   number.  */
+/* Print to FILE the SCOP, at some VERBOSITY level.  */
 
-static void
-print_scop_header (FILE *file, scop_p scop, int verbosity)
+void
+print_scop (FILE *file, scop_p scop, int verbosity)
 {
+  int i;
+  poly_bb_p pbb;
+
   fprintf (file, "SCoP 1\n#(\n");
   fprintf (file, "# Language\nGimple\n");
   openscop_print_scop_context (file, scop, verbosity);
@@ -1407,17 +1412,6 @@  print_scop_header (FILE *file, scop_p scop, int verbosity)
     fprintf (file, "# Number of statements\n");
 
   fprintf (file, "%d\n",VEC_length (poly_bb_p, SCOP_BBS (scop)));
-}
-
-/* Print to FILE the SCOP, at some VERBOSITY level.  */
-
-void
-print_scop (FILE *file, scop_p scop, int verbosity)
-{
-  int i;
-  poly_bb_p pbb;
-
-  print_scop_header (file, scop, verbosity);
 
   FOR_EACH_VEC_ELT (poly_bb_p, SCOP_BBS (scop), i, pbb)
     print_pbb (file, pbb, verbosity);