This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[graphite] set CLooG's language to C


This is from an email from Tobias Grosser.
Committed to graphite-branch.

Sebastian

The default output language of cloog is FORTRAN. But the FORTRAN output can only
show complete loops with upper/lower bound, otherwise it fails. At the moment we
do not always create valid loops, so switch to C output, as it allows us to see
the incomplete loops in human readable form.

Example output:
for (;graphite_iterator_0<=-1;graphite_iterator_0++) {
  for (graphite_iterator_1=0;graphite_iterator_1<=98;graphite_iterator_1++) {
    for (;;graphite_iterator_2++) {
      S1 ;
    }
  }
}

2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>

	* graphite.c (find_transform): Change cloog output language to C.

--- gcc/graphite.c
+++ gcc/graphite.c
@@ -1294,6 +1294,11 @@ find_transform (scop_p scop)
   CloogProgram *prog;
   struct clast_stmt *stmt;

+  /* Change cloog output language to C.  If we do use FORTRAN instead, cloog
+     will stop e.g. with "ERROR: unbounded loops not allowed in FORTRAN.", if
+     we pass an incomplete program to cloog.  */
+  options->language = LANGUAGE_C;
+
   /* Print the program we insert into cloog. */
   if (dump_file && (dump_flags & TDF_DETAILS))
     {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]