Skip to content

Commit 22e5711

Browse files
committed
Remove STMT_VINFO_VEC_STMTS
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 ... * 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.
1 parent 735b470 commit 22e5711

File tree

3 files changed

+1
-8
lines changed

3 files changed

+1
-8
lines changed

gcc/tree-vect-data-refs.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3956,8 +3956,7 @@ vect_vfa_access_size (vec_info *vinfo, dr_vec_info *dr_info)
39563956
}
39573957
tree vectype = STMT_VINFO_VECTYPE (stmt_vinfo);
39583958
int misalignment;
3959-
if (STMT_VINFO_VEC_STMTS (stmt_vinfo).exists ()
3960-
&& ((misalignment = dr_misalignment (dr_info, vectype)), true)
3959+
if (((misalignment = dr_misalignment (dr_info, vectype)), true)
39613960
&& (vect_supportable_dr_alignment (vinfo, dr_info, vectype, misalignment)
39623961
== dr_explicit_realign_optimized))
39633962
{

gcc/tree-vectorizer.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,6 @@ vec_info::new_stmt_vec_info (gimple *stmt)
724724
STMT_VINFO_REDUC_IDX (res) = -1;
725725
STMT_VINFO_SLP_VECT_ONLY (res) = false;
726726
STMT_VINFO_SLP_VECT_ONLY_PATTERN (res) = false;
727-
STMT_VINFO_VEC_STMTS (res) = vNULL;
728727
res->reduc_initial_values = vNULL;
729728
res->reduc_scalar_results = vNULL;
730729

@@ -790,7 +789,6 @@ vec_info::free_stmt_vec_info (stmt_vec_info stmt_info)
790789

791790
stmt_info->reduc_initial_values.release ();
792791
stmt_info->reduc_scalar_results.release ();
793-
STMT_VINFO_VEC_STMTS (stmt_info).release ();
794792
free (stmt_info);
795793
}
796794

gcc/tree-vectorizer.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,9 +1354,6 @@ class _stmt_vec_info {
13541354
/* The vector type to be used for the LHS of this statement. */
13551355
tree vectype;
13561356

1357-
/* The vectorized stmts. */
1358-
vec<gimple *> vec_stmts;
1359-
13601357
/* The following is relevant only for stmts that contain a non-scalar
13611358
data-ref (array/pointer/struct access). A GIMPLE stmt is expected to have
13621359
at most one such data-ref. */
@@ -1577,7 +1574,6 @@ struct gather_scatter_info {
15771574
#define STMT_VINFO_RELEVANT(S) (S)->relevant
15781575
#define STMT_VINFO_LIVE_P(S) (S)->live
15791576
#define STMT_VINFO_VECTYPE(S) (S)->vectype
1580-
#define STMT_VINFO_VEC_STMTS(S) (S)->vec_stmts
15811577
#define STMT_VINFO_VECTORIZABLE(S) (S)->vectorizable
15821578
#define STMT_VINFO_DATA_REF(S) ((S)->dr_aux.dr + 0)
15831579
#define STMT_VINFO_GATHER_SCATTER_P(S) (S)->gather_scatter_p

0 commit comments

Comments
 (0)