]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Make CLooG options compatible to newer CLooG releases and pass options to build_cloog...
authorAndreas Simbuerger <simbuerg@fim.uni-passau.de>
Wed, 11 Aug 2010 20:30:26 +0000 (20:30 +0000)
committerSebastian Pop <spop@gcc.gnu.org>
Wed, 11 Aug 2010 20:30:26 +0000 (20:30 +0000)
2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>

* graphite-clast-to-gimple.c (set_cloog_options): Make CLooG options
compatible to newer CLooG releases (CLOOG_ORG).
(build_cloog_prog): Pass CloogOptions to more functions (CLOOG_ORG).
(scop_to_clast): Pass CloogOptions to build_cloog_prog (CLOOG_ORG).
* graphite-cloog-compat.h: Add compatibility macros for CLooG Legacy.
(build_cloog_prog) : New.
(cloog_program_extract_scalars): New.
(cloog_program_scatter): New.

From-SVN: r163162

gcc/ChangeLog
gcc/ChangeLog.graphite
gcc/graphite-clast-to-gimple.c
gcc/graphite-cloog-compat.h

index 35ecb891050348cba2b59404403a840f71f54980..23c82406614e360213a4aff9986a9f046154aac7 100644 (file)
@@ -1,3 +1,14 @@
+2010-08-02  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
+
+       * graphite-clast-to-gimple.c (set_cloog_options): Make CLooG options
+       compatible to newer CLooG releases (CLOOG_ORG).
+       (build_cloog_prog): Pass CloogOptions to more functions (CLOOG_ORG).
+       (scop_to_clast): Pass CloogOptions to build_cloog_prog (CLOOG_ORG).
+       * graphite-cloog-compat.h: Add compatibility macros for CLooG Legacy.
+       (build_cloog_prog) : New.
+       (cloog_program_extract_scalars): New.
+       (cloog_program_scatter): New.
+
 2010-08-02  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
 
        * graphite-clast-to-gimple.c: Include graphite-cloog-compat.h
index cfc3c7a4d6ce51209f413c518536812788c6ab5f..6361c49413b4e8120f83fc11c7063cc29e06e2c8 100644 (file)
@@ -1,3 +1,14 @@
+2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
+
+       * graphite-clast-to-gimple.c (set_cloog_options): Make CLooG options
+       compatible to newer CLooG releases (CLOOG_ORG).
+       (build_cloog_prog): Pass CloogOptions to more functions (CLOOG_ORG).
+       (scop_to_clast): Pass CloogOptions to build_cloog_prog (CLOOG_ORG).
+       * graphite-cloog-compat.h: Add compatibility macros for CLooG Legacy.
+       (build_cloog_prog) : New.
+       (cloog_program_extract_scalars): New.
+       (cloog_program_scatter): New.
+
 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
 
        * graphite-clast-to-gimple.c: Include graphite-cloog-compat.h
index 89a182c00ac643222d4c924bff666fef2e8776ee..a611ca782e5b106670e26f144be199773892ec75 100644 (file)
@@ -1198,7 +1198,7 @@ initialize_cloog_names (scop_p scop, CloogProgram *prog)
 /* Build cloog program for SCoP.  */
 
 static void
-build_cloog_prog (scop_p scop, CloogProgram *prog)
+build_cloog_prog (scop_p scop, CloogProgram *prog, CloogOptions *options)
 {
   int i;
   int max_nb_loops = scop_max_loop_depth (scop);
@@ -1277,10 +1277,10 @@ build_cloog_prog (scop_p scop, CloogProgram *prog)
   cloog_program_set_scaldims (prog, scaldims);
 
   /* Extract scalar dimensions to simplify the code generation problem.  */
-  cloog_program_extract_scalars (prog, scattering);
+  cloog_program_extract_scalars (prog, scattering, options);
 
   /* Apply scattering.  */
-  cloog_program_scatter (prog, scattering);
+  cloog_program_scatter (prog, scattering, options);
   free_scattering (scattering);
 
   /* Iterators corresponding to scalar dimensions have to be extracted.  */
@@ -1321,9 +1321,14 @@ set_cloog_options (void)
      GLooG.  */
   options->esp = 1;
 
+#ifdef CLOOG_ORG
+  /* Silence CLooG to avoid failing tests due to debug output to stderr.  */
+  options->quiet = 1;
+#else
   /* Enable C pretty-printing mode: normalizes the substitution
      equations for statements.  */
   options->cpp = 1;
+#endif
 
   /* Allow cloog to build strides with a stride width different to one.
      This example has stride = 4:
@@ -1378,7 +1383,7 @@ scop_to_clast (scop_p scop)
 
   /* Connect new cloog prog generation to graphite.  */
   pc.prog = cloog_program_malloc ();
-  build_cloog_prog (scop, pc.prog);
+  build_cloog_prog (scop, pc.prog, options);
   pc.prog = cloog_program_generate (pc.prog, options);
   pc.stmt = cloog_clast_create (pc.prog, options);
 
index 44f7157c40095ad41dd123f97724c2481d05d3e5..6608318367676c157cc52b243ec5ad2b5752559f 100644 (file)
@@ -22,6 +22,18 @@ along with GCC; see the file COPYING3.  If not see
 #ifndef GRAPHITE_CLOOG_COMPAT_H
 #define GRAPHITE_CLOOG_COMPAT_H
 
+/* Restore compatibility to CLooG Legacy.  */
+#ifndef CLOOG_ORG
+
+/* CloogOptions compatibility.  */
+#define build_cloog_prog(SCOP, PROG, OPT) build_cloog_prog (SCOP, PROG)
+#define cloog_program_extract_scalars(PROG, SCATT, OPT)\
+  cloog_program_extract_scalars (PROG, SCATT)
+#define cloog_program_scatter(PROG, SCATT, OPT)\
+  cloog_program_scatter (PROG, SCATT)
+
+#endif
+
 /* Adapt CLooG accessors from CLooG legacy to
    newer CLooG versions.  */