The following removes the last uses of STMT_VINFO_VEC_STMTS and the vector itself. Vector stmts are recorded in SLP nodes now.
The last use is a bit strange - it was introduced by Richard S. in r8-6064-ga57776a1136962 and affects only power7 and below (the re-align optimized load path). The check should have never been true since vect_vfa_access_size is only ever invoked before stmt transform. I have done the "conservative" change of making it always true now (so the code is now entered). I can as well remove it, but I wonder if you remember anything about this ... Bootstrap and regtest pending on x86_64-unknown-linux-gnu. Richard. * tree-vectorizer.h (_stmt_vec_info::vec_stmts): Remove. (STMT_VINFO_VEC_STMTS): Likewise. * tree-vectorizer.cc (vec_info::new_stmt_vec_info): Do not initialize it. (vec_info::free_stmt_vec_info): Nor free it. * tree-vect-data-refs.cc (vect_vfa_access_size): Remove check on STMT_VINFO_VEC_STMTS. --- gcc/tree-vect-data-refs.cc | 3 +-- gcc/tree-vectorizer.cc | 2 -- gcc/tree-vectorizer.h | 4 ---- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/gcc/tree-vect-data-refs.cc b/gcc/tree-vect-data-refs.cc index 824b5f0f769..0b266b6f4ae 100644 --- a/gcc/tree-vect-data-refs.cc +++ b/gcc/tree-vect-data-refs.cc @@ -3956,8 +3956,7 @@ vect_vfa_access_size (vec_info *vinfo, dr_vec_info *dr_info) } tree vectype = STMT_VINFO_VECTYPE (stmt_vinfo); int misalignment; - if (STMT_VINFO_VEC_STMTS (stmt_vinfo).exists () - && ((misalignment = dr_misalignment (dr_info, vectype)), true) + if (((misalignment = dr_misalignment (dr_info, vectype)), true) && (vect_supportable_dr_alignment (vinfo, dr_info, vectype, misalignment) == dr_explicit_realign_optimized)) { diff --git a/gcc/tree-vectorizer.cc b/gcc/tree-vectorizer.cc index 601774d9614..066c8a8c922 100644 --- a/gcc/tree-vectorizer.cc +++ b/gcc/tree-vectorizer.cc @@ -724,7 +724,6 @@ vec_info::new_stmt_vec_info (gimple *stmt) STMT_VINFO_REDUC_IDX (res) = -1; STMT_VINFO_SLP_VECT_ONLY (res) = false; STMT_VINFO_SLP_VECT_ONLY_PATTERN (res) = false; - STMT_VINFO_VEC_STMTS (res) = vNULL; res->reduc_initial_values = vNULL; res->reduc_scalar_results = vNULL; @@ -790,7 +789,6 @@ vec_info::free_stmt_vec_info (stmt_vec_info stmt_info) stmt_info->reduc_initial_values.release (); stmt_info->reduc_scalar_results.release (); - STMT_VINFO_VEC_STMTS (stmt_info).release (); free (stmt_info); } diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index f4e17840061..2f74739c14a 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -1359,9 +1359,6 @@ public: /* The vector type to be used for the LHS of this statement. */ tree vectype; - /* The vectorized stmts. */ - vec<gimple *> vec_stmts; - /* The following is relevant only for stmts that contain a non-scalar data-ref (array/pointer/struct access). A GIMPLE stmt is expected to have at most one such data-ref. */ @@ -1582,7 +1579,6 @@ struct gather_scatter_info { #define STMT_VINFO_RELEVANT(S) (S)->relevant #define STMT_VINFO_LIVE_P(S) (S)->live #define STMT_VINFO_VECTYPE(S) (S)->vectype -#define STMT_VINFO_VEC_STMTS(S) (S)->vec_stmts #define STMT_VINFO_VECTORIZABLE(S) (S)->vectorizable #define STMT_VINFO_DATA_REF(S) ((S)->dr_aux.dr + 0) #define STMT_VINFO_GATHER_SCATTER_P(S) (S)->gather_scatter_p -- 2.43.0