dump SLP_TREE_REPRESENTATIVE
authorRichard Biener <rguenther@suse.de>
Fri, 20 Nov 2020 11:10:56 +0000 (12:10 +0100)
committerRichard Biener <rguenther@suse.de>
Fri, 20 Nov 2020 12:05:42 +0000 (13:05 +0100)
It always annoyed me to see those empty SLP nodes in dumpfiles:

t.c:16:3: note:   node 0x3a2a280 (max_nunits=1, refcnt=1)
t.c:16:3: note:         { }
t.c:16:3: note:         children 0x3a29db0 0x3a29e90

resulting from two-operator handling.  The following makes
sure to also dump the operation template or VEC_PERM_EXPR.

2020-11-20  Richard Biener  <rguenther@suse.de>

* tree-vect-slp.c (vect_print_slp_tree): Also dump
SLP_TREE_REPRESENTATIVE.

gcc/tree-vect-slp.c

index d2f2407ac92f23724387e893a24c6661b514dafb..f378148516fd8e246ee3c3b64f399cb66adbb92d 100644 (file)
@@ -1908,6 +1908,14 @@ vect_print_slp_tree (dump_flags_t dump_kind, dump_location_t loc,
                      : ""), node,
                   estimated_poly_value (node->max_nunits),
                                         SLP_TREE_REF_COUNT (node));
+  if (SLP_TREE_DEF_TYPE (node) == vect_internal_def)
+    {
+      if (SLP_TREE_CODE (node) == VEC_PERM_EXPR)
+       dump_printf_loc (metadata, user_loc, "op: VEC_PERM_EXPR\n");
+      else
+       dump_printf_loc (metadata, user_loc, "op template: %G",
+                        SLP_TREE_REPRESENTATIVE (node)->stmt);
+    }
   if (SLP_TREE_SCALAR_STMTS (node).exists ())
     FOR_EACH_VEC_ELT (SLP_TREE_SCALAR_STMTS (node), i, stmt_info)
       dump_printf_loc (metadata, user_loc, "\tstmt %u %G", i, stmt_info->stmt);