diff options
author | irar <irar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-02-22 13:10:49 +0000 |
---|---|---|
committer | irar <irar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-02-22 13:10:49 +0000 |
commit | d8454216c1986f0126a807b6e06539a0e8f21447 (patch) | |
tree | 11bbc10f68c15a604e8b77a8dac5135a2a899cb5 /gcc/tree-data-ref.c | |
parent | 3326680b408b3414e67501b400120decdc4ab893 (diff) | |
download | gcc-d8454216c1986f0126a807b6e06539a0e8f21447.tar.gz |
* tree-data-ref.c (ptr_ptr_may_alias_p): Take alias sets into account.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122226 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-data-ref.c')
-rw-r--r-- | gcc/tree-data-ref.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c index b84f36be660..2f57c4f0203 100644 --- a/gcc/tree-data-ref.c +++ b/gcc/tree-data-ref.c @@ -172,6 +172,7 @@ ptr_ptr_may_alias_p (tree ptr_a, tree ptr_b, tree tag_a = NULL_TREE, tag_b = NULL_TREE; struct ptr_info_def *pi_a = DR_PTR_INFO (dra); struct ptr_info_def *pi_b = DR_PTR_INFO (drb); + bitmap bal1, bal2; if (pi_a && pi_a->name_mem_tag && pi_b && pi_b->name_mem_tag) { @@ -192,7 +193,19 @@ ptr_ptr_may_alias_p (tree ptr_a, tree ptr_b, if (!tag_b) return false; } - *aliased = (tag_a == tag_b); + bal1 = BITMAP_ALLOC (NULL); + bitmap_set_bit (bal1, DECL_UID (tag_a)); + if (MTAG_P (tag_a) && MTAG_ALIASES (tag_a)) + bitmap_ior_into (bal1, MTAG_ALIASES (tag_a)); + + bal2 = BITMAP_ALLOC (NULL); + bitmap_set_bit (bal2, DECL_UID (tag_b)); + if (MTAG_P (tag_b) && MTAG_ALIASES (tag_b)) + bitmap_ior_into (bal2, MTAG_ALIASES (tag_b)); + *aliased = bitmap_intersect_p (bal1, bal2); + + BITMAP_FREE (bal1); + BITMAP_FREE (bal2); return true; } |