OSDN Git Service

* config/rs6000/rs6000.c (spe_init_builtins): Call
[pf3gnuchains/gcc-fork.git] / gcc / graphite-cloog-compat.h
index f27ee5a..011377d 100644 (file)
@@ -1,6 +1,6 @@
 /* Compatibility layer for using upstream CLooG versions with
    CLooG legacy code.
-   Copyright (C) 2010 Free Software Foundation, Inc.
+   Copyright (C) 2010, 2011 Free Software Foundation, Inc.
    Contributed by Andreas Simbuerger <simbuerg@fim.uni-passau.de>.
 
 This file is part of GCC.
@@ -29,11 +29,16 @@ typedef const struct clast_expr *clast_name_p;
 typedef const char *clast_name_p;
 #endif
 
+#ifdef CLOOG_ORG
+#define cloog_initialize()
+#define cloog_finalize()
+#endif
+
 #ifndef CLOOG_ORG
 
 /* CloogOptions compatibility.  */
-#define build_cloog_prog(SCOP, PROG, OPT, STATE)\
-  build_cloog_prog (SCOP, PROG, STATE)
+#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)\
@@ -58,6 +63,18 @@ typedef const char *clast_name_p;
   new_Cloog_Domain_from_ppl_Polyhedron (POLY)
 #define cloog_domain_from_cloog_matrix(STATE, MAT, NB)\
   cloog_domain_matrix2domain (MAT)
+
+/* CloogScatteringList compatibility.  */
+#define CloogScatteringList CloogDomainList
+#define CloogScattering CloogDomain
+#define cloog_set_next_scattering cloog_set_next_domain
+#define cloog_set_scattering cloog_set_domain
+#define cloog_scattering cloog_domain
+#define cloog_next_scattering cloog_next_domain
+#define cloog_scattering_free cloog_domain_free
+#define cloog_program_dump_cloog(DUMPFILE, PROGRAM, SCATTERINGLIST)\
+  cloog_program_dump_cloog (DUMPFILE, PROGRAM)
+
 #endif
 
 /* Adapt CLooG accessors from CLooG legacy to
@@ -71,28 +88,28 @@ cloog_statement_usr (CloogStatement *cs)
   return cs->usr;
 }
 
-static inline CloogDomain *
-cloog_domain (CloogDomainList *dl)
+static inline CloogScattering *
+cloog_scattering (CloogScatteringList *sl)
 {
-  return dl->domain;
+  return sl->scatt;
 }
 
 static inline void
-cloog_set_domain (CloogDomainList *dl, CloogDomain *domain)
+cloog_set_scattering (CloogScatteringList *sl, CloogScattering *scatt)
 {
-  dl->domain = domain;
+  sl->scatt = scatt;
 }
 
-static inline CloogDomainList *
-cloog_next_domain (CloogDomainList *dl)
+static inline CloogScatteringList *
+cloog_next_scattering (CloogScatteringList *sl)
 {
-  return dl->next;
+  return sl->next;
 }
 
 static inline void
-cloog_set_next_domain (CloogDomainList *dl, CloogDomainList *next)
+cloog_set_next_scattering (CloogScatteringList *sl, CloogScatteringList *next)
 {
-  dl->next = next;
+  sl->next = next;
 }
 
 static inline int
@@ -244,5 +261,15 @@ cloog_block_list_set_block (CloogBlockList *bl, CloogBlock *block)
 {
   bl->block = block;
 }
+
+static inline int cloog_matrix_ncolumns (CloogMatrix * m)
+{
+  return m->NbColumns;
+}
+
+static inline int cloog_matrix_nrows (CloogMatrix * m)
+{
+   return m->NbRows;
+}
 #endif /* CLOOG_ORG  */
 #endif /* GRAPHITE_CLOOG_COMPAT_H  */