public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] dump SLP_TREE_REPRESENTATIVE
@ 2020-11-20 12:05 Richard Biener
  0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2020-11-20 12:05 UTC (permalink / raw)
  To: gcc-patches

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.

Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.

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 | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
index d2f2407ac92..f378148516f 100644
--- a/gcc/tree-vect-slp.c
+++ b/gcc/tree-vect-slp.c
@@ -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);
-- 
2.26.2

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-11-20 12:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-20 12:05 [PATCH] dump SLP_TREE_REPRESENTATIVE Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).