]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Remove STMT_VINFO_VEC_STMTS
authorRichard Biener <rguenther@suse.de>
Fri, 25 Jul 2025 07:50:18 +0000 (09:50 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 25 Jul 2025 10:44:55 +0000 (12:44 +0200)
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.

gcc/tree-vect-data-refs.cc
gcc/tree-vectorizer.cc
gcc/tree-vectorizer.h

index 996c400aa28428151c8f3e679065c782001dd048..3bf285261c6aac80858dc679a406f950ccc04840 100644 (file)
@@ -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))
     {
index 601774d9614d77716f6fc8d7af36187755c19879..066c8a8c92255d4b36901a665f79366251eba965 100644 (file)
@@ -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);
 }
 
index 3e2a9f58e652f7716ae127a666832788885d903a..b03b44987a536c9333fb0552153228cfeb2e17ae 100644 (file)
@@ -1354,9 +1354,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.  */
@@ -1577,7 +1574,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