summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2010-08-11 20:30:49 +0000
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2010-08-11 20:30:49 +0000
commit04b8cadbd8f0d01ab7d38ed6c44c4445f4948bef (patch)
tree10ff642cb81c3eff319faa2e86a57a45bcb69f28 /gcc
parent08a88144982a21f7275eb430fe0448d75a2c580a (diff)
downloadgcc-04b8cadbd8f0d01ab7d38ed6c44c4445f4948bef.tar.gz
Adapt to new CloogScattering abstraction, introduced in official CLooG versions (CLOOG_ORG).
2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de> * graphite-clast-to-gimple.c (free_scattering): Change CloogDomainList/CloogDomain to CloogScatteringList/CloogScattering (CLOOG_ORG). (build_cloog_prog): Same. * graphite-cloog-compat.h (cloog_domain): Removed. (cloog_scattering): New. (cloog_set_domain): Removed. (cloog_set_scattering): New. (cloog_next_domain): Removed. (cloog_next_scattering): New. (cloog_set_next_domain): Removed. (cloog_set_next_scattering): New. (CloogScatteringList): New. (CloogScattering): New. (cloog_scattering_free): New. (new_Cloog_Scattering_from_ppl_Polyhedron): New. * graphite-cloog-util.c (new_Cloog_Scattering_from_ppl_Polyhedron): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163165 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog21
-rw-r--r--gcc/ChangeLog.graphite21
-rw-r--r--gcc/graphite-clast-to-gimple.c25
-rw-r--r--gcc/graphite-cloog-compat.h30
-rw-r--r--gcc/graphite-cloog-util.c21
-rw-r--r--gcc/graphite-cloog-util.h2
6 files changed, 98 insertions, 22 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 37fba311e0a..4a0e3a5f336 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,26 @@
2010-08-02 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
+ * graphite-clast-to-gimple.c (free_scattering): Change
+ CloogDomainList/CloogDomain to CloogScatteringList/CloogScattering
+ (CLOOG_ORG).
+ (build_cloog_prog): Same.
+ * graphite-cloog-compat.h (cloog_domain): Removed.
+ (cloog_scattering): New.
+ (cloog_set_domain): Removed.
+ (cloog_set_scattering): New.
+ (cloog_next_domain): Removed.
+ (cloog_next_scattering): New.
+ (cloog_set_next_domain): Removed.
+ (cloog_set_next_scattering): New.
+ (CloogScatteringList): New.
+ (CloogScattering): New.
+ (cloog_scattering_free): New.
+ (new_Cloog_Scattering_from_ppl_Polyhedron): New.
+ * graphite-cloog-util.c (new_Cloog_Scattering_from_ppl_Polyhedron):
+ New.
+
+2010-08-02 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
+
* graphite-clast-to-gimple.c (build_cloog_prog): Extend with
CloogState.
(set_cloog_options): Same.
diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite
index b5e53b52c15..4916f915256 100644
--- a/gcc/ChangeLog.graphite
+++ b/gcc/ChangeLog.graphite
@@ -1,5 +1,26 @@
2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
+ * graphite-clast-to-gimple.c (free_scattering): Change
+ CloogDomainList/CloogDomain to CloogScatteringList/CloogScattering
+ (CLOOG_ORG).
+ (build_cloog_prog): Same.
+ * graphite-cloog-compat.h (cloog_domain): Removed.
+ (cloog_scattering): New.
+ (cloog_set_domain): Removed.
+ (cloog_set_scattering): New.
+ (cloog_next_domain): Removed.
+ (cloog_next_scattering): New.
+ (cloog_set_next_domain): Removed.
+ (cloog_set_next_scattering): New.
+ (CloogScatteringList): New.
+ (CloogScattering): New.
+ (cloog_scattering_free): New.
+ (new_Cloog_Scattering_from_ppl_Polyhedron): New.
+ * graphite-cloog-util.c (new_Cloog_Scattering_from_ppl_Polyhedron):
+ New.
+
+2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
+
* graphite-clast-to-gimple.c (build_cloog_prog): Extend with
CloogState.
(set_cloog_options): Same.
diff --git a/gcc/graphite-clast-to-gimple.c b/gcc/graphite-clast-to-gimple.c
index 11867cfaf14..138c0df541e 100644
--- a/gcc/graphite-clast-to-gimple.c
+++ b/gcc/graphite-clast-to-gimple.c
@@ -1127,14 +1127,14 @@ translate_clast (sese region, loop_p context_loop, struct clast_stmt *stmt,
/* Free the SCATTERING domain list. */
static void
-free_scattering (CloogDomainList *scattering)
+free_scattering (CloogScatteringList *scattering)
{
while (scattering)
{
- CloogDomain *dom = cloog_domain (scattering);
- CloogDomainList *next = cloog_next_domain (scattering);
+ CloogScattering *dom = cloog_scattering (scattering);
+ CloogScatteringList *next = cloog_next_scattering (scattering);
- cloog_domain_free (dom);
+ cloog_scattering_free (dom);
free (scattering);
scattering = next;
}
@@ -1212,7 +1212,7 @@ build_cloog_prog (scop_p scop, CloogProgram *prog,
poly_bb_p pbb;
CloogLoop *loop_list = NULL;
CloogBlockList *block_list = NULL;
- CloogDomainList *scattering = NULL;
+ CloogScatteringList *scattering = NULL;
int nbs = 2 * max_nb_loops + 1;
int *scaldims;
@@ -1264,17 +1264,18 @@ build_cloog_prog (scop_p scop, CloogProgram *prog,
/* Build scattering list. */
{
/* XXX: Replace with cloog_domain_list_alloc(), when available. */
- CloogDomainList *new_scattering
- = (CloogDomainList *) xmalloc (sizeof (CloogDomainList));
+ CloogScatteringList *new_scattering
+ = (CloogScatteringList *) xmalloc (sizeof (CloogScatteringList));
ppl_Polyhedron_t scat;
- CloogDomain *dom;
+ CloogScattering *dom;
scat = PBB_TRANSFORMED_SCATTERING (pbb);
- dom = new_Cloog_Domain_from_ppl_Polyhedron (scat, scop_nb_params (scop),
- state);
+ dom = new_Cloog_Scattering_from_ppl_Polyhedron
+ (scat, scop_nb_params (scop), pbb_nb_scattering_transform (pbb),
+ state);
- cloog_set_next_domain (new_scattering, scattering);
- cloog_set_domain (new_scattering, dom);
+ cloog_set_next_scattering (new_scattering, scattering);
+ cloog_set_scattering (new_scattering, dom);
scattering = new_scattering;
}
}
diff --git a/gcc/graphite-cloog-compat.h b/gcc/graphite-cloog-compat.h
index f27ee5a1228..56b6bb382cd 100644
--- a/gcc/graphite-cloog-compat.h
+++ b/gcc/graphite-cloog-compat.h
@@ -58,6 +58,16 @@ 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
+
#endif
/* Adapt CLooG accessors from CLooG legacy to
@@ -71,28 +81,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
diff --git a/gcc/graphite-cloog-util.c b/gcc/graphite-cloog-util.c
index 500443fd536..17704580bc0 100644
--- a/gcc/graphite-cloog-util.c
+++ b/gcc/graphite-cloog-util.c
@@ -238,6 +238,27 @@ new_Cloog_Domain_from_ppl_Polyhedron (ppl_const_Polyhedron_t ph, int nb_params,
return res;
}
+/* Create a CloogScattering from polyhedron PH. */
+
+CloogScattering *
+new_Cloog_Scattering_from_ppl_Polyhedron (ppl_const_Polyhedron_t ph,
+ int nb_params ATTRIBUTE_UNUSED,
+ int nb_scatt ATTRIBUTE_UNUSED,
+ CloogState *state ATTRIBUTE_UNUSED)
+{
+#ifdef CLOOG_ORG
+ CloogMatrix *mat = new_Cloog_Matrix_from_ppl_Polyhedron (ph);
+ CloogScattering *res = cloog_scattering_from_cloog_matrix (state, mat,
+ nb_scatt,
+ nb_params);
+
+ cloog_matrix_free (mat);
+ return res;
+#else
+ return new_Cloog_Domain_from_ppl_Polyhedron (ph, nb_params, state);
+#endif
+}
+
/* Creates a CloogDomain from a pointset powerset PS. */
CloogDomain *
diff --git a/gcc/graphite-cloog-util.h b/gcc/graphite-cloog-util.h
index eaa48f33f67..d7758ce197d 100644
--- a/gcc/graphite-cloog-util.h
+++ b/gcc/graphite-cloog-util.h
@@ -27,6 +27,8 @@ along with GCC; see the file COPYING3. If not see
CloogMatrix *new_Cloog_Matrix_from_ppl_Polyhedron (ppl_const_Polyhedron_t);
CloogDomain *new_Cloog_Domain_from_ppl_Polyhedron (ppl_const_Polyhedron_t,
int, CloogState *);
+CloogScattering *new_Cloog_Scattering_from_ppl_Polyhedron
+ (ppl_const_Polyhedron_t, int, int, CloogState *);
CloogDomain * new_Cloog_Domain_from_ppl_Pointset_Powerset
(ppl_Pointset_Powerset_C_Polyhedron_t, int, CloogState *);
void new_C_Polyhedron_from_Cloog_Matrix (ppl_Polyhedron_t *, CloogMatrix *);