From 6e820b943bce54002f9343c2e39529d792291388 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Fri, 20 Nov 2020 12:10:56 +0100 Subject: [PATCH] dump SLP_TREE_REPRESENTATIVE 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 * 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.30.2