Undo changes to the PDR representation.
2009-08-11 Sebastian Pop <sebastian.pop@amd.com> * graphite-interchange.c (compute_array_size): Remove use of PDR_DATA_CONTAINER. * graphite-poly.c (new_poly_dr): Remove argument data_container. Do not initialize PDR_DATA_CONTAINER. (print_pdr): Do not print PDR_DATA_CONTAINER. * graphite-poly.h (struct poly_dr): Remove data_container field. (PDR_DATA_CONTAINER): Removed. * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of PDR_DATA_CONTAINER. (build_poly_dr): Same. From-SVN: r150689
This commit is contained in:
parent
273c5dd38b
commit
66096911fd
|
@ -1,3 +1,16 @@
|
|||
2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
|
||||
|
||||
* graphite-interchange.c (compute_array_size): Remove use of
|
||||
PDR_DATA_CONTAINER.
|
||||
* graphite-poly.c (new_poly_dr): Remove argument data_container.
|
||||
Do not initialize PDR_DATA_CONTAINER.
|
||||
(print_pdr): Do not print PDR_DATA_CONTAINER.
|
||||
* graphite-poly.h (struct poly_dr): Remove data_container field.
|
||||
(PDR_DATA_CONTAINER): Removed.
|
||||
* graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
|
||||
PDR_DATA_CONTAINER.
|
||||
(build_poly_dr): Same.
|
||||
|
||||
2009-08-12 Konrad Trifunovic <konrad.trifunovic@gmail.com>
|
||||
Sebastian Pop <sebastian.pop@amd.com>
|
||||
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
|
||||
|
||||
* graphite-interchange.c (compute_array_size): Remove use of
|
||||
PDR_DATA_CONTAINER.
|
||||
* graphite-poly.c (new_poly_dr): Remove argument data_container.
|
||||
Do not initialize PDR_DATA_CONTAINER.
|
||||
(print_pdr): Do not print PDR_DATA_CONTAINER.
|
||||
* graphite-poly.h (struct poly_dr): Remove data_container field.
|
||||
(PDR_DATA_CONTAINER): Removed.
|
||||
* graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
|
||||
PDR_DATA_CONTAINER.
|
||||
(build_poly_dr): Same.
|
||||
|
||||
2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
|
||||
|
||||
* testsuite/gcc.dg/graphite/interchange-9.c: New.
|
||||
|
|
|
@ -174,7 +174,7 @@ compute_array_size_poly (poly_dr_p pdr, ppl_dimension_type sub_dim, Value array_
|
|||
static void
|
||||
compute_array_size (poly_dr_p pdr, ppl_dimension_type sub_dim, Value array_size)
|
||||
{
|
||||
ppl_Pointset_Powerset_C_Polyhedron_t data_container = PDR_DATA_CONTAINER (pdr);
|
||||
ppl_Pointset_Powerset_C_Polyhedron_t data_container = PDR_ACCESSES (pdr);
|
||||
ppl_Pointset_Powerset_C_Polyhedron_iterator_t it, end;
|
||||
Value val;
|
||||
|
||||
|
|
|
@ -269,14 +269,12 @@ apply_poly_transforms (scop_p scop)
|
|||
void
|
||||
new_poly_dr (poly_bb_p pbb,
|
||||
ppl_Pointset_Powerset_C_Polyhedron_t accesses,
|
||||
ppl_Pointset_Powerset_C_Polyhedron_t data_container,
|
||||
enum POLY_DR_TYPE type, void *cdr)
|
||||
{
|
||||
poly_dr_p pdr = XNEW (struct poly_dr);
|
||||
|
||||
PDR_PBB (pdr) = pbb;
|
||||
PDR_ACCESSES (pdr) = accesses;
|
||||
PDR_DATA_CONTAINER (pdr) = data_container;
|
||||
PDR_TYPE (pdr) = type;
|
||||
PDR_CDR (pdr) = cdr;
|
||||
VEC_safe_push (poly_dr_p, heap, PBB_DRS (pbb), pdr);
|
||||
|
@ -288,8 +286,6 @@ void
|
|||
free_poly_dr (poly_dr_p pdr)
|
||||
{
|
||||
ppl_delete_Pointset_Powerset_C_Polyhedron (PDR_ACCESSES (pdr));
|
||||
ppl_delete_Pointset_Powerset_C_Polyhedron (PDR_DATA_CONTAINER (pdr));
|
||||
|
||||
XDELETE (pdr);
|
||||
}
|
||||
|
||||
|
@ -390,11 +386,6 @@ print_pdr (FILE *file, poly_dr_p pdr)
|
|||
ppl_print_powerset_matrix (file, PDR_ACCESSES (pdr));
|
||||
fprintf (file, ")\n");
|
||||
|
||||
fprintf (file, "data container (\n");
|
||||
print_pdr_access_layout (file, pdr);
|
||||
ppl_print_powerset_matrix (file, PDR_DATA_CONTAINER (pdr));
|
||||
fprintf (file, ")\n");
|
||||
|
||||
fprintf (file, ")\n");
|
||||
}
|
||||
|
||||
|
|
|
@ -101,12 +101,8 @@ struct poly_dr
|
|||
| 0 0 0 1 0 0 -5 = 0
|
||||
|-1 0 0 0 1 0 0 = 0
|
||||
| 0 -1 -1 0 0 1 0 = 0
|
||||
|
||||
The constraints on the data container A[1335][123] are:
|
||||
|
||||
| i j k a s0 s1 1
|
||||
| 0 0 0 0 1 0 0 >= 0
|
||||
| 0 0 0 0 0 1 0 >= 0
|
||||
| 0 0 0 0 1 0 0 >= 0 # The last four lines describe the
|
||||
| 0 0 0 0 0 1 0 >= 0 # array size.
|
||||
| 0 0 0 0 -1 0 1335 >= 0
|
||||
| 0 0 0 0 0 -1 123 >= 0
|
||||
|
||||
|
@ -132,17 +128,14 @@ struct poly_dr
|
|||
| i j k a 1
|
||||
| 0 0 0 -1 15 = 0 */
|
||||
ppl_Pointset_Powerset_C_Polyhedron_t accesses;
|
||||
ppl_Pointset_Powerset_C_Polyhedron_t data_container;
|
||||
};
|
||||
|
||||
#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_DATA_CONTAINER(PDR) (PDR->data_container)
|
||||
|
||||
void new_poly_dr (poly_bb_p, ppl_Pointset_Powerset_C_Polyhedron_t,
|
||||
ppl_Pointset_Powerset_C_Polyhedron_t,
|
||||
enum POLY_DR_TYPE, void *);
|
||||
void free_poly_dr (poly_dr_p);
|
||||
void debug_pdr (poly_dr_p);
|
||||
|
|
|
@ -1643,12 +1643,12 @@ pdr_add_memory_accesses (ppl_Polyhedron_t accesses, data_reference_p dr,
|
|||
}
|
||||
|
||||
/* Add constrains representing the size of the accessed data to the
|
||||
DATA_CONTAINER polyhedron. ACCESSP_NB_DIMS is the dimension of the
|
||||
DATA_CONTAINER polyhedron, DOM_NB_DIMS is the dimension of the iteration
|
||||
ACCESSES polyhedron. ACCESSP_NB_DIMS is the dimension of the
|
||||
ACCESSES polyhedron, DOM_NB_DIMS is the dimension of the iteration
|
||||
domain. */
|
||||
|
||||
static void
|
||||
pdr_add_data_dimensions (ppl_Polyhedron_t data_container, data_reference_p dr,
|
||||
pdr_add_data_dimensions (ppl_Polyhedron_t accesses, data_reference_p dr,
|
||||
ppl_dimension_type accessp_nb_dims,
|
||||
ppl_dimension_type dom_nb_dims)
|
||||
{
|
||||
|
@ -1674,7 +1674,7 @@ pdr_add_data_dimensions (ppl_Polyhedron_t data_container, data_reference_p dr,
|
|||
ppl_new_Linear_Expression_with_dimension (&expr, accessp_nb_dims);
|
||||
ppl_set_coef (expr, subscript, 1);
|
||||
ppl_new_Constraint (&cstr, expr, PPL_CONSTRAINT_TYPE_GREATER_OR_EQUAL);
|
||||
ppl_Polyhedron_add_constraint (data_container, cstr);
|
||||
ppl_Polyhedron_add_constraint (accesses, cstr);
|
||||
ppl_delete_Linear_Expression (expr);
|
||||
ppl_delete_Constraint (cstr);
|
||||
|
||||
|
@ -1692,7 +1692,7 @@ pdr_add_data_dimensions (ppl_Polyhedron_t data_container, data_reference_p dr,
|
|||
ppl_set_inhomogeneous (expr, int_cst_value (array_size) / elt_size);
|
||||
|
||||
ppl_new_Constraint (&cstr, expr, PPL_CONSTRAINT_TYPE_GREATER_OR_EQUAL);
|
||||
ppl_Polyhedron_add_constraint (data_container, cstr);
|
||||
ppl_Polyhedron_add_constraint (accesses, cstr);
|
||||
ppl_delete_Linear_Expression (expr);
|
||||
ppl_delete_Constraint (cstr);
|
||||
|
||||
|
@ -1705,8 +1705,8 @@ pdr_add_data_dimensions (ppl_Polyhedron_t data_container, data_reference_p dr,
|
|||
static void
|
||||
build_poly_dr (data_reference_p dr, poly_bb_p pbb)
|
||||
{
|
||||
ppl_Polyhedron_t accesses, data_container;
|
||||
ppl_Pointset_Powerset_C_Polyhedron_t accesses_ps, data_container_ps;
|
||||
ppl_Polyhedron_t accesses;
|
||||
ppl_Pointset_Powerset_C_Polyhedron_t accesses_ps;
|
||||
ppl_dimension_type dom_nb_dims;
|
||||
ppl_dimension_type accessp_nb_dims;
|
||||
|
||||
|
@ -1715,21 +1715,15 @@ build_poly_dr (data_reference_p dr, poly_bb_p pbb)
|
|||
accessp_nb_dims = dom_nb_dims + 1 + DR_NUM_DIMENSIONS (dr);
|
||||
|
||||
ppl_new_C_Polyhedron_from_space_dimension (&accesses, accessp_nb_dims, 0);
|
||||
ppl_new_C_Polyhedron_from_space_dimension (&data_container,
|
||||
accessp_nb_dims, 0);
|
||||
|
||||
pdr_add_alias_set (accesses, dr, accessp_nb_dims, dom_nb_dims);
|
||||
pdr_add_memory_accesses (accesses, dr, accessp_nb_dims, dom_nb_dims, pbb);
|
||||
pdr_add_data_dimensions (data_container, dr, accessp_nb_dims, dom_nb_dims);
|
||||
pdr_add_data_dimensions (accesses, dr, accessp_nb_dims, dom_nb_dims);
|
||||
|
||||
ppl_new_Pointset_Powerset_C_Polyhedron_from_C_Polyhedron (&accesses_ps,
|
||||
accesses);
|
||||
ppl_new_Pointset_Powerset_C_Polyhedron_from_C_Polyhedron (&data_container_ps,
|
||||
data_container);
|
||||
ppl_delete_Polyhedron (accesses);
|
||||
ppl_delete_Polyhedron (data_container);
|
||||
new_poly_dr (pbb, accesses_ps, data_container_ps,
|
||||
DR_IS_READ (dr) ? PDR_READ : PDR_WRITE, dr);
|
||||
new_poly_dr (pbb, accesses_ps, DR_IS_READ (dr) ? PDR_READ : PDR_WRITE, dr);
|
||||
}
|
||||
|
||||
/* Group each data reference in DRS with it's alias set num. */
|
||||
|
|
Loading…
Reference in New Issue