Add debug (slp_tree) and dump infrastructure for this
This adds an alternate debug_dump_context similar to the one for
selftests but for interactive debugging routines. This allows
to share code between user-visible dumping via the dump_* API
and those debugging routines. The primary driver was SLP node
dumping which wasn't accessible from inside a gdb session up to
now.
2020-05-27 Richard Biener <rguenther@suse.de>
* dump-context.h (debug_dump_context): New class.
(dump_context): Make it friend.
* dumpfile.c (debug_dump_context::debug_dump_context):
Implement.
(debug_dump_context::~debug_dump_context): Likewise.
* tree-vect-slp.c: Include dump-context.h.
(vect_print_slp_tree): Dump a single SLP node.
(debug): New overload for slp_tree.
(vect_print_slp_graph): Rename from vect_print_slp_tree and
use that.
(vect_analyze_slp_instance): Adjust.