summaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorcongh <congh@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-14 20:59:47 +0000
committercongh <congh@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-14 20:59:47 +0000
commit43d14b661e63d2fd53d40ca8824d5e0727dc6770 (patch)
tree5b4788fbe5d619ba4dd0343e1e3048b6b0ca4fd3 /gcc/tree-vectorizer.h
parentb61383dde85fe042fdda2dbd99d1242ef14a5d6d (diff)
downloadgcc-43d14b661e63d2fd53d40ca8824d5e0727dc6770.tar.gz
2013-11-14 Cong Hou <congh@google.com>
* tree-vectorizer.h (struct dr_with_seg_len): Remove the base address field as it can be obtained from dr. Rename the struct. * tree-vect-data-refs.c (comp_dr_with_seg_len_pair): Consider steps of data references during sort. (vect_prune_runtime_alias_test_list): Adjust with the change to struct dr_with_seg_len. * tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): Adjust with the change to struct dr_with_seg_len. 2013-11-14 Cong Hou <congh@google.com> * gcc.dg/vect/vect-alias-check.c: Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204822 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r--gcc/tree-vectorizer.h31
1 files changed, 16 insertions, 15 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index bbd50e1d993..0ce78d9508d 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -176,32 +176,33 @@ typedef struct _slp_oprnd_info
/* This struct is used to store the information of a data reference,
- including the data ref itself, its basic address, the access offset
- and the segment length for aliasing checks. This is used to generate
- alias checks. */
+ including the data ref itself, the access offset (calculated by summing its
+ offset and init) and the segment length for aliasing checks.
+ This is used to merge alias checks. */
-struct dr_addr_with_seg_len
+struct dr_with_seg_len
{
- dr_addr_with_seg_len (data_reference* d, tree addr, tree off, tree len)
- : dr (d), basic_addr (addr), offset (off), seg_len (len) {}
+ dr_with_seg_len (data_reference_p d, tree len)
+ : dr (d),
+ offset (size_binop (PLUS_EXPR, DR_OFFSET (d), DR_INIT (d))),
+ seg_len (len) {}
- data_reference *dr;
- tree basic_addr;
+ data_reference_p dr;
tree offset;
tree seg_len;
};
-/* This struct contains two dr_addr_with_seg_len objects with aliasing data
+/* This struct contains two dr_with_seg_len objects with aliasing data
refs. Two comparisons are generated from them. */
-struct dr_addr_with_seg_len_pair_t
+struct dr_with_seg_len_pair_t
{
- dr_addr_with_seg_len_pair_t (const dr_addr_with_seg_len& d1,
- const dr_addr_with_seg_len& d2)
+ dr_with_seg_len_pair_t (const dr_with_seg_len& d1,
+ const dr_with_seg_len& d2)
: first (d1), second (d2) {}
- dr_addr_with_seg_len first;
- dr_addr_with_seg_len second;
+ dr_with_seg_len first;
+ dr_with_seg_len second;
};
@@ -306,7 +307,7 @@ typedef struct _loop_vec_info {
/* Data Dependence Relations defining address ranges together with segment
lengths from which the run-time aliasing check is built. */
- vec<dr_addr_with_seg_len_pair_t> comp_alias_ddrs;
+ vec<dr_with_seg_len_pair_t> comp_alias_ddrs;
/* Statements in the loop that have data references that are candidates for a
runtime (loop versioning) misalignment check. */