summaryrefslogtreecommitdiff
path: root/gcc/tree-data-ref.c
diff options
context:
space:
mode:
authordorit <dorit@138bc75d-0d04-0410-961f-82ee72b054a4>2005-02-12 11:47:19 +0000
committerdorit <dorit@138bc75d-0d04-0410-961f-82ee72b054a4>2005-02-12 11:47:19 +0000
commit27a87fb2ac2c9f9e0b0c2e38b4177d073aacb5fd (patch)
tree3e01db65e62fe15304ec53e6e8999fbfbd328c54 /gcc/tree-data-ref.c
parent4737caf22cfca1f3d49eef7663b048393570e43e (diff)
downloadgcc-27a87fb2ac2c9f9e0b0c2e38b4177d073aacb5fd.tar.gz
* tree-data-ref.c (array_base_name_differ_p): Check that the bases
exist and are objects. Remove checks for pointer. * tree-vectorizer.c (vect_create_addr_base_for_vector_ref): Use STMT_VINFO_VECT_DR_BASE_ADDRESS instead of DR_BASE_NAME. (vect_create_data_ref_ptr): Likewise. (vect_base_addr_differ_p): New function. (vect_analyze_data_ref_dependence): Call vect_base_addr_differ_p. (vect_analyze_pointer_ref_access): Add output parameter - ptr_init. Don't set the DR_BASE_NAME field of data-ref. (vect_get_memtag_and_dr): Use ptr_init instead of DR_BASE_NAME. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94932 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-data-ref.c')
-rw-r--r--gcc/tree-data-ref.c28
1 files changed, 8 insertions, 20 deletions
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c
index c6ca75310f8..55b34fbb73f 100644
--- a/gcc/tree-data-ref.c
+++ b/gcc/tree-data-ref.c
@@ -109,9 +109,15 @@ array_base_name_differ_p (struct data_reference *a,
{
tree base_a = DR_BASE_NAME (a);
tree base_b = DR_BASE_NAME (b);
- tree ta = TREE_TYPE (base_a);
- tree tb = TREE_TYPE (base_b);
+ tree ta, tb;
+ if (!base_a || !base_b)
+ return false;
+
+ ta = TREE_TYPE (base_a);
+ tb = TREE_TYPE (base_b);
+
+ gcc_assert (!POINTER_TYPE_P (ta) && !POINTER_TYPE_P (tb));
/* Determine if same base. Example: for the array accesses
a[i], b[i] or pointer accesses *a, *b, bases are a, b. */
@@ -179,24 +185,6 @@ array_base_name_differ_p (struct data_reference *a,
return true;
}
- if (!alias_sets_conflict_p (get_alias_set (base_a), get_alias_set (base_b)))
- {
- *differ_p = true;
- return true;
- }
-
- /* An instruction writing through a restricted pointer is
- "independent" of any instruction reading or writing through a
- different pointer, in the same block/scope. */
- if ((TREE_CODE (ta) == POINTER_TYPE && TYPE_RESTRICT (ta)
- && !DR_IS_READ(a))
- || (TREE_CODE (tb) == POINTER_TYPE && TYPE_RESTRICT (tb)
- && !DR_IS_READ(b)))
- {
- *differ_p = true;
- return true;
- }
-
return false;
}