aboutsummaryrefslogtreecommitdiff
path: root/gcc/graphite-poly.h
diff options
context:
space:
mode:
authorSebastian Pop <sebastian.pop@amd.com>2009-08-12 14:27:33 +0000
committerSebastian Pop <spop@gcc.gnu.org>2009-08-12 14:27:33 +0000
commit25d7cc15a898555ce427133cbf620ee1b9dea18b (patch)
tree693f3fed676c9442115de315fe7587dec80d797e /gcc/graphite-poly.h
parent66096911fd4c37da10f7ddf3388867acf29451ee (diff)
downloadgcc-25d7cc15a898555ce427133cbf620ee1b9dea18b.zip
gcc-25d7cc15a898555ce427133cbf620ee1b9dea18b.tar.gz
gcc-25d7cc15a898555ce427133cbf620ee1b9dea18b.tar.bz2
Add PDR->nb_subscripts.
2009-08-11 Sebastian Pop <sebastian.pop@amd.com> * graphite-dependences.c (dependence_polyhedron_1): Replace pdr_nb_subscripts with PDR_NB_SUBSCRIPTS. (graphite_legal_transform_dr): Same. (graphite_carried_dependence_level_k): Same. * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts. Initialize PDR_NB_SUBSCRIPTS. (print_pdr_access_layout): Replace pdr_nb_subscripts with PDR_NB_SUBSCRIPTS. * graphite-poly.h (struct poly_dr): Add nb_subscripts field. (PDR_NB_SUBSCRIPTS): New. (pdr_nb_subscripts): Removed. (pdr_dim): Simplified. * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts with PDR_NB_SUBSCRIPTS. From-SVN: r150690
Diffstat (limited to 'gcc/graphite-poly.h')
-rw-r--r--gcc/graphite-poly.h35
1 files changed, 13 insertions, 22 deletions
diff --git a/gcc/graphite-poly.h b/gcc/graphite-poly.h
index c6d902a..4459315 100644
--- a/gcc/graphite-poly.h
+++ b/gcc/graphite-poly.h
@@ -92,12 +92,12 @@ struct poly_dr
| p = A;
| ... = p[?][?];
| for j
- | A[i][j+b] = m;
+ | A[i][j+k] = m;
| }
The data access A[i][j+k] in alias set "5" is described like this:
- | i j k a s0 s1 1
+ | i j k a s0 s1 1
| 0 0 0 1 0 0 -5 = 0
|-1 0 0 0 1 0 0 = 0
| 0 -1 -1 0 0 1 0 = 0
@@ -110,13 +110,13 @@ struct poly_dr
polyhedron:
- | i k a s0 1
+ | i k a s0 1
| 0 0 1 0 -5 = 0
| 0 0 0 1 0 >= 0
"or"
- | i k a s0 1
+ | i k a s0 1
| 0 0 1 0 -7 = 0
| 0 0 0 1 0 >= 0
@@ -128,31 +128,33 @@ struct poly_dr
| i j k a 1
| 0 0 0 -1 15 = 0 */
ppl_Pointset_Powerset_C_Polyhedron_t accesses;
+
+ /* The number of subscripts. */
+ graphite_dim_t nb_subscripts;
};
#define PDR_CDR(PDR) (PDR->compiler_dr)
#define PDR_PBB(PDR) (PDR->pbb)
#define PDR_TYPE(PDR) (PDR->type)
#define PDR_ACCESSES(PDR) (PDR->accesses)
+#define PDR_NB_SUBSCRIPTS(PDR) (PDR->nb_subscripts)
void new_poly_dr (poly_bb_p, ppl_Pointset_Powerset_C_Polyhedron_t,
- enum POLY_DR_TYPE, void *);
+ enum POLY_DR_TYPE, void *, int);
void free_poly_dr (poly_dr_p);
void debug_pdr (poly_dr_p);
void print_pdr (FILE *, poly_dr_p);
static inline scop_p pdr_scop (poly_dr_p pdr);
-/* The number of subscripts of the PDR. */
+/* The dimension of the PDR_ACCESSES polyhedron of PDR. */
-static inline graphite_dim_t
-pdr_nb_subscripts (poly_dr_p pdr)
+static inline ppl_dimension_type
+pdr_dim (poly_dr_p pdr)
{
- poly_bb_p pbb = PDR_PBB (pdr);
ppl_dimension_type dim;
-
ppl_Pointset_Powerset_C_Polyhedron_space_dimension (PDR_ACCESSES (pdr),
&dim);
- return dim - pbb_dim_iter_domain (pbb) - pbb_nb_params (pbb) - 1;
+ return dim;
}
/* The dimension of the iteration domain of the scop of PDR. */
@@ -171,17 +173,6 @@ pdr_nb_params (poly_dr_p pdr)
return scop_nb_params (pdr_scop (pdr));
}
-/* The dimension of the accesses polyhedron of PDR. */
-
-static inline graphite_dim_t
-pdr_dim (poly_dr_p pdr)
-{
- graphite_dim_t alias_nb_dimensions = 1;
-
- return pbb_dim_iter_domain (PDR_PBB (pdr)) + alias_nb_dimensions
- + pdr_nb_subscripts (pdr) + scop_nb_params (pdr_scop (pdr));
-}
-
/* The dimension of the alias set in PDR. */
static inline ppl_dimension_type