From 47113773456ade7324c5467511d97f36cced57b4 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Mon, 12 Jul 2021 15:13:17 +0200 Subject: produce simple DOT graphs from SLP trees This adds a dot_slp_tree debug function producing a simple DOT graph from a starting node down the graph. There's no fancy direct invocation of dot but the output is directed to a specified file. It re-uses vect_print_slp_tree, naming nodes as their address. 2021-07-12 Richard Biener * dump-context.h (debug_dump_context::debug_dump_context): Add FILE * parameter defaulted to stderr. * dumpfile.c (debug_dump_context::debug_dump_context): Adjust. * tree-vect-slp.c (dot_slp_tree): New functions. --- gcc/dumpfile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/dumpfile.c') diff --git a/gcc/dumpfile.c b/gcc/dumpfile.c index 2457df2..8169daf 100644 --- a/gcc/dumpfile.c +++ b/gcc/dumpfile.c @@ -2098,14 +2098,14 @@ enable_rtl_dump_file (void) /* debug_dump_context's ctor. Temporarily override the dump_context (to forcibly enable output to stderr). */ -debug_dump_context::debug_dump_context () +debug_dump_context::debug_dump_context (FILE *f) : m_context (), m_saved (&dump_context::get ()), m_saved_flags (dump_flags), m_saved_pflags (pflags), m_saved_file (dump_file) { - set_dump_file (stderr); + set_dump_file (f); dump_context::s_current = &m_context; pflags = dump_flags = MSG_ALL_KINDS | MSG_ALL_PRIORITIES; dump_context::get ().refresh_dumps_are_enabled (); -- cgit v1.1