aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAditya Kumar <aditya.k7@samsung.com>2015-10-06 20:50:29 +0000
committerSebastian Pop <spop@gcc.gnu.org>2015-10-06 20:50:29 +0000
commit790befae61a1f5a84ab2eded7d828c14528641ba (patch)
treedbfdccad0353c1dbb9221439c344d39409e3f139 /gcc
parent4fd0b1760dcdbadac9514858a6f96a51dc25226d (diff)
downloadgcc-790befae61a1f5a84ab2eded7d828c14528641ba.zip
gcc-790befae61a1f5a84ab2eded7d828c14528641ba.tar.gz
gcc-790befae61a1f5a84ab2eded7d828c14528641ba.tar.bz2
remove unused struct base_alias_pair
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. Co-Authored-By: Sebastian Pop <s.pop@samsung.com> From-SVN: r228544
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog12
-rw-r--r--gcc/graphite-poly.c18
-rw-r--r--gcc/graphite-poly.h6
-rw-r--r--gcc/graphite-sese-to-poly.c29
-rw-r--r--gcc/tree-data-ref.c1
-rw-r--r--gcc/tree-data-ref.h3
6 files changed, 20 insertions, 49 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index fe1eea0..eac9644 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,6 +1,18 @@
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>
+
* graphite-poly.c (new_poly_dr): Remove dr_base_object_set.
Do not set PDR_BASE_OBJECT_SET.
* graphite-poly.h (poly_dr): Same.
diff --git a/gcc/graphite-poly.c b/gcc/graphite-poly.c
index 7de0e81..52d0765 100644
--- a/gcc/graphite-poly.c
+++ b/gcc/graphite-poly.c
@@ -273,29 +273,11 @@ new_gimple_poly_bb (basic_block bb, vec<data_reference_p> drs)
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 ();
diff --git a/gcc/graphite-poly.h b/gcc/graphite-poly.h
index 3c4353d..418af6e 100644
--- a/gcc/graphite-poly.h
+++ b/gcc/graphite-poly.h
@@ -417,12 +417,6 @@ struct scop
#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>);
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index 235c911..40b598d 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -932,16 +932,9 @@ build_scop_iteration_domain (scop_p scop)
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);
@@ -1086,11 +1079,7 @@ build_poly_dr (data_reference_p dr, poly_bb_p pbb)
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);
@@ -1130,18 +1119,8 @@ build_alias_set (vec<data_reference_p> drs)
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);
}
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c
index e7087d7..0ffa1db 100644
--- a/gcc/tree-data-ref.c
+++ b/gcc/tree-data-ref.c
@@ -1080,6 +1080,7 @@ create_data_ref (loop_p nest, loop_p loop, tree memref, gimple *stmt,
DR_STMT (dr) = stmt;
DR_REF (dr) = memref;
DR_IS_READ (dr) = is_read;
+ dr->alias_set = 0;
dr_analyze_innermost (dr, nest);
dr_analyze_indices (dr, nest, loop);
diff --git a/gcc/tree-data-ref.h b/gcc/tree-data-ref.h
index 4c9e357..e6f82ff 100644
--- a/gcc/tree-data-ref.h
+++ b/gcc/tree-data-ref.h
@@ -127,6 +127,9 @@ struct data_reference
/* Alias information for the data reference. */
struct dr_alias alias;
+
+ /* The alias set for this data reference. */
+ int alias_set;
};
#define DR_STMT(DR) (DR)->stmt