aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-data-ref.c
diff options
context:
space:
mode:
authorIra Rosen <irar@il.ibm.com>2005-02-12 11:47:19 +0000
committerDorit Nuzman <dorit@gcc.gnu.org>2005-02-12 11:47:19 +0000
commite3a8a4eda9b1b2eb6a47f9156830f6fbc70ea794 (patch)
tree3e01db65e62fe15304ec53e6e8999fbfbd328c54 /gcc/tree-data-ref.c
parentc94a75af08ce77997d7566d5fcca097ca177a97f (diff)
downloadgcc-e3a8a4eda9b1b2eb6a47f9156830f6fbc70ea794.zip
gcc-e3a8a4eda9b1b2eb6a47f9156830f6fbc70ea794.tar.gz
gcc-e3a8a4eda9b1b2eb6a47f9156830f6fbc70ea794.tar.bz2
tree-data-ref.c (array_base_name_differ_p): Check that the bases exist and are objects.
* 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. From-SVN: r94932
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 c6ca753..55b34fb 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;
}