aboutsummaryrefslogtreecommitdiff
path: root/gcc/print-tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/print-tree.c')
-rw-r--r--gcc/print-tree.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/gcc/print-tree.c b/gcc/print-tree.c
index 468f1ff..7546f19 100644
--- a/gcc/print-tree.c
+++ b/gcc/print-tree.c
@@ -770,8 +770,18 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
for (i = 0; i < VECTOR_CST_NELTS (node); ++i)
{
- sprintf (buf, "elt%u: ", i);
+ unsigned j;
+ /* Coalesce the output of identical consecutive elements. */
+ for (j = i + 1; j < VECTOR_CST_NELTS (node); j++)
+ if (VECTOR_CST_ELT (node, j) != VECTOR_CST_ELT (node, i))
+ break;
+ j--;
+ if (i == j)
+ sprintf (buf, "elt%u: ", i);
+ else
+ sprintf (buf, "elt%u...elt%u: ", i, j);
print_node (file, buf, VECTOR_CST_ELT (node, i), indent + 4);
+ i = j;
}
}
break;
@@ -869,8 +879,14 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
case SSA_NAME:
print_node_brief (file, "var", SSA_NAME_VAR (node), indent + 4);
+ indent_to (file, indent + 4);
fprintf (file, "def_stmt ");
- print_gimple_stmt (file, SSA_NAME_DEF_STMT (node), indent + 4, 0);
+ {
+ pretty_printer buffer;
+ buffer.buffer->stream = file;
+ pp_gimple_stmt_1 (&buffer, SSA_NAME_DEF_STMT (node), indent + 4, 0);
+ pp_flush (&buffer);
+ }
indent_to (file, indent + 4);
fprintf (file, "version %u", SSA_NAME_VERSION (node));