aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-stmts.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2018-07-31 14:25:56 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2018-07-31 14:25:56 +0000
commitf44fb7aa84e0c1f9c0721a69f7b0f157d6058686 (patch)
treee9f486becfeab0c0cdcdbefa678e6470f968fd88 /gcc/tree-vect-stmts.c
parent634e7150449157267db1a1152370b11446acb6d0 (diff)
downloadgcc-f44fb7aa84e0c1f9c0721a69f7b0f157d6058686.zip
gcc-f44fb7aa84e0c1f9c0721a69f7b0f157d6058686.tar.gz
gcc-f44fb7aa84e0c1f9c0721a69f7b0f157d6058686.tar.bz2
[37/46] dr_aux tweaks
This patch makes dr_aux link back to both the scalar data_reference and the containing stmt_vec_info, so that it becomes a suitable key for a vectorisable reference. The data_reference link is just STMT_VINFO_DATA_REF, moved here from _stmt_vec_info. The stmt pointer is a new field and always tracks the current stmt_vec_info for the reference (which might be a pattern stmt or the original stmt). The patch also makes the dr_aux in this current stmt be the one that counts, rather than have the information stay with the DR_STMT. A new macro (STMT_VINFO_DR_INFO) gives this information for a given stmt_info. In future we could make dr_aux a separate structure, which would be useful if we want to support multiple data references per stmt. That seems too much of a diversion for this series though. 2018-07-31 Richard Sandiford <richard.sandiford@arm.com> gcc/ * tree-vectorizer.h (vec_info::move_dr): New member function. (dataref_aux): Rename to... (dr_vec_info): ...this and add "dr" and "stmt" fields. (_stmt_vec_info::dr_aux): Update accordingly. (_stmt_vec_info::data_ref_info): Delete. (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT) (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT) (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT): (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead of data_ref. (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue. (STMT_VINFO_DR_INFO): New macro. (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt. (set_dr_misalignment): Update after rename of dataref_aux. (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt. * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant initialization of STMT_VINFO_DATA_REF. * tree-vectorizer.c (vec_info::move_dr): New function. * tree-vect-patterns.c (vect_recog_bool_pattern) (vect_recog_mask_conversion_pattern) (vect_recog_gather_scatter_pattern): Use it. * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize the "dr" and "stmt" fields of dr_vec_info instead of STMT_VINFO_DATA_REF. From-SVN: r263152
Diffstat (limited to 'gcc/tree-vect-stmts.c')
-rw-r--r--gcc/tree-vect-stmts.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 2a51335..76ae851 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -9872,7 +9872,6 @@ new_stmt_vec_info (gimple *stmt, vec_info *vinfo)
STMT_VINFO_VECTORIZABLE (res) = true;
STMT_VINFO_IN_PATTERN_P (res) = false;
STMT_VINFO_PATTERN_DEF_SEQ (res) = NULL;
- STMT_VINFO_DATA_REF (res) = NULL;
STMT_VINFO_VEC_REDUCTION_TYPE (res) = TREE_CODE_REDUCTION;
STMT_VINFO_VEC_CONST_COND_REDUC_CODE (res) = ERROR_MARK;