diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-06-04 09:00:21 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-06-04 09:00:21 +0000 |
commit | 54459dd6822c5750bac14c9940dc40101f282bf6 (patch) | |
tree | c9484b42ae7ecc4f94ed5074f51c6f5dd55b960d /gcc/tree-data-ref.c | |
parent | 05c9fb04e880dc110d38a56130d207cdac0bbef6 (diff) | |
download | gcc-54459dd6822c5750bac14c9940dc40101f282bf6.tar.gz |
2012-06-04 Richard Guenther <rguenther@suse.de>
* tree-data-ref.c (have_similar_memory_accesses_1): Remove.
(ref_base_address_1): Likewise.
(remove_similar_memory_refs): Likewise.
* tree-data-ref.h (remove_similar_memory_refs): Remove.
* tree-loop-distribution.c (classify_partition): Do not classify
as builtin if -ftree-loop-distribute-patterns is not enabled.
(fuse_partitions_with_similar_memory_accesses): Inline ...
(ldist_gen): ... here. Fuse all non-builtin partitions if
-ftree-loop-distribution is not enabled. Properly return
the number of created partitions. Do not update SSA form here
but ...
(tree_loop_distribution): ... once here for the whole function.
Only walk innermost loops, constrain loops we consider here
further. Do not call remove_similar_memory_refs.
(distribute_loop): Do not check number of loop nodes here.
* gcc.dg/tree-ssa/ldist-11.c: Enable -ftree-loop-distribute-patterns.
* gcc.dg/tree-ssa/ldist-17.c: Likewise.
* gcc.dg/tree-ssa/ldist-pr45948.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188168 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-data-ref.c')
-rw-r--r-- | gcc/tree-data-ref.c | 62 |
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); -} - |