summaryrefslogtreecommitdiff
path: root/gcc/tree-data-ref.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-data-ref.c')
-rw-r--r--gcc/tree-data-ref.c62
1 files changed, 0 insertions, 62 deletions
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c
index 45682462946..bbfc32154ef 100644
--- a/gcc/tree-data-ref.c
+++ b/gcc/tree-data-ref.c
@@ -5403,65 +5403,3 @@ have_similar_memory_accesses (gimple s1, gimple s2)
VEC_free (data_ref_loc, heap, refs2);
return res;
}
-
-/* Helper function for the hashtab. */
-
-static int
-have_similar_memory_accesses_1 (const void *s1, const void *s2)
-{
- return have_similar_memory_accesses (CONST_CAST_GIMPLE ((const_gimple) s1),
- CONST_CAST_GIMPLE ((const_gimple) s2));
-}
-
-/* Helper function for the hashtab. */
-
-static hashval_t
-ref_base_address_1 (const void *s)
-{
- gimple stmt = CONST_CAST_GIMPLE ((const_gimple) s);
- unsigned i;
- VEC (data_ref_loc, heap) *refs;
- data_ref_loc *ref;
- hashval_t res = 0;
-
- get_references_in_stmt (stmt, &refs);
-
- FOR_EACH_VEC_ELT (data_ref_loc, refs, i, ref)
- if (!ref->is_read)
- {
- res = htab_hash_pointer (ref_base_address (stmt, ref));
- break;
- }
-
- VEC_free (data_ref_loc, heap, refs);
- return res;
-}
-
-/* Try to remove duplicated write data references from STMTS. */
-
-void
-remove_similar_memory_refs (VEC (gimple, heap) **stmts)
-{
- unsigned i;
- gimple stmt;
- htab_t seen = htab_create (VEC_length (gimple, *stmts), ref_base_address_1,
- have_similar_memory_accesses_1, NULL);
-
- for (i = 0; VEC_iterate (gimple, *stmts, i, stmt); )
- {
- void **slot;
-
- slot = htab_find_slot (seen, stmt, INSERT);
-
- if (*slot)
- VEC_ordered_remove (gimple, *stmts, i);
- else
- {
- *slot = (void *) stmt;
- i++;
- }
- }
-
- htab_delete (seen);
-}
-