[lto] Add debug_scope_block
Diego Novillo
dnovillo@google.com
Mon Jul 13 23:20:00 GMT 2009
I found this useful while debugging the next patch I'm about to
post. I will commit this to mainline as well.
Tested on x86_64.
Diego.
* tree-ssa-live.c (debug_scope_block): New.
* tree-flow.h (debug_scope_block): Declare it.
Index: tree-ssa-live.c
===================================================================
--- tree-ssa-live.c (revision 149492)
+++ tree-ssa-live.c (working copy)
@@ -637,6 +637,15 @@ dump_scope_block (FILE *file, int indent
fprintf (file, "\n%*s}\n",indent, "");
}
+/* Dump the tree of lexical scopes starting at SCOPE to stderr. FLAGS
+ is as in print_generic_expr. */
+
+void
+debug_scope_block (tree scope, int flags)
+{
+ dump_scope_block (stderr, 0, scope, flags);
+}
+
/* Dump the tree of lexical scopes of current_function_decl to FILE.
FLAGS is as in print_generic_expr. */
Index: tree-flow.h
===================================================================
--- tree-flow.h (revision 149492)
+++ tree-flow.h (working copy)
@@ -895,6 +895,7 @@ void mark_addressable (tree);
extern void remove_unused_locals (void);
extern void dump_scope_blocks (FILE *, int);
extern void debug_scope_blocks (int);
+extern void debug_scope_block (tree, int);
/* In tree-ssa-address.c */
More information about the Gcc-patches
mailing list