diff options
author | Bin Cheng <bin.cheng@arm.com> | 2017-05-26 14:10:43 +0000 |
---|---|---|
committer | Bin Cheng <amker@gcc.gnu.org> | 2017-05-26 14:10:43 +0000 |
commit | 8d44cf7275527abc86f33e6d6c51fc84fa9c877a (patch) | |
tree | 3273bf86a29a78426128ba067fc0e6b94ef45da3 /gcc/tree-data-ref.h | |
parent | 2c8f03adb27b15e9e4665dfe24b04f5516ec2ea4 (diff) | |
download | gcc-8d44cf7275527abc86f33e6d6c51fc84fa9c877a.zip gcc-8d44cf7275527abc86f33e6d6c51fc84fa9c877a.tar.gz gcc-8d44cf7275527abc86f33e6d6c51fc84fa9c877a.tar.bz2 |
tree-vect-data-refs.c (Operator==, [...]): Move from ...
* tree-vect-data-refs.c (Operator==, comp_dr_with_seg_len_pair):
Move from ...
* tree-data-ref.c (Operator==, comp_dr_with_seg_len_pair): To here.
* tree-vect-data-refs.c (vect_prune_runtime_alias_test_list): Factor
out code pruning runtime alias checks.
* tree-data-ref.c (prune_runtime_alias_test_list): New function
factored out from above.
* tree-vectorizer.h (struct dr_with_seg_len, dr_with_seg_len_pair_t):
Move from ...
* tree-data-ref.h (struct dr_with_seg_len, dr_with_seg_len_pair_t):
... to here.
(prune_runtime_alias_test_list): New decalaration.
From-SVN: r248511
Diffstat (limited to 'gcc/tree-data-ref.h')
-rw-r--r-- | gcc/tree-data-ref.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/tree-data-ref.h b/gcc/tree-data-ref.h index 96bc764..dbe8372 100644 --- a/gcc/tree-data-ref.h +++ b/gcc/tree-data-ref.h @@ -148,6 +148,32 @@ struct data_reference typedef struct data_reference *data_reference_p; +/* This struct is used to store the information of a data reference, + including the data ref itself and the segment length for aliasing + checks. This is used to merge alias checks. */ + +struct dr_with_seg_len +{ + dr_with_seg_len (data_reference_p d, tree len) + : dr (d), seg_len (len) {} + + data_reference_p dr; + tree seg_len; +}; + +/* This struct contains two dr_with_seg_len objects with aliasing data + refs. Two comparisons are generated from them. */ + +struct dr_with_seg_len_pair_t +{ + dr_with_seg_len_pair_t (const dr_with_seg_len& d1, + const dr_with_seg_len& d2) + : first (d1), second (d2) {} + + dr_with_seg_len first; + dr_with_seg_len second; +}; + enum data_dependence_direction { dir_positive, dir_negative, @@ -343,6 +369,8 @@ extern bool dr_equal_offsets_p (struct data_reference *, struct data_reference *); extern int data_ref_compare_tree (tree, tree); +extern void prune_runtime_alias_test_list (vec<dr_with_seg_len_pair_t> *, + unsigned HOST_WIDE_INT); /* Return true when the base objects of data references A and B are the same memory object. */ |