]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Rename loop_vect SLP_TYPE and clarify docs
authorRichard Biener <rguenther@suse.de>
Mon, 4 Aug 2025 12:36:03 +0000 (14:36 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 5 Aug 2025 11:09:32 +0000 (13:09 +0200)
The following renames loop_vect to not_vect, removes the unused
HYBRID_SLP_STMT macro and rewords the slp_vect_type docs to clarify
STMT_SLP_TYPE is mainly used for BB vectorization, tracking what is
vectorized and what not.

* tree-vectorizer.h (enum slp_vect_type): Rename loop_vect
to not_vect, clarify docs.
(HYBRID_SLP_STMT): Remove.
* tree-vectorizer.cc (vec_info::new_stmt_vec_info): Adjust.
* tree-vect-loop.cc (vect_analyze_loop_2): Likewise.

gcc/tree-vect-loop.cc
gcc/tree-vectorizer.cc
gcc/tree-vectorizer.h

index 460de575fcc00faa489a7178df7f51e2368e3301..01428b2c8fd4c485bd1943c875aaeae5045189f8 100644 (file)
@@ -2923,7 +2923,7 @@ again:
           !gsi_end_p (si); gsi_next (&si))
        {
          stmt_vec_info stmt_info = loop_vinfo->lookup_stmt (gsi_stmt (si));
-         STMT_SLP_TYPE (stmt_info) = loop_vect;
+         STMT_SLP_TYPE (stmt_info) = not_vect;
          if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_reduction_def
              || STMT_VINFO_DEF_TYPE (stmt_info) == vect_double_reduction_def)
            {
@@ -2942,7 +2942,7 @@ again:
          if (is_gimple_debug (gsi_stmt (si)))
            continue;
          stmt_vec_info stmt_info = loop_vinfo->lookup_stmt (gsi_stmt (si));
-         STMT_SLP_TYPE (stmt_info) = loop_vect;
+         STMT_SLP_TYPE (stmt_info) = not_vect;
          if (STMT_VINFO_IN_PATTERN_P (stmt_info))
            {
              stmt_vec_info pattern_stmt_info
@@ -2951,11 +2951,11 @@ again:
                STMT_VINFO_IN_PATTERN_P (stmt_info) = false;
 
              gimple *pattern_def_seq = STMT_VINFO_PATTERN_DEF_SEQ (stmt_info);
-             STMT_SLP_TYPE (pattern_stmt_info) = loop_vect;
+             STMT_SLP_TYPE (pattern_stmt_info) = not_vect;
              for (gimple_stmt_iterator pi = gsi_start (pattern_def_seq);
                   !gsi_end_p (pi); gsi_next (&pi))
                STMT_SLP_TYPE (loop_vinfo->lookup_stmt (gsi_stmt (pi)))
-                 = loop_vect;
+                 = not_vect;
            }
        }
     }
index f992856a9c6d4aa712958c559d5be577b344e5cc..50985a64ba6b6ff016fff8ceff61d395b3f9115f 100644 (file)
@@ -733,7 +733,7 @@ vec_info::new_stmt_vec_info (gimple *stmt)
   else
     STMT_VINFO_DEF_TYPE (res) = vect_internal_def;
 
-  STMT_SLP_TYPE (res) = loop_vect;
+  STMT_SLP_TYPE (res) = not_vect;
 
   /* This is really "uninitialized" until vect_compute_data_ref_alignment.  */
   res->dr_aux.misalignment = DR_MISALIGNMENT_UNINITIALIZED;
index 0a75ee15857cc626091dc2ee35595c136deb14b5..c8482c2b4a6780ec507aa175057e519ba13ade2b 100644 (file)
@@ -1288,24 +1288,11 @@ enum vect_relevant {
   vect_used_in_scope
 };
 
-/* The type of vectorization that can be applied to the stmt: regular loop-based
-   vectorization; pure SLP - the stmt is a part of SLP instances and does not
-   have uses outside SLP instances; or hybrid SLP and loop-based - the stmt is
-   a part of SLP instance and also must be loop-based vectorized, since it has
-   uses outside SLP sequences.
-
-   In the loop context the meanings of pure and hybrid SLP are slightly
-   different. By saying that pure SLP is applied to the loop, we mean that we
-   exploit only intra-iteration parallelism in the loop; i.e., the loop can be
-   vectorized without doing any conceptual unrolling, cause we don't pack
-   together stmts from different iterations, only within a single iteration.
-   Loop hybrid SLP means that we exploit both intra-iteration and
-   inter-iteration parallelism (e.g., number of elements in the vector is 4
-   and the slp-group-size is 2, in which case we don't have enough parallelism
-   within an iteration, so we obtain the rest of the parallelism from subsequent
-   iterations by unrolling the loop by 2).  */
+/* The type of vectorization.  pure_slp means the stmt is covered by the
+   SLP graph, not_vect means it is not.  This is mostly used by BB
+   vectorization.  */
 enum slp_vect_type {
-  loop_vect = 0,
+  not_vect = 0,
   pure_slp,
   hybrid
 };
@@ -1655,7 +1642,6 @@ struct gather_scatter_info {
 
 #define STMT_VINFO_RELEVANT_P(S)          ((S)->relevant != vect_unused_in_scope)
 
-#define HYBRID_SLP_STMT(S)                ((S)->slp_type == hybrid)
 #define PURE_SLP_STMT(S)                  ((S)->slp_type == pure_slp)
 #define STMT_SLP_TYPE(S)                   (S)->slp_type