Add debug (slp_tree) and dump infrastructure for this
authorRichard Biener <rguenther@suse.de>
Mon, 25 May 2020 14:10:12 +0000 (16:10 +0200)
committerRichard Biener <rguenther@suse.de>
Wed, 27 May 2020 09:07:37 +0000 (11:07 +0200)
commitf61f9b28793d94060ce858e5f8a080db91785779
tree209e3957dcd0f54f72ea7ba599123b063db4430a
parentbaff22c48bdee9cb644b7336bf6f20f799531507
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.
gcc/dump-context.h
gcc/dumpfile.c
gcc/tree-vect-slp.c