---
 gcc/tree-vect-slp.cc  | 32 ++++++++++++++++++++++++++++++--
 gcc/tree-vectorizer.h |  8 +++++++-
 2 files changed, 37 insertions(+), 3 deletions(-)

diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc
index 55c634f0dd9..89bbd13fcb9 100644
--- a/gcc/tree-vect-slp.cc
+++ b/gcc/tree-vect-slp.cc
@@ -173,6 +173,11 @@ _slp_tree::~_slp_tree ()
 void
 _slp_tree::push_vec_def (gimple *def)
 {
+  if (dump_enabled_p ())
+    dump_printf_loc (MSG_NOTE, vect_location,
+                    "push_vec_def: push gimple def to node %p\n",
+                    (void *) this);
+
   if (gphi *phi = dyn_cast <gphi *> (def))
     vec_defs.quick_push (gimple_phi_result (phi));
   else
@@ -2223,6 +2228,10 @@ vect_build_slp_tree_2 (vec_info *vinfo, slp_tree node,
       unsigned HOST_WIDE_INT const_nunits;
       if (nunits.is_constant (&const_nunits))
        SLP_TREE_LANES (vnode) = const_nunits;
+      if (dump_enabled_p ())
+       dump_printf_loc (MSG_NOTE, vect_location,
+                        "vect_build_slp_tree_2: safe push def to node %p\n",
+                        (void *) vnode);
       SLP_TREE_VEC_DEFS (vnode).safe_push (vec);
       /* We are always building a permutation node even if it is an identity
         permute to shield the rest of the vectorizer from the odd node
@@ -10792,6 +10801,11 @@ vect_create_constant_vectors (vec_info *vinfo, 
slp_tree op_node)
   for (j = vec_num; j != 0; j--)
     {
       vop = voprnds[j - 1];
+      if (dump_enabled_p ())
+       dump_printf_loc (
+         MSG_NOTE, vect_location,
+         "vect_create_constant_vectors: push inverted def to node %p\n",
+         (void *) op_node);
       SLP_TREE_VEC_DEFS (op_node).quick_push (vop);
     }
 
@@ -10802,7 +10816,14 @@ vect_create_constant_vectors (vec_info *vinfo, 
slp_tree op_node)
   while (number_of_vectors > SLP_TREE_VEC_DEFS (op_node).length ())
     for (i = 0; SLP_TREE_VEC_DEFS (op_node).iterate (i, &vop) && i < vec_num;
         i++)
-      SLP_TREE_VEC_DEFS (op_node).quick_push (vop);
+      {
+       if (dump_enabled_p ())
+         dump_printf_loc (
+           MSG_NOTE, vect_location,
+           "vect_create_constant_vectors: push replicated def to node %p\n",
+           (void *) op_node);
+       SLP_TREE_VEC_DEFS (op_node).quick_push (vop);
+      }
 }
 
 /* Get the scalar definition of the Nth lane from SLP_NODE or NULL_TREE
@@ -10897,7 +10918,14 @@ vect_transform_slp_perm_load_1 (vec_info *vinfo, 
slp_tree node,
      stmts later.  */
   if (! analyze_only)
     for (unsigned i = SLP_TREE_VEC_DEFS (node).length (); i < nstmts; i++)
-      SLP_TREE_VEC_DEFS (node).quick_push (NULL_TREE);
+      {
+       if (dump_enabled_p ())
+         dump_printf_loc (
+           MSG_NOTE, vect_location,
+           "vect_transform_slp_perm_load_1: push NULL_TREE to node %p\n",
+           (void *) node);
+       SLP_TREE_VEC_DEFS (node).quick_push (NULL_TREE);
+      }
 
   /* Generate permutation masks for every NODE. Number of masks for each NODE
      is equal to GROUP_SIZE.
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index 708ce783db7..92c7ee6e46d 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -314,7 +314,13 @@ struct _slp_tree {
   ~_slp_tree ();
 
   void push_vec_def (gimple *def);
-  void push_vec_def (tree def) { vec_defs.quick_push (def); }
+  void push_vec_def (tree def)
+  {
+    if (dump_enabled_p ())
+      dump_printf (MSG_NOTE, "push_vec_def: push def to node %p\n",
+                  (void *) this);
+    vec_defs.quick_push (def);
+  }
 
   /* Nodes that contain def-stmts of this node statements operands.  */
   vec<slp_tree> children;
-- 
2.43.0

Reply via email to