aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorCong Hou <congh@google.com>2013-11-07 14:29:45 -0500
committerCong Hou <congh@gcc.gnu.org>2013-11-07 14:29:45 -0500
commita05a89fa702b1614c871153f5c067dfc08e457b0 (patch)
treece9a066296eee210133c1bff32f548ab6ed8aa4a /gcc/tree-vectorizer.h
parent6d0b710573662ba451996d0a7d9bf0174229b8c3 (diff)
downloadgcc-a05a89fa702b1614c871153f5c067dfc08e457b0.zip
gcc-a05a89fa702b1614c871153f5c067dfc08e457b0.tar.gz
gcc-a05a89fa702b1614c871153f5c067dfc08e457b0.tar.bz2
re PR tree-optimization/56764 (vect_prune_runtime_alias_test_list not smart enough)
2013-11-07 Cong Hou <congh@google.com> PR tree-optimization/56764 * tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): Combine alias checks if it is possible to amortize the runtime overhead. Return the number of alias checks after merging. * tree-vect-data-refs.c (vect_prune_runtime_alias_test_list): Use the function vect_create_cond_for_alias_checks () to check the number of alias checks. 2013-11-07 Cong Hou <congh@google.com> * gcc.dg/vect/vect-alias-check.c: New. From-SVN: r204538
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r--gcc/tree-vectorizer.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index a2f482d..bbd50e1 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -175,6 +175,36 @@ 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. */
+
+struct dr_addr_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) {}
+
+ data_reference *dr;
+ tree basic_addr;
+ tree offset;
+ tree seg_len;
+};
+
+/* This struct contains two dr_addr_with_seg_len objects with aliasing data
+ refs. Two comparisons are generated from them. */
+
+struct dr_addr_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)
+ : first (d1), second (d2) {}
+
+ dr_addr_with_seg_len first;
+ dr_addr_with_seg_len second;
+};
+
+
typedef struct _vect_peel_info
{
int npeel;
@@ -274,6 +304,10 @@ typedef struct _loop_vec_info {
for a run-time aliasing check. */
vec<ddr_p> may_alias_ddrs;
+ /* 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;
+
/* Statements in the loop that have data references that are candidates for a
runtime (loop versioning) misalignment check. */
vec<gimple> may_misalign_stmts;
@@ -336,6 +370,7 @@ typedef struct _loop_vec_info {
#define LOOP_VINFO_MAY_MISALIGN_STMTS(L) (L)->may_misalign_stmts
#define LOOP_VINFO_LOC(L) (L)->loop_line_number
#define LOOP_VINFO_MAY_ALIAS_DDRS(L) (L)->may_alias_ddrs
+#define LOOP_VINFO_COMP_ALIAS_DDRS(L) (L)->comp_alias_ddrs
#define LOOP_VINFO_GROUPED_STORES(L) (L)->grouped_stores
#define LOOP_VINFO_SLP_INSTANCES(L) (L)->slp_instances
#define LOOP_VINFO_SLP_UNROLLING_FACTOR(L) (L)->slp_unrolling_factor