+2015-10-06 Aditya Kumar <aditya.k7@samsung.com>
+ Sebastian Pop <s.pop@samsung.com>
+
+ * graphite-poly.c (free_data_refs_aux): Remove.
+ (free_gimple_poly_bb): Do not call free_data_refs_aux.
+ * graphite-poly.h (struct base_alias_pair): Remove.
+ * graphite-sese-to-poly.c (pdr_add_alias_set): Remove all uses of
+ base_alias_pair and dr->aux.
+ (build_alias_set): Same.
+ * tree-data-ref.c (create_data_ref): Initialize alias_set.
+ * tree-data-ref.h (data_reference): Add alias_set.
+
2015-10-06 Aditya Kumar <aditya.k7@samsung.com>
Sebastian Pop <s.pop@samsung.com>
return gbb;
}
-static void
-free_data_refs_aux (vec<data_reference_p> datarefs)
-{
- unsigned int i;
- data_reference_p dr;
-
- FOR_EACH_VEC_ELT (datarefs, i, dr)
- if (dr->aux)
- {
- base_alias_pair_p bap = (base_alias_pair_p)(dr->aux);
-
- free (bap->alias_set);
-
- free (bap);
- dr->aux = NULL;
- }
-}
/* Frees GBB. */
void
free_gimple_poly_bb (gimple_poly_bb_p gbb)
{
- free_data_refs_aux (GBB_DATA_REFS (gbb));
free_data_refs (GBB_DATA_REFS (gbb));
GBB_CONDITIONS (gbb).release ();
#define SCOP_CONTEXT(S) (NULL)
#define POLY_SCOP_P(S) (S->poly_scop_p)
-typedef struct base_alias_pair
-{
- int base_obj_set;
- int *alias_set;
-} *base_alias_pair_p;
-
extern scop_p new_scop (edge, edge);
extern void free_scop (scop_p);
extern gimple_poly_bb_p new_gimple_poly_bb (basic_block, vec<data_reference_p>);
static isl_map *
pdr_add_alias_set (isl_map *acc, data_reference_p dr)
{
- isl_constraint *c;
- int alias_set_num = 0;
- base_alias_pair *bap = (base_alias_pair *)(dr->aux);
-
- if (bap && bap->alias_set)
- alias_set_num = *(bap->alias_set);
-
- c = isl_equality_alloc
+ isl_constraint *c = isl_equality_alloc
(isl_local_space_from_space (isl_map_get_space (acc)));
- c = isl_constraint_set_constant_si (c, -alias_set_num);
+ c = isl_constraint_set_constant_si (c, -dr->alias_set);
c = isl_constraint_set_coefficient_si (c, isl_dim_out, 0, 1);
return isl_map_add_constraint (acc, c);
isl_id *id = isl_id_for_dr (scop, dr);
int nb = 1 + DR_NUM_DIMENSIONS (dr);
isl_space *space = isl_space_set_alloc (scop->isl_context, 0, nb);
- int alias_set_num = 0;
- base_alias_pair *bap = (base_alias_pair *)(dr->aux);
-
- if (bap && bap->alias_set)
- alias_set_num = *(bap->alias_set);
+ int alias_set_num = dr->alias_set;
space = isl_space_set_tuple_id (space, isl_dim_set, id);
subscript_sizes = isl_set_nat_universe (space);
graphds_dfs (g, all_vertices, num_vertices, NULL, true, NULL);
free (all_vertices);
- data_reference_p dr;
- FOR_EACH_VEC_ELT (drs, i, dr)
- dr->aux = XNEW (base_alias_pair);
-
for (i = 0; i < g->n_vertices; i++)
- {
- data_reference_p dr = drs[i];
- base_alias_pair *bap = (base_alias_pair *)(dr->aux);
- bap->alias_set = XNEW (int);
- int c = g->vertices[i].component + 1;
- *(bap->alias_set) = c;
- }
+ drs[i]->alias_set = g->vertices[i].component + 1;
free_graph (g);
}