diff options
author | Richard Guenther <rguenther@suse.de> | 2011-08-23 12:40:57 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2011-08-23 12:40:57 +0000 |
commit | 02f5d6c5e36ea6a41e22f39209248bc1039759b7 (patch) | |
tree | ef30b2e656f6d882ebaac0ac1bf93bba51c441f9 /gcc/tree-ssa-loop-im.c | |
parent | 0fcbc86b5586c3c3bc370d43b2dea98108fd9796 (diff) | |
download | gcc-02f5d6c5e36ea6a41e22f39209248bc1039759b7.zip gcc-02f5d6c5e36ea6a41e22f39209248bc1039759b7.tar.gz gcc-02f5d6c5e36ea6a41e22f39209248bc1039759b7.tar.bz2 |
Makefile.in (tree-data-ref.o): Add tree-affine.h dependency.
2011-08-23 Richard Guenther <rguenther@suse.de>
* Makefile.in (tree-data-ref.o): Add tree-affine.h dependency.
* tree-affine.h (aff_comb_cannot_overlap_p): Declare.
* tree-affine.c (aff_comb_cannot_overlap_p): New function, moved
from ...
* tree-ssa-loop-im.c (cannot_overlap_p): ... here.
(mem_refs_may_alias_p): Adjust.
* tree-data-ref.h (dr_may_alias_p): Adjust.
* tree-data-ref.c: Include tree-affine.h.
(dr_analyze_indices): Do nothing for the non-loop case.
(dr_may_alias_p): Distinguish loop and non-loop case. Disambiguate
more cases in the non-loop case.
* graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Adjust
calls to dr_may_alias_p.
(write_alias_graph_to_ascii_ecc): Likewise.
(write_alias_graph_to_ascii_dot): Likewise.
(build_alias_set_optimal_p): Likewise.
From-SVN: r177986
Diffstat (limited to 'gcc/tree-ssa-loop-im.c')
-rw-r--r-- | gcc/tree-ssa-loop-im.c | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c index 3a5608e..7828c5b 100644 --- a/gcc/tree-ssa-loop-im.c +++ b/gcc/tree-ssa-loop-im.c @@ -1835,33 +1835,6 @@ analyze_memory_references (void) create_vop_ref_mapping (); } -/* Returns true if a region of size SIZE1 at position 0 and a region of - size SIZE2 at position DIFF cannot overlap. */ - -static bool -cannot_overlap_p (aff_tree *diff, double_int size1, double_int size2) -{ - double_int d, bound; - - /* Unless the difference is a constant, we fail. */ - if (diff->n != 0) - return false; - - d = diff->offset; - if (double_int_negative_p (d)) - { - /* The second object is before the first one, we succeed if the last - element of the second object is before the start of the first one. */ - bound = double_int_add (d, double_int_add (size2, double_int_minus_one)); - return double_int_negative_p (bound); - } - else - { - /* We succeed if the second object starts after the first one ends. */ - return double_int_scmp (size1, d) <= 0; - } -} - /* Returns true if MEM1 and MEM2 may alias. TTAE_CACHE is used as a cache in tree_to_aff_combination_expand. */ @@ -1890,7 +1863,7 @@ mem_refs_may_alias_p (tree mem1, tree mem2, struct pointer_map_t **ttae_cache) aff_combination_scale (&off1, double_int_minus_one); aff_combination_add (&off2, &off1); - if (cannot_overlap_p (&off2, size1, size2)) + if (aff_comb_cannot_overlap_p (&off2, size1, size2)) return false; return true; |