]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Add debug overload for slp_instance
authorRichard Biener <rguenther@suse.de>
Wed, 28 Aug 2024 09:06:00 +0000 (11:06 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 28 Aug 2024 10:44:46 +0000 (12:44 +0200)
I found it helpful to be able to print a whole SLP instance from gdb.

* tree-vect-slp.cc (debug): Add overload for slp_instance.

gcc/tree-vect-slp.cc

index d110c992b046d4d89ffc77a70fecf98510fadb3b..fe4981177bf02eac0e648be53e8f97d743692530 100644 (file)
@@ -3038,6 +3038,15 @@ vect_print_slp_graph (dump_flags_t dump_kind, dump_location_t loc,
   vect_print_slp_graph (dump_kind, loc, entry, visited);
 }
 
+DEBUG_FUNCTION void
+debug (slp_instance instance)
+{
+  debug_dump_context ctx;
+  vect_print_slp_graph (MSG_NOTE,
+                       dump_location_t::from_location_t (UNKNOWN_LOCATION),
+                       SLP_INSTANCE_TREE (instance));
+}
+
 /* Mark the tree rooted at NODE with PURE_SLP.  */
 
 static void