diff mbox

Unified debug dump function names.

Message ID CAGqM8fYiLHcdORrNfH965TA5QcG49nsk8d+SAQ_AotfxPjBG9g@mail.gmail.com
State New
Headers show

Commit Message

Lawrence Crowl March 23, 2013, 10:31 p.m. UTC
Add uniform debug dump function names.


Add some overloaded functions that provide uniform dump function
names.  These names are:

  dump: the general dumper
  dump_verbose: for more details
  dump_raw: for the gory details
  dump_head: for the heads of declarations, e.g. function heads
  dump_body: for the bodies of declarations, e.g. function bodies

Not all types have the last four versions.

The dump functions come in two flavors, those that take pointers
to the type, and those that take references to the type.  The first
handles printing of '<nil>' for null pointers.  The second assumes
a valid reference, and prints the content.


Example uses are as follows:

  cp_token t, *p;
  dump (t);
  dump (p);

From the debugger, use

  call dump (t)


The functions sets implemented are:

dump (only)

    basic_block_def, const bitmap_head_def, cp_binding_level,
    cp_parser, cp_token, data_reference, die_struct, edge_def,
    gimple_statement_d, ira_allocno, ira_allocno_copy, live_range,
    lra_live_range, omega_pb_d, pt_solution, const rtx_def, sreal,
    tree_live_info_d, _var_map,

    vec<cp_token, va_gc>, vec<data_reference_p>, vec<ddr_p>,
    vec<rtx>, vec<tree, va_gc>,

dump and dump_raw

    simple_bitmap_def

dump and dump_verbose

    expr_def, struct loop, vinsn_def

dump, dump_raw, dump_verbose, dump_head, dump_body

    const tree_node


This patch is somewhat different from the original plan at
gcc.gnu.org/wiki/cxx-conversion/debugging-dumps.  The reason
is that gdb has an incomplete implementation of C++ call syntax;
requiring explicit specification of template arguments and explicit
specification of function arguments even when they have default
values.  So, the original plan would have required typing

  call dump <cp_token> (t, 0, 0, stderr)

which is undesireable.  Instead instead of templates, we overload
plain functions.  This adds a small burden of manually adding
the pointer version of dump for each type.  Instead of default
function arguments, we simply assume the default values.  Most of
the underlying dump functions did not use the options and indent
parameters anyway.  Several provide FILE* parameters, but we expect
debugging to use stderr anyway.  So, the explicit specification of
arguments was not as valuable as we thought initially.

Comments

Richard Biener March 25, 2013, 9:25 a.m. UTC | #1
On Sat, Mar 23, 2013 at 11:31 PM, Lawrence Crowl <crowl@googlers.com> wrote:
> Add uniform debug dump function names.
>
>
> Add some overloaded functions that provide uniform dump function
> names.  These names are:
>
>   dump: the general dumper
>   dump_verbose: for more details
>   dump_raw: for the gory details
>   dump_head: for the heads of declarations, e.g. function heads
>   dump_body: for the bodies of declarations, e.g. function bodies
>
> Not all types have the last four versions.
>
> The dump functions come in two flavors, those that take pointers
> to the type, and those that take references to the type.  The first
> handles printing of '<nil>' for null pointers.  The second assumes
> a valid reference, and prints the content.
>
>
> Example uses are as follows:
>
>   cp_token t, *p;
>   dump (t);
>   dump (p);
>
> From the debugger, use
>
>   call dump (t)
>
>
> The functions sets implemented are:
>
> dump (only)
>
>     basic_block_def, const bitmap_head_def, cp_binding_level,
>     cp_parser, cp_token, data_reference, die_struct, edge_def,
>     gimple_statement_d, ira_allocno, ira_allocno_copy, live_range,
>     lra_live_range, omega_pb_d, pt_solution, const rtx_def, sreal,
>     tree_live_info_d, _var_map,
>
>     vec<cp_token, va_gc>, vec<data_reference_p>, vec<ddr_p>,
>     vec<rtx>, vec<tree, va_gc>,
>
> dump and dump_raw
>
>     simple_bitmap_def
>
> dump and dump_verbose
>
>     expr_def, struct loop, vinsn_def
>
> dump, dump_raw, dump_verbose, dump_head, dump_body
>
>     const tree_node
>
>
> This patch is somewhat different from the original plan at
> gcc.gnu.org/wiki/cxx-conversion/debugging-dumps.  The reason
> is that gdb has an incomplete implementation of C++ call syntax;
> requiring explicit specification of template arguments and explicit
> specification of function arguments even when they have default
> values.  So, the original plan would have required typing
>
>   call dump <cp_token> (t, 0, 0, stderr)
>
> which is undesireable.  Instead instead of templates, we overload
> plain functions.  This adds a small burden of manually adding
> the pointer version of dump for each type.  Instead of default
> function arguments, we simply assume the default values.  Most of
> the underlying dump functions did not use the options and indent
> parameters anyway.  Several provide FILE* parameters, but we expect
> debugging to use stderr anyway.  So, the explicit specification of
> arguments was not as valuable as we thought initially.

You add a not used new interface.  What for?  For use from gdb only?
In which case it should be debug (), not dump ().

Richard.

>
> Index: gcc/cp/ChangeLog
>
> 2013-03-21  Lawrence Crowl  <crowl@google.com>
>
>         * Make-lang.in
>         (CXX_PARSER_H): Add header dependence.
>         * cp-tree.h
>         (extern dump (cp_binding_level &)): New.
>         (extern dump (cp_binding_level *)): New.
>         * name-lookup.h
>         (dump (cp_binding_level &)): New.
>         (dump (cp_binding_level *)): New.
>         * parser.c
>         (dump (cp_parser &)): New.
>         (dump (cp_parser *)): New.
>         (dump (cp_token &)): New.
>         (dump (cp_token *)): New.
>         (dump (vec<cp_token, va_gc> &)): New.
>         (dump (vec<cp_token, va_gc> *)): New.
>         * parser.c: Add header dependence.
>         (extern dump (cp_parser &)): New.
>         (extern dump (cp_parser *)): New.
>         (extern dump (cp_token &)): New.
>         (extern dump (cp_token *)): New.
>         (extern dump (vec<cp_token, va_gc> &)): New.
>         (extern dump (vec<cp_token, va_gc> *)): New.
>
> Index: gcc/ChangeLog
>
> 2013-03-21  Lawrence Crowl  <crowl@google.com>
>
>         * Makefile.in: Add several missing include dependences.
>         (DUMPFILE_H): New.
>         (test-dump.o): New.  This object is not added to any executable,
>         but is present for ad-hoc testing.
>         * bitmap.c
>         (dump (const bitmap_head_def &)): New.
>         (dump (const bitmap_head_def *)): New.
>         * bitmap.h
>         (extern dump (const bitmap_head_def &)): New.
>         (extern dump (const bitmap_head_def *)): New.
>         * cfg.c
>         (dump (edge_def &)): New.
>         (dump (edge_def *)): New.
>         * cfghooks.c
>         (dump (basic_block_def &)): New.
>         (dump (basic_block_def *)): New.
>         * dumpfile.h
>         (dump_node (const_tree, int, FILE *)): Correct source file.
>         * dwarf2out.c
>         (dump (die_struct &)): New.
>         (dump (die_struct *)): New.
>         * dwarf2out.h
>         (extern dump (die_struct &)): New.
>         (extern dump (die_struct *)): New.
>         * gimple-pretty-print.c
>         (dump (gimple_statement_d &)): New.
>         (dump (gimple_statement_d *)): New.
>         * gimple-pretty-print.h
>         (extern dump (gimple_statement_d &)): New.
>         (extern dump (gimple_statement_d *)): New.
>         * ira-build.c
>         (dump (ira_allocno_copy &)): New.
>         (dump (ira_allocno_copy *)): New.
>         (dump (ira_allocno &)): New.
>         (dump (ira_allocno *)): New.
>         * ira-int.h
>         (extern dump (ira_allocno_copy &)): New.
>         (extern dump (ira_allocno_copy *)): New.
>         (extern dump (ira_allocno &)): New.
>         (extern dump (ira_allocno *)): New.
>         * ira-lives.c
>         (dump (live_range &)): New.
>         (dump (live_range *)): New.
>         * lra-int.h
>         (dump (lra_live_range &)): New.
>         (dump (lra_live_range *)): New.
>         * lra-lives.c
>         (dump (lra_live_range &)): New.
>         (dump (lra_live_range *)): New.
>         * omega.c
>         (dump (omega_pb_d &)): New.
>         (dump (omega_pb_d *)): New.
>         * omega.h
>         (extern dump (omega_pb_d &)): New.
>         (extern dump (omega_pb_d *)): New.
>         * print-rtl.c
>         (dump (const rtx_def &)): New.
>         (dump (const rtx_def *)): New.
>         * print-tree.c
>         (debug_tree (tree): Move within file.
>         (dump_raw (const tree_node &)): New.
>         (dump_raw (const tree_node *)): New.
>         (dump_tree_via_hooks (const tree_node *, int)): New.
>         (dump (const tree_node &)): New.
>         (dump (const tree_node *)): New.
>         (dump_verbose (const tree_node &)): New.
>         (dump_verbose (const tree_node *)): New.
>         (dump_head (const tree_node &)): New.
>         (dump_head (const tree_node *)): New.
>         (dump_body (const tree_node &)): New.
>         (dump_body (const tree_node *)): New.
>         (debug_vec_tree (tree): Move and reimplement in terms of dump.
>         (dump (vec<tree, va_gc> &)): New.
>         (dump (vec<tree, va_gc> *)): New.
>         * rtl.h
>         (extern dump (const rtx_def &)): New.
>         (extern dump (const rtx_def *)): New.
>         * sbitmap.c
>         (dump_raw (simple_bitmap_def &)): New.
>         (dump_raw (simple_bitmap_def *)): New.
>         (dump (simple_bitmap_def &)): New.
>         (dump (simple_bitmap_def *)): New.
>         * sbitmap.h
>         (extern dump (simple_bitmap_def &)): New.
>         (extern dump (simple_bitmap_def *)): New.
>         (extern dump_raw (simple_bitmap_def &)): New.
>         (extern dump_raw (simple_bitmap_def *)): New.
>         * sel-sched-dump.c
>         (dump (vinsn_def &)): New.
>         (dump (vinsn_def *)): New.
>         (dump_verbose (vinsn_def &)): New.
>         (dump_verbose (vinsn_def *)): New.
>         (dump (expr_def &)): New.
>         (dump (expr_def *)): New.
>         (dump_verbose (expr_def &)): New.
>         (dump_verbose (expr_def *)): New.
>         (dump (vec<rtx> &)): New.
>         (dump (vec<rtx> *)): New.
>         * sel-sched-dump.h
>         (extern dump (vinsn_def &)): New.
>         (extern dump (vinsn_def *)): New.
>         (extern dump_verbose (vinsn_def &)): New.
>         (extern dump_verbose (vinsn_def *)): New.
>         (extern dump (expr_def &)): New.
>         (extern dump (expr_def *)): New.
>         (extern dump_verbose (expr_def &)): New.
>         (extern dump_verbose (expr_def *)): New.
>         (extern dump (vec<rtx> &)): New.
>         (extern dump (vec<rtx> *)): New.
>         * sel-sched-ir.h
>         (_list_iter_cond_expr): Make inline instead of static.
>         * sreal.c
>         (dump (sreal &)): New.
>         (dump (sreal *)): New.
>         * sreal.h
>         (extern dump (sreal &)): New.
>         (extern dump (sreal *)): New.
>         * tree.h
>         (extern dump_raw (const tree_node &)): New.
>         (extern dump_raw (const tree_node *)): New.
>         (extern dump (const tree_node &)): New.
>         (extern dump (const tree_node *)): New.
>         (extern dump_verbose (const tree_node &)): New.
>         (extern dump_verbose (const tree_node *)): New.
>         (extern dump_head (const tree_node &)): New.
>         (extern dump_head (const tree_node *)): New.
>         (extern dump_body (const tree_node &)): New.
>         (extern dump_body (const tree_node *)): New.
>         (extern dump (vec<tree, va_gc> &)): New.
>         (extern dump (vec<tree, va_gc> *)): New.
>         * tree-cfg.c
>         (dump (struct loop &)): New.
>         (dump (struct loop *)): New.
>         (dump_verbose (struct loop &)): New.
>         (dump_verbose (struct loop *)): New.
>         * tree-dump.c: Add header dependence.
>         * tree-flow.h
>         (extern dump (struct loop &)): New.
>         (extern dump (struct loop *)): New.
>         (extern dump_verbose (struct loop &)): New.
>         (extern dump_verbose (struct loop *)): New.
>         * tree-data-ref.c
>         (dump (data_reference &)): New.
>         (dump (data_reference *)): New.
>         (dump (vec<data_reference_p> &)): New.
>         (dump (vec<data_reference_p> *)): New.
>         (dump (vec<ddr_p> &)): New.
>         (dump (vec<ddr_p> *)): New.
>         * tree-data-ref.h
>         (extern dump (data_reference &)): New.
>         (extern dump (data_reference *)): New.
>         (extern dump (vec<data_reference_p> &)): New.
>         (extern dump (vec<data_reference_p> *)): New.
>         (extern dump (vec<ddr_p> &)): New.
>         (extern dump (vec<ddr_p> *)): New.
>         * tree-ssa-alias.c
>         (dump (pt_solution &)): New.
>         (dump (pt_solution *)): New.
>         * tree-ssa-alias.h
>         (extern dump (pt_solution &)): New.
>         (extern dump (pt_solution *)): New.
>         * tree-ssa-alias.c
>         (dump (_var_map &)): New.
>         (dump (_var_map *)): New.
>         (dump (tree_live_info_d &)): New.
>         (dump (tree_live_info_d *)): New.
>         * tree-ssa-alias.h
>         (extern dump (_var_map &)): New.
>         (extern dump (_var_map *)): New.
>         (extern dump (tree_live_info_d &)): New.
>         (extern dump (tree_live_info_d *)): New.
>
> Index: gcc/sel-sched-ir.h
> ===================================================================
> --- gcc/sel-sched-ir.h  (revision 196604)
> +++ gcc/sel-sched-ir.h  (working copy)
> @@ -530,7 +530,7 @@ typedef _list_iterator av_set_iterator;
>  #define FOR_EACH_EXPR(EXPR, I, AV) _FOR_EACH (expr, (EXPR), (I), (AV))
>  #define FOR_EACH_EXPR_1(EXPR, I, AV) _FOR_EACH_1 (expr, (EXPR), (I), (AV))
>
> -static bool
> +inline bool
>  _list_iter_cond_expr (av_set_t av, expr_t *exprp)
>  {
>    if (av)
> Index: gcc/sreal.c
> ===================================================================
> --- gcc/sreal.c (revision 196604)
> +++ gcc/sreal.c (working copy)
> @@ -72,6 +72,22 @@ dump_sreal (FILE *file, sreal *x)
>  #endif
>  }
>
> +DEBUG_FUNCTION void
> +dump (sreal &ref)
> +{
> +  dump_sreal (stderr, &ref);
> +}
> +
> +DEBUG_FUNCTION void
> +dump (sreal *ptr)
> +{
> +  if (ptr)
> +    dump (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> +
> +
>  /* Copy the sreal number.  */
>
>  static inline void
> Index: gcc/tree-ssa-alias.c
> ===================================================================
> --- gcc/tree-ssa-alias.c        (revision 196604)
> +++ gcc/tree-ssa-alias.c        (working copy)
> @@ -454,6 +454,25 @@ dump_points_to_solution (FILE *file, str
>      }
>  }
>
> +
> +/* Unified dump function for pt_solution.  */
> +
> +DEBUG_FUNCTION void
> +dump (pt_solution &ref)
> +{
> +  dump_points_to_solution (stderr, &ref);
> +}
> +
> +DEBUG_FUNCTION void
> +dump (pt_solution *ptr)
> +{
> +  if (ptr)
> +    dump (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> +
> +
>  /* Dump points-to information for SSA_NAME PTR into FILE.  */
>
>  void
> Index: gcc/sreal.h
> ===================================================================
> --- gcc/sreal.h (revision 196604)
> +++ gcc/sreal.h (working copy)
> @@ -53,6 +53,8 @@ typedef struct sreal
>  } sreal;
>
>  extern void dump_sreal (FILE *, sreal *);
> +extern void dump (sreal &ref);
> +extern void dump (sreal *ptr);
>  extern sreal *sreal_init (sreal *, unsigned HOST_WIDE_INT, signed int);
>  extern HOST_WIDE_INT sreal_to_int (sreal *);
>  extern int sreal_compare (sreal *, sreal *);
> Index: gcc/tree-ssa-alias.h
> ===================================================================
> --- gcc/tree-ssa-alias.h        (revision 196604)
> +++ gcc/tree-ssa-alias.h        (working copy)
> @@ -120,6 +120,8 @@ extern struct ptr_info_def *get_ptr_info
>  extern void dump_alias_info (FILE *);
>  extern void debug_alias_info (void);
>  extern void dump_points_to_solution (FILE *, struct pt_solution *);
> +extern void dump (pt_solution &ref);
> +extern void dump (pt_solution *ptr);
>  extern void dump_points_to_info_for (FILE *, tree);
>  extern void debug_points_to_info_for (tree);
>  extern void dump_alias_stats (FILE *);
> Index: gcc/cp/parser.c
> ===================================================================
> --- gcc/cp/parser.c     (revision 196604)
> +++ gcc/cp/parser.c     (working copy)
> @@ -327,6 +327,21 @@ cp_lexer_debug_tokens (vec<cp_token, va_
>    cp_lexer_dump_tokens (stderr, buffer, NULL, 0, NULL);
>  }
>
> +DEBUG_FUNCTION void
> +dump (vec<cp_token, va_gc> &ref)
> +{
> +  cp_lexer_dump_tokens (stderr, &ref, NULL, 0, NULL);
> +}
> +
> +DEBUG_FUNCTION void
> +dump (vec<cp_token, va_gc> *ptr)
> +{
> +  if (ptr)
> +    dump (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> +
>
>  /* Dump the cp_parser tree field T to FILE if T is non-NULL.  DESC is the
>     description for T.  */
> @@ -545,6 +560,20 @@ cp_debug_parser (FILE *file, cp_parser *
>    fprintf (file, "\tColumn: %d\n", eloc.column);
>  }
>
> +DEBUG_FUNCTION void
> +dump (cp_parser &ref)
> +{
> +  cp_debug_parser (stderr, &ref);
> +}
> +
> +DEBUG_FUNCTION void
> +dump (cp_parser *ptr)
> +{
> +  if (ptr)
> +    dump (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
>
>  /* Allocate memory for a new lexer object and return it.  */
>
> @@ -1140,6 +1169,23 @@ cp_lexer_print_token (FILE * stream, cp_
>      }
>  }
>
> +DEBUG_FUNCTION void
> +dump (cp_token &ref)
> +{
> +  cp_lexer_print_token (stderr, &ref);
> +  fprintf (stderr, "\n");
> +}
> +
> +DEBUG_FUNCTION void
> +dump (cp_token *ptr)
> +{
> +  if (ptr)
> +    dump (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> +
> +
>  /* Start emitting debugging information.  */
>
>  static void
> Index: gcc/cp/parser.h
> ===================================================================
> --- gcc/cp/parser.h     (revision 196604)
> +++ gcc/cp/parser.h     (working copy)
> @@ -21,6 +21,7 @@ along with GCC; see the file COPYING3.
>  #define GCC_CP_PARSER_H
>
>  #include "tree.h"
> +#include "cp/cp-tree.h"
>  #include "c-family/c-pragma.h"
>
>  /* A token's value and its associated deferred access checks and
> @@ -343,7 +344,13 @@ typedef struct GTY(()) cp_parser {
>  } cp_parser;
>
>  /* In parser.c  */
> +extern void dump (cp_token &ref);
> +extern void dump (cp_token *ptr);
>  extern void cp_lexer_debug_tokens (vec<cp_token, va_gc> *);
> +extern void dump (vec<cp_token, va_gc> &ref);
> +extern void dump (vec<cp_token, va_gc> *ptr);
>  extern void cp_debug_parser (FILE *, cp_parser *);
> +extern void dump (cp_parser &ref);
> +extern void dump (cp_parser *ptr);
>
>  #endif  /* GCC_CP_PARSER_H  */
> Index: gcc/cp/cp-tree.h
> ===================================================================
> --- gcc/cp/cp-tree.h    (revision 196604)
> +++ gcc/cp/cp-tree.h    (working copy)
> @@ -5072,6 +5072,8 @@ extern tree make_anon_name                        (void);
>  extern tree pushdecl_top_level_maybe_friend    (tree, bool);
>  extern tree pushdecl_top_level_and_finish      (tree, tree);
>  extern tree check_for_out_of_scope_variable    (tree);
> +extern void dump                               (cp_binding_level &ref);
> +extern void dump                               (cp_binding_level *ptr);
>  extern void print_other_binding_stack          (cp_binding_level *);
>  extern tree maybe_push_decl                    (tree);
>  extern tree current_decl_namespace             (void);
> Index: gcc/cp/Make-lang.in
> ===================================================================
> --- gcc/cp/Make-lang.in (revision 196604)
> +++ gcc/cp/Make-lang.in (working copy)
> @@ -260,7 +260,7 @@ CXX_TREE_H = $(TREE_H) cp/name-lookup.h
>         $(FUNCTION_H) \
>         $(SYSTEM_H) coretypes.h $(CONFIG_H) $(TARGET_H) $(GGC_H) \
>         $(srcdir)/../include/hashtab.h
> -CXX_PARSER_H = tree.h c-family/c-pragma.h cp/parser.h
> +CXX_PARSER_H = tree.h $(CXX_TREE_H) c-family/c-pragma.h cp/parser.h
>  CXX_PRETTY_PRINT_H = cp/cxx-pretty-print.h $(C_PRETTY_PRINT_H)
>
>  cp/lex.o: cp/lex.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) \
> Index: gcc/cp/name-lookup.c
> ===================================================================
> --- gcc/cp/name-lookup.c        (revision 196604)
> +++ gcc/cp/name-lookup.c        (working copy)
> @@ -1802,6 +1802,22 @@ print_binding_level (cp_binding_level* l
>      }
>  }
>
> +DEBUG_FUNCTION void
> +dump (cp_binding_level &ref)
> +{
> +  print_binding_level (&ref);
> +}
> +
> +DEBUG_FUNCTION void
> +dump (cp_binding_level *ptr)
> +{
> +  if (ptr)
> +    dump (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> +
> +
>  void
>  print_other_binding_stack (cp_binding_level *stack)
>  {
> Index: gcc/print-tree.c
> ===================================================================
> --- gcc/print-tree.c    (revision 196604)
> +++ gcc/print-tree.c    (working copy)
> @@ -29,6 +29,7 @@ along with GCC; see the file COPYING3.
>  #include "diagnostic.h"
>  #include "gimple-pretty-print.h" /* FIXME */
>  #include "tree-flow.h"
> +#include "tree-dump.h"
>  #include "dumpfile.h"
>
>  /* Define the hash table of nodes already seen.
> @@ -44,34 +45,6 @@ struct bucket
>
>  static struct bucket **table;
>
> -/* Print the node NODE on standard error, for debugging.
> -   Most nodes referred to by this one are printed recursively
> -   down to a depth of six.  */
> -
> -DEBUG_FUNCTION void
> -debug_tree (tree node)
> -{
> -  table = XCNEWVEC (struct bucket *, HASH_SIZE);
> -  print_node (stderr, "", node, 0);
> -  free (table);
> -  table = 0;
> -  putc ('\n', stderr);
> -}
> -
> -/* Print the vector of trees VEC on standard error, for debugging.
> -   Most nodes referred to by this one are printed recursively
> -   down to a depth of six.  */
> -
> -DEBUG_FUNCTION void
> -debug_vec_tree (vec<tree, va_gc> *vec)
> -{
> -  table = XCNEWVEC (struct bucket *, HASH_SIZE);
> -  print_vec_tree (stderr, "", vec, 0);
> -  free (table);
> -  table = 0;
> -  putc ('\n', stderr);
> -}
> -
>  /* Print PREFIX and ADDR to FILE.  */
>  void
>  dump_addr (FILE *file, const char *prefix, const void *addr)
> @@ -1011,3 +984,146 @@ print_vec_tree (FILE *file, const char *
>        print_node (file, temp, elt, indent + 4);
>      }
>  }
> +
> +
> +/* Print the node NODE on standard error, for debugging.
> +   Most nodes referred to by this one are printed recursively
> +   down to a depth of six.  */
> +
> +DEBUG_FUNCTION void
> +debug_tree (tree node)
> +{
> +  table = XCNEWVEC (struct bucket *, HASH_SIZE);
> +  print_node (stderr, "", node, 0);
> +  free (table);
> +  table = 0;
> +  putc ('\n', stderr);
> +}
> +
> +DEBUG_FUNCTION void
> +dump_raw (const tree_node &ref)
> +{
> +  debug_tree (const_cast <tree> (&ref));
> +}
> +
> +DEBUG_FUNCTION void
> +dump_raw (const tree_node *ptr)
> +{
> +  if (ptr)
> +    dump_raw (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> +
> +static void
> +dump_tree_via_hooks (const tree_node *ptr, int options)
> +{
> +  if (DECL_P (ptr))
> +    lang_hooks.print_decl (stderr, const_cast <tree_node*> (ptr), 0);
> +  else if (TYPE_P (ptr))
> +    lang_hooks.print_type (stderr, const_cast <tree_node*> (ptr), 0);
> +  else if (TREE_CODE (ptr) == IDENTIFIER_NODE)
> +    lang_hooks.print_identifier (stderr, const_cast <tree_node*> (ptr), 0);
> +  else
> +    print_generic_expr (stderr, const_cast <tree_node*> (ptr), options);
> +  fprintf (stderr, "\n");
> +}
> +
> +DEBUG_FUNCTION void
> +dump (const tree_node &ref)
> +{
> +  dump_tree_via_hooks (&ref, 0);
> +}
> +
> +DEBUG_FUNCTION void
> +dump (const tree_node *ptr)
> +{
> +  if (ptr)
> +    dump (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> +
> +DEBUG_FUNCTION void
> +dump_verbose (const tree_node &ref)
> +{
> +  dump_tree_via_hooks (&ref, TDF_VERBOSE);
> +}
> +
> +DEBUG_FUNCTION void
> +dump_verbose (const tree_node *ptr)
> +{
> +  if (ptr)
> +    dump_verbose (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> +
> +DEBUG_FUNCTION void
> +dump_head (const tree_node &ref)
> +{
> +  dump (ref);
> +}
> +
> +DEBUG_FUNCTION void
> +dump_head (const tree_node *ptr)
> +{
> +  if (ptr)
> +    dump_head (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> +
> +DEBUG_FUNCTION void
> +dump_body (const tree_node &ref)
> +{
> +  if (TREE_CODE (&ref) == FUNCTION_DECL)
> +    dump_function_to_file (const_cast <tree_node*> (&ref), stderr, 0);
> +  else
> +    dump (ref);
> +}
> +
> +DEBUG_FUNCTION void
> +dump_body (const tree_node *ptr)
> +{
> +  if (ptr)
> +    dump_body (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> +
> +/* Print the vector of trees VEC on standard error, for debugging.
> +   Most nodes referred to by this one are printed recursively
> +   down to a depth of six.  */
> +
> +DEBUG_FUNCTION void
> +debug_vec_tree (vec<tree, va_gc> *vec)
> +{
> +  tree elt;
> +  unsigned ix;
> +
> +  /* Print the slot this node is in, and its code, and address.  */
> +  fprintf (stderr, "<VEC");
> +  dump_addr (stderr, " ", vec->address ());
> +
> +  FOR_EACH_VEC_ELT (*vec, ix, elt)
> +    {
> +      fprintf (stderr, "elt %d ", ix);
> +      dump (elt);
> +    }
> +}
> +
> +DEBUG_FUNCTION void
> +dump (vec<tree, va_gc> &ref)
> +{
> +  debug_vec_tree (&ref);
> +}
> +
> +DEBUG_FUNCTION void
> +dump (vec<tree, va_gc> *ptr)
> +{
> +  if (ptr)
> +    dump (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> Index: gcc/sel-sched-dump.c
> ===================================================================
> --- gcc/sel-sched-dump.c        (revision 196604)
> +++ gcc/sel-sched-dump.c        (working copy)
> @@ -207,6 +207,42 @@ dump_vinsn (vinsn_t vi)
>    dump_vinsn_1 (vi, dump_vinsn_flags);
>  }
>
> +DEBUG_FUNCTION void
> +dump (vinsn_def &ref)
> +{
> +  switch_dump (stderr);
> +  dump_vinsn_1 (&ref, dump_vinsn_flags);
> +  sel_print ("\n");
> +  restore_dump ();
> +}
> +
> +DEBUG_FUNCTION void
> +dump (vinsn_def *ptr)
> +{
> +  if (ptr)
> +    dump (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> +
> +DEBUG_FUNCTION void
> +dump_verbose (vinsn_def &ref)
> +{
> +  switch_dump (stderr);
> +  dump_vinsn_1 (&ref, debug_vinsn_flags);
> +  sel_print ("\n");
> +  restore_dump ();
> +}
> +
> +DEBUG_FUNCTION void
> +dump_verbose (vinsn_def *ptr)
> +{
> +  if (ptr)
> +    dump (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> +
>  /* Dump vinsn VI to stderr.  */
>  DEBUG_FUNCTION void
>  debug_vinsn (vinsn_t vi)
> @@ -298,6 +334,46 @@ debug_expr (expr_t expr)
>    restore_dump ();
>  }
>
> +/* Dump expression REF.  */
> +
> +DEBUG_FUNCTION void
> +dump (expr_def &ref)
> +{
> +  switch_dump (stderr);
> +  dump_expr_1 (&ref, 0);
> +  sel_print ("\n");
> +  restore_dump ();
> +}
> +
> +DEBUG_FUNCTION void
> +dump (expr_def *ptr)
> +{
> +  if (ptr)
> +    dump (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> +
> +/* Dump expression REF verbosely.  */
> +
> +DEBUG_FUNCTION void
> +dump_verbose (expr_def &ref)
> +{
> +  switch_dump (stderr);
> +  dump_expr_1 (&ref, DUMP_EXPR_ALL);
> +  sel_print ("\n");
> +  restore_dump ();
> +}
> +
> +DEBUG_FUNCTION void
> +dump_verbose (expr_def *ptr)
> +{
> +  if (ptr)
> +    dump_verbose (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> +
>  /* Dump insn I honoring FLAGS.  */
>  void
>  dump_insn_1 (insn_t i, int flags)
> @@ -918,6 +994,25 @@ debug_blist (blist_t bnds)
>    restore_dump ();
>  }
>
> +/* Dump a rtx vector REF.  */
> +DEBUG_FUNCTION void
> +dump (vec<rtx> &ref)
> +{
> +  switch_dump (stderr);
> +  dump_insn_vector (ref);
> +  sel_print ("\n");
> +  restore_dump ();
> +}
> +
> +DEBUG_FUNCTION void
> +dump (vec<rtx> *ptr)
> +{
> +  if (ptr)
> +    dump (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> +
>  /* Dump an insn vector SUCCS.  */
>  DEBUG_FUNCTION void
>  debug_insn_vector (rtx_vec_t succs)
> Index: gcc/sel-sched-dump.h
> ===================================================================
> --- gcc/sel-sched-dump.h        (revision 196604)
> +++ gcc/sel-sched-dump.h        (working copy)
> @@ -111,6 +111,12 @@ extern void dump_vinsn_1 (vinsn_t, int);
>  extern void dump_vinsn (vinsn_t);
>  extern void debug_vinsn (vinsn_t);
>
> +extern void dump (vinsn_def &ref);
> +extern void dump (vinsn_def *ptr);
> +extern void dump_verbose (vinsn_def &ref);
> +extern void dump_verbose (vinsn_def *ptr);
> +
> +
>  /* These values control dumping of expressions.  The meaning of the fields
>     is explained in sel-sched-ir.h.  */
>  enum dump_expr_def
> @@ -146,6 +152,12 @@ extern void dump_expr_1 (expr_t, int);
>  extern void dump_expr (expr_t);
>  extern void debug_expr (expr_t);
>
> +extern void dump (expr_def &ref);
> +extern void dump (expr_def *ptr);
> +extern void dump_verbose (expr_def &ref);
> +extern void dump_verbose (expr_def *ptr);
> +
> +
>  /* A enumeration for dumping flags of an insn.  The difference from
>     dump_insn_rtx_def is that these fields are for insns in stream only.  */
>  enum dump_insn_def
> @@ -214,6 +226,8 @@ extern void debug_av_set (av_set_t);
>  extern void debug_lv_set (regset);
>  extern void debug_ilist (ilist_t);
>  extern void debug_blist (blist_t);
> +extern void dump (vec<rtx> &ref);
> +extern void dump (vec<rtx> *ptr);
>  extern void debug_insn_vector (rtx_vec_t);
>  extern void debug_hard_reg_set (HARD_REG_SET);
>  extern rtx debug_mem_addr_value (rtx);
> Index: gcc/tree-data-ref.c
> ===================================================================
> --- gcc/tree-data-ref.c (revision 196604)
> +++ gcc/tree-data-ref.c (working copy)
> @@ -149,6 +149,24 @@ dump_data_references (FILE *file, vec<da
>      dump_data_reference (file, dr);
>  }
>
> +/* Unified dump into FILE all the data references from DATAREFS.  */
> +
> +DEBUG_FUNCTION void
> +dump (vec<data_reference_p> &ref)
> +{
> +  dump_data_references (stderr, ref);
> +}
> +
> +DEBUG_FUNCTION void
> +dump (vec<data_reference_p> *ptr)
> +{
> +  if (ptr)
> +    dump (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> +
> +
>  /* Dump into STDERR all the data references from DATAREFS.  */
>
>  DEBUG_FUNCTION void
> @@ -190,6 +208,24 @@ dump_data_reference (FILE *outf,
>    fprintf (outf, "#)\n");
>  }
>
> +/* Unified dump function for a DATA_REFERENCE structure.  */
> +
> +DEBUG_FUNCTION void
> +dump (data_reference &ref)
> +{
> +  dump_data_reference (stderr, &ref);
> +}
> +
> +DEBUG_FUNCTION void
> +dump (data_reference *ptr)
> +{
> +  if (ptr)
> +    dump (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> +
> +
>  /* Dumps the affine function described by FN to the file OUTF.  */
>
>  static void
> @@ -442,6 +478,22 @@ dump_data_dependence_relations (FILE *fi
>      dump_data_dependence_relation (file, ddr);
>  }
>
> +DEBUG_FUNCTION void
> +dump (vec<ddr_p> &ref)
> +{
> +  dump_data_dependence_relations (stderr, ref);
> +}
> +
> +DEBUG_FUNCTION void
> +dump (vec<ddr_p> *ptr)
> +{
> +  if (ptr)
> +    dump (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> +
> +
>  /* Dump to STDERR all the dependence relations from DDRS.  */
>
>  DEBUG_FUNCTION void
> Index: gcc/tree-data-ref.h
> ===================================================================
> --- gcc/tree-data-ref.h (revision 196604)
> +++ gcc/tree-data-ref.h (working copy)
> @@ -369,10 +369,16 @@ extern bool compute_data_dependences_for
>                                               vec<ddr_p> *);
>  extern void debug_ddrs (vec<ddr_p> );
>  extern void dump_data_reference (FILE *, struct data_reference *);
> +extern void dump (data_reference &ref);
> +extern void dump (data_reference *ptr);
>  extern void debug_data_reference (struct data_reference *);
>  extern void debug_data_references (vec<data_reference_p> );
> +extern void dump (vec<data_reference_p> &ref);
> +extern void dump (vec<data_reference_p> *ptr);
>  extern void debug_data_dependence_relation (struct data_dependence_relation *);
>  extern void dump_data_dependence_relations (FILE *, vec<ddr_p> );
> +extern void dump (vec<ddr_p> &ref);
> +extern void dump (vec<ddr_p> *ptr);
>  extern void debug_data_dependence_relations (vec<ddr_p> );
>  extern void free_dependence_relation (struct data_dependence_relation *);
>  extern void free_dependence_relations (vec<ddr_p> );
> Index: gcc/tree-cfg.c
> ===================================================================
> --- gcc/tree-cfg.c      (revision 196604)
> +++ gcc/tree-cfg.c      (working copy)
> @@ -7031,7 +7031,8 @@ print_loop (FILE *file, struct loop *loo
>     loop, or just its structure.  */
>
>  static void
> -print_loop_and_siblings (FILE *file, struct loop *loop, int indent,
> int verbosity)
> +print_loop_and_siblings (FILE *file, struct loop *loop, int indent,
> +                        int verbosity)
>  {
>    if (loop == NULL)
>      return;
> @@ -7053,6 +7054,40 @@ print_loops (FILE *file, int verbosity)
>      print_loop_and_siblings (file, bb->loop_father, 0, verbosity);
>  }
>
> +/* Dump a loop.  */
> +
> +DEBUG_FUNCTION void
> +dump (struct loop &ref)
> +{
> +  print_loop (stderr, &ref, 0, /*verbosity*/0);
> +}
> +
> +DEBUG_FUNCTION void
> +dump (struct loop *ptr)
> +{
> +  if (ptr)
> +    dump (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> +
> +/* Dump a loop verbosely.  */
> +
> +DEBUG_FUNCTION void
> +dump_verbose (struct loop &ref)
> +{
> +  print_loop (stderr, &ref, 0, /*verbosity*/3);
> +}
> +
> +DEBUG_FUNCTION void
> +dump_verbose (struct loop *ptr)
> +{
> +  if (ptr)
> +    dump (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> +
>
>  /* Debugging loops structure at tree level, at some VERBOSITY level.  */
>
> Index: gcc/tree.h
> ===================================================================
> --- gcc/tree.h  (revision 196604)
> +++ gcc/tree.h  (working copy)
> @@ -5983,7 +5983,19 @@ extern void print_rtl (FILE *, const_rtx
>
>  /* In print-tree.c */
>  extern void debug_tree (tree);
> +extern void dump_raw (const tree_node &ref);
> +extern void dump_raw (const tree_node *ptr);
> +extern void dump (const tree_node &ref);
> +extern void dump (const tree_node *ptr);
> +extern void dump_verbose (const tree_node &ref);
> +extern void dump_verbose (const tree_node *ptr);
> +extern void dump_head (const tree_node &ref);
> +extern void dump_head (const tree_node *ptr);
> +extern void dump_body (const tree_node &ref);
> +extern void dump_body (const tree_node *ptr);
>  extern void debug_vec_tree (vec<tree, va_gc> *);
> +extern void dump (vec<tree, va_gc> &ref);
> +extern void dump (vec<tree, va_gc> *ptr);
>  #ifdef BUFSIZ
>  extern void dump_addr (FILE*, const char *, const void *);
>  extern void print_node (FILE *, const char *, tree, int);
> Index: gcc/tree-flow.h
> ===================================================================
> --- gcc/tree-flow.h     (revision 196604)
> +++ gcc/tree-flow.h     (working copy)
> @@ -378,6 +378,10 @@ extern void dot_cfg (void);
>  extern void debug_cfg_stats (void);
>  extern void debug_loops (int);
>  extern void debug_loop (struct loop *, int);
> +extern void dump (struct loop &ref);
> +extern void dump (struct loop *ptr);
> +extern void dump_verbose (struct loop &ref);
> +extern void dump_verbose (struct loop *ptr);
>  extern void debug_loop_num (unsigned, int);
>  extern void print_loops (FILE *, int);
>  extern void print_loops_bb (FILE *, basic_block, int, int);
> Index: gcc/cfg.c
> ===================================================================
> --- gcc/cfg.c   (revision 196604)
> +++ gcc/cfg.c   (working copy)
> @@ -504,6 +504,23 @@ dump_edge_info (FILE *file, edge e, int
>        fputc (')', file);
>      }
>  }
> +
> +DEBUG_FUNCTION void
> +dump (edge_def &ref)
> +{
> +  /* FIXME (crowl): Is this desireable?  */
> +  dump_edge_info (stderr, &ref, 0, false);
> +  dump_edge_info (stderr, &ref, 0, true);
> +}
> +
> +DEBUG_FUNCTION void
> +dump (edge_def *ptr)
> +{
> +  if (ptr)
> +    dump (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
>
>  /* Simple routines to easily allocate AUX fields of basic blocks.  */
>
> Index: gcc/Makefile.in
> ===================================================================
> --- gcc/Makefile.in     (revision 196604)
> +++ gcc/Makefile.in     (working copy)
> @@ -834,6 +834,7 @@ REVISION_s  := "\"\""
>  endif
>
>  # Shorthand variables for dependency lists.
> +DUMPFILE_H = $(srcdir)/../libcpp/include/line-map.h dumpfile.h
>  VEC_H = vec.h statistics.h $(GGC_H)
>  HASH_TABLE_H = $(HASHTAB_H) hash-table.h
>  EXCEPT_H = except.h $(HASHTAB_H)
> @@ -931,8 +932,8 @@ MKDEPS_H = $(srcdir)/../libcpp/include/m
>  SYMTAB_H = $(srcdir)/../libcpp/include/symtab.h $(OBSTACK_H)
>  CPP_ID_DATA_H = $(CPPLIB_H) $(srcdir)/../libcpp/include/cpp-id-data.h
>  CPP_INTERNAL_H = $(srcdir)/../libcpp/internal.h $(CPP_ID_DATA_H)
> -TREE_DUMP_H = tree-dump.h $(SPLAY_TREE_H) dumpfile.h
> -TREE_PASS_H = tree-pass.h $(TIMEVAR_H) dumpfile.h
> +TREE_DUMP_H = tree-dump.h $(SPLAY_TREE_H) $(DUMPFILE_H)
> +TREE_PASS_H = tree-pass.h $(TIMEVAR_H) $(DUMPFILE_H)
>  TREE_FLOW_H = tree-flow.h tree-flow-inline.h tree-ssa-operands.h \
>                 $(BITMAP_H) sbitmap.h $(BASIC_BLOCK_H) $(GIMPLE_H) \
>                 $(HASHTAB_H) $(CGRAPH_H) $(IPA_REFERENCE_H) \
> @@ -953,7 +954,8 @@ TREE_DATA_REF_H = tree-data-ref.h $(OMEG
>  TREE_INLINE_H = tree-inline.h
>  REAL_H = real.h $(MACHMODE_H)
>  IRA_INT_H = ira.h ira-int.h $(CFGLOOP_H) alloc-pool.h
> -LRA_INT_H = lra.h $(BITMAP_H) $(RECOG_H) $(INSN_ATTR_H) insn-codes.h lra-int.h
> +LRA_INT_H = lra.h $(BITMAP_H) $(RECOG_H) $(INSN_ATTR_H) insn-codes.h \
> +   insn-config.h $(REGS_H) lra-int.h
>  DBGCNT_H = dbgcnt.h dbgcnt.def
>  LTO_STREAMER_H = lto-streamer.h $(LINKER_PLUGIN_API_H) $(TARGET_H) \
>                 $(CGRAPH_H) $(VEC_H) $(TREE_H) $(GIMPLE_H) \
> @@ -1851,7 +1853,7 @@ gcc.srcextra: gengtype-lex.c
>
>  graph.o: graph.c graph.h $(CONFIG_H) $(SYSTEM_H) coretypes.h \
>      $(DIAGNOSTIC_CORE_H) sbitmap.h $(BASIC_BLOCK_H) $(CFGLOOP_H) \
> -    $(PRETTY_PRINT_H) dumpfile.h
> +    $(PRETTY_PRINT_H) $(DUMPFILE_H)
>
>  sbitmap.o: sbitmap.c sbitmap.h $(CONFIG_H) $(SYSTEM_H) coretypes.h
>  sparseset.o: sparseset.c $(SYSTEM_H) sparseset.h $(CONFIG_H)
> @@ -1956,7 +1958,7 @@ c-family/c-gimplify.o : c-family/c-gimpl
>         $(C_COMMON_H) $(DIAGNOSTIC_CORE_H) $(GIMPLE_H) \
>         $(FLAGS_H) langhooks.h $(LANGHOOKS_DEF_H) \
>         $(TM_H) coretypes.h $(C_PRETTY_PRINT_H) $(CGRAPH_H) \
> -       dumpfile.h $(TREE_INLINE_H)
> +       $(DUMPFILE_H) $(TREE_INLINE_H)
>
>  c-family/c-lex.o : c-family/c-lex.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
>         $(TM_H) $(TREE_H) $(FIXED_VALUE_H) debug.h $(C_COMMON_H) $(SPLAY_TREE_H) \
> @@ -2000,7 +2002,7 @@ c-family/c-semantics.o : c-family/c-sema
>
>  c-family/c-ada-spec.o : c-family/c-ada-spec.c c-family/c-ada-spec.h \
>         $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(CPP_ID_DATA_H) $(TM_H) \
> -       coretypes.h tree-iterator.h dumpfile.h
> +       coretypes.h tree-iterator.h $(DUMPFILE_H)
>
>  c-family/stub-objc.o : c-family/stub-objc.c $(CONFIG_H) $(SYSTEM_H) \
>         coretypes.h $(TREE_H) $(C_COMMON_H) c-family/c-objc.h
> @@ -2202,6 +2204,11 @@ langhooks.o : langhooks.c $(CONFIG_H) $(
>     $(TREE_H) toplev.h $(DIAGNOSTIC_CORE_H) $(TREE_INLINE_H) $(RTL_H)
> insn-config.h \
>     langhooks.h $(TARGET_H) $(LANGHOOKS_DEF_H) $(FLAGS_H) $(GGC_H)
> $(DIAGNOSTIC_H) \
>     intl.h $(GIMPLE_H) $(CGRAPH_H) output.h tree-diagnostic.h
> +test-dump.o : test-dump.c $(CONFIG_H) $(SYSTEM_H) $(CORETYPES_H) \
> +   $(BITMAP_H) sbitmap.h sreal.h $(TREE_H) $(CXX_PARSER_H) $(DWARF2OUT_H) \
> +   $(GIMPLE_PRETTY_PRINT_H) $(BASIC_BLOCK_H) insn-config.h $(LRA_INT.H) \
> +   $(SEL_SCHED_DUMP_H) $(IRA_INT_H) $(TREE_DATA_REF_H) $(TREE_FLOW_H) \
> +   $(TREE_SSA_LIVE_H) tree-ssa-alias.h $(OMEGA_H) $(RTL_H)
>  tree.o: tree.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
>     all-tree.def $(FLAGS_H) $(FUNCTION_H) $(PARAMS_H) \
>     toplev.h $(DIAGNOSTIC_CORE_H) $(GGC_H) $(HASHTAB_H) $(TARGET_H)
> output.h $(TM_P_H) \
> @@ -2211,7 +2218,7 @@ tree.o: tree.c $(CONFIG_H) $(SYSTEM_H) c
>     $(EXCEPT_H) debug.h intl.h tree-diagnostic.h $(TREE_PRETTY_PRINT_H) \
>     $(COMMON_TARGET_H)
>  tree-dump.o: tree-dump.c $(CONFIG_H) $(SYSTEM_H) $(TM_H) $(TREE_H) \
> -   langhooks.h $(TREE_DUMP_H) tree-iterator.h
> +   langhooks.h $(TREE_DUMP_H) tree-iterator.h $(TREE_PRETTY_PRINT_H)
>  tree-inline.o : tree-inline.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
>     $(TREE_H) $(RTL_H) $(FLAGS_H) $(PARAMS_H) $(INPUT_H) insn-config.h \
>     $(HASHTAB_H) langhooks.h $(TREE_INLINE_H) $(CGRAPH_H) \
> @@ -2219,9 +2226,9 @@ tree-inline.o : tree-inline.c $(CONFIG_H
>     debug.h $(DIAGNOSTIC_H) $(EXCEPT_H) $(TREE_FLOW_H) tree-iterator.h
> tree-mudflap.h \
>     $(IPA_PROP_H) value-prof.h $(TREE_PASS_H) $(TARGET_H) \
>     $(TREE_PRETTY_PRINT_H)
> -print-tree.o : print-tree.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h \
> +print-tree.o : print-tree.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
>     $(TM_H) $(TREE_H) $(GGC_H) langhooks.h tree-iterator.h \
> -   $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(GIMPLE_PRETTY_PRINT_H)
> +   $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(GIMPLE_PRETTY_PRINT_H) $(TREE_DUMP_H)
>  stor-layout.o : stor-layout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
>     $(TREE_H) $(PARAMS_H) $(FLAGS_H) $(FUNCTION_H) $(EXPR_H) $(RTL_H) \
>     $(GGC_H) $(TM_P_H) $(TARGET_H) langhooks.h $(REGS_H) gt-stor-layout.h \
> @@ -2271,15 +2278,15 @@ tree-into-ssa.o : tree-into-ssa.c $(TREE
>     $(BITMAP_H) $(CFGLOOP_H) $(FLAGS_H) $(HASHTAB_H) \
>     $(GIMPLE_H) $(TREE_INLINE_H) $(GIMPLE_PRETTY_PRINT_H)
>  tree-ssa-ter.o : tree-ssa-ter.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
> -   $(TREE_H) $(DIAGNOSTIC_H) $(TM_H) coretypes.h dumpfile.h \
> +   $(TREE_H) $(DIAGNOSTIC_H) $(TM_H) coretypes.h $(DUMPFILE_H) \
>     $(TREE_SSA_LIVE_H) $(BITMAP_H) $(FLAGS_H) \
>     $(GIMPLE_PRETTY_PRINT_H)
>  tree-ssa-coalesce.o : tree-ssa-coalesce.c $(TREE_FLOW_H) $(CONFIG_H) \
> -   $(SYSTEM_H) $(TREE_H) $(DIAGNOSTIC_H) $(TM_H) coretypes.h dumpfile.h \
> +   $(SYSTEM_H) $(TREE_H) $(DIAGNOSTIC_H) $(TM_H) coretypes.h $(DUMPFILE_H) \
>     $(TREE_SSA_LIVE_H) $(BITMAP_H) $(FLAGS_H) $(HASH_TABLE_H) \
>     $(TREE_PRETTY_PRINT_H)
>  tree-outof-ssa.o : tree-outof-ssa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
> -   $(TREE_H) $(DIAGNOSTIC_H) $(TM_H) coretypes.h dumpfile.h \
> +   $(TREE_H) $(DIAGNOSTIC_H) $(TM_H) coretypes.h $(DUMPFILE_H) \
>     $(TREE_SSA_LIVE_H) $(BASIC_BLOCK_H) $(BITMAP_H) $(GGC_H) \
>     $(EXPR_H) $(SSAEXPAND_H) $(GIMPLE_PRETTY_PRINT_H)
>  tree-ssa-dse.o : tree-ssa-dse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
> @@ -2316,7 +2323,7 @@ tree-ssa-copy.o : tree-ssa-copy.c $(TREE
>     $(FLAGS_H) $(CFGLOOP_H) $(GIMPLE_PRETTY_PRINT_H)
>  tree-ssa-propagate.o : tree-ssa-propagate.c $(TREE_FLOW_H) $(CONFIG_H) \
>     $(SYSTEM_H) $(TREE_H) $(TM_P_H) \
> -   $(DIAGNOSTIC_H) $(FUNCTION_H) $(TM_H) coretypes.h dumpfile.h \
> +   $(DIAGNOSTIC_H) $(FUNCTION_H) $(TM_H) coretypes.h $(DUMPFILE_H) \
>     $(BASIC_BLOCK_H) langhooks.h \
>     tree-ssa-propagate.h $(VEC_H) value-prof.h gt-tree-ssa-propagate.h
> $(FLAGS_H) \
>     $(GIMPLE_H) $(GIMPLE_PRETTY_PRINT_H)
> @@ -2332,14 +2339,14 @@ tree-ssa-uncprop.o : tree-ssa-uncprop.c
>     $(BASIC_BLOCK_H) domwalk.h $(TREE_PASS_H) $(FLAGS_H) \
>     tree-ssa-propagate.h
>  tree-ssa-threadedge.o : tree-ssa-threadedge.c $(TREE_FLOW_H) $(CONFIG_H) \
> -   $(SYSTEM_H) coretypes.h dumpfile.h $(TM_H) $(TREE_H) $(FLAGS_H) $(TM_P_H) \
> -   $(BASIC_BLOCK_H) $(CFGLOOP_H) \
> +   $(SYSTEM_H) coretypes.h $(DUMPFILE_H) $(TM_H) $(TREE_H) $(FLAGS_H) \
> +   $(TM_P_H) $(BASIC_BLOCK_H) $(CFGLOOP_H) \
>     $(FUNCTION_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TREE_FLOW_H) \
>     tree-ssa-propagate.h langhooks.h \
>     $(PARAMS_H)
>  tree-ssa-threadupdate.o : tree-ssa-threadupdate.c $(TREE_FLOW_H) $(CONFIG_H) \
>     $(SYSTEM_H) $(TREE_H) $(TM_P_H) $(HASH_TABLE_H) \
> -   $(DIAGNOSTIC_H) $(FUNCTION_H) $(TM_H) coretypes.h dumpfile.h \
> +   $(DIAGNOSTIC_H) $(FUNCTION_H) $(TM_H) coretypes.h $(DUMPFILE_H) \
>     $(BASIC_BLOCK_H) $(FLAGS_H) $(CFGLOOP_H)
>  tree-ssanames.o : tree-ssanames.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
>     $(TM_H) $(TREE_H) $(TREE_FLOW_H) $(TREE_PASS_H)
> @@ -2349,7 +2356,7 @@ tree-phinodes.o : tree-phinodes.c $(CONF
>  domwalk.o : domwalk.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
>     $(BASIC_BLOCK_H) domwalk.h sbitmap.h
>  tree-ssa-live.o : tree-ssa-live.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
> -   $(TREE_H) $(DIAGNOSTIC_H) $(TM_H) coretypes.h dumpfile.h $(TIMEVAR_H) \
> +   $(TREE_H) $(DIAGNOSTIC_H) $(TM_H) coretypes.h $(DUMPFILE_H) $(TIMEVAR_H) \
>     $(TREE_SSA_LIVE_H) $(BITMAP_H) debug.h $(FLAGS_H) \
>     $(GIMPLE_PRETTY_PRINT_H) $(GIMPLE_H)
>  tree-ssa-copyrename.o : tree-ssa-copyrename.c $(TREE_FLOW_H) $(CONFIG_H) \
> @@ -2365,7 +2372,7 @@ tree-ssa-pre.o : tree-ssa-pre.c $(TREE_F
>     $(DBGCNT_H) tree-scalar-evolution.h $(GIMPLE_PRETTY_PRINT_H) domwalk.h
>  tree-ssa-sccvn.o : tree-ssa-sccvn.c $(TREE_FLOW_H) $(CONFIG_H) \
>     $(SYSTEM_H) $(TREE_H) $(DIAGNOSTIC_H) \
> -   $(TM_H) coretypes.h dumpfile.h $(FLAGS_H) $(CFGLOOP_H) \
> +   $(TM_H) coretypes.h $(DUMPFILE_H) $(FLAGS_H) $(CFGLOOP_H) \
>     alloc-pool.h $(BASIC_BLOCK_H) $(BITMAP_H) $(HASHTAB_H) $(GIMPLE_H) \
>     $(TREE_INLINE_H) tree-ssa-propagate.h tree-ssa-sccvn.h \
>     $(PARAMS_H) $(GIMPLE_PRETTY_PRINT_H) gimple-fold.h
> @@ -2420,8 +2427,8 @@ tree-dfa.o : tree-dfa.c $(TREE_FLOW_H) $
>     $(TREE_PRETTY_PRINT_H)
>  tree-ssa-operands.o : tree-ssa-operands.c $(TREE_FLOW_H) $(CONFIG_H) \
>     $(SYSTEM_H) $(TREE_H) $(GGC_H) $(DIAGNOSTIC_H) $(TREE_INLINE_H) \
> -   $(FLAGS_H) $(FUNCTION_H) $(TM_H) $(TIMEVAR_H) \
> -   coretypes.h dumpfile.h langhooks.h $(IPA_REFERENCE_H)
> $(GIMPLE_PRETTY_PRINT_H)
> +   $(FLAGS_H) $(FUNCTION_H) $(TM_H) $(TIMEVAR_H) coretypes.h $(DUMPFILE_H) \
> +   langhooks.h $(IPA_REFERENCE_H) $(GIMPLE_PRETTY_PRINT_H)
>  tree-eh.o : tree-eh.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
>     $(TREE_H) $(TM_H) $(FLAGS_H) $(FUNCTION_H) $(EXCEPT_H) langhooks.h \
>     $(GGC_H) $(TREE_PASS_H) coretypes.h pointer-set.h \
> @@ -2438,13 +2445,13 @@ tree-ssa-loop-unswitch.o : tree-ssa-loop
>      $(TREE_INLINE_H)
>  tree-ssa-address.o : tree-ssa-address.c $(TREE_FLOW_H) $(CONFIG_H) \
>     $(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) \
> -   $(DIAGNOSTIC_H) $(TM_H) coretypes.h dumpfile.h \
> +   $(DIAGNOSTIC_H) $(TM_H) coretypes.h $(DUMPFILE_H) \
>     $(FLAGS_H) $(TREE_INLINE_H) $(RECOG_H) insn-config.h \
>     $(EXPR_H) gt-tree-ssa-address.h $(GGC_H) tree-affine.h $(TARGET_H) \
>     $(TREE_PRETTY_PRINT_H) expmed.h
>  tree-ssa-loop-niter.o : tree-ssa-loop-niter.c $(TREE_FLOW_H) $(CONFIG_H) \
>     $(SYSTEM_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) $(PARAMS_H) \
> -   $(TREE_INLINE_H) $(DIAGNOSTIC_H) $(TM_H) coretypes.h dumpfile.h \
> +   $(TREE_INLINE_H) $(DIAGNOSTIC_H) $(TM_H) coretypes.h $(DUMPFILE_H) \
>     $(DIAGNOSTIC_CORE_H) $(FLAGS_H) $(TREE_DATA_REF_H) \
>     $(BASIC_BLOCK_H) $(GGC_H) intl.h $(GIMPLE_PRETTY_PRINT_H)
>  tree-ssa-loop-ivcanon.o : tree-ssa-loop-ivcanon.c $(TREE_FLOW_H) $(CONFIG_H) \
> @@ -2476,10 +2483,10 @@ tree-ssa-loop-ivopts.o : tree-ssa-loop-i
>     $(GIMPLE_PRETTY_PRINT_H) tree-ssa-propagate.h
>  tree-affine.o : tree-affine.c tree-affine.h $(CONFIG_H) pointer-set.h \
>     $(SYSTEM_H) $(TREE_H) $(GIMPLE_H) \
> -   coretypes.h dumpfile.h $(FLAGS_H) \
> +   coretypes.h $(DUMPFILE_H) $(FLAGS_H) \
>     $(TREE_PRETTY_PRINT_H)
>  tree-ssa-loop-manip.o : tree-ssa-loop-manip.c $(TREE_FLOW_H) $(CONFIG_H) \
> -   $(SYSTEM_H) coretypes.h dumpfile.h $(TM_H) $(TREE_H) \
> +   $(SYSTEM_H) coretypes.h $(DUMPFILE_H) $(TM_H) $(TREE_H) \
>     $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) \
>     $(CFGLOOP_H) $(TREE_PASS_H) \
>     $(SCEV_H) $(PARAMS_H) $(TREE_INLINE_H) langhooks.h
> @@ -2494,7 +2501,7 @@ tree-ssa-math-opts.o : tree-ssa-math-opt
>     $(DIAGNOSTIC_H) $(RTL_H) $(EXPR_H) $(OPTABS_H) $(GIMPLE_PRETTY_PRINT_H)
>  tree-ssa-alias.o : tree-ssa-alias.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
>     $(TREE_H) $(TM_P_H) $(GGC_H) $(TREE_INLINE_H) $(FLAGS_H) \
> -   $(FUNCTION_H) $(TIMEVAR_H) convert.h $(TM_H) coretypes.h dumpfile.h \
> +   $(FUNCTION_H) $(TIMEVAR_H) convert.h $(TM_H) coretypes.h $(DUMPFILE_H) \
>     langhooks.h \
>     $(PARAMS_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) \
>     $(GIMPLE_H) $(VEC_H) $(TARGET_H) \
> @@ -2522,8 +2529,8 @@ gimplify.o : gimplify.c $(CONFIG_H) $(SY
>     $(SPLAY_TREE_H) $(VEC_H) tree-iterator.h $(TREE_PASS_H)
> $(TREE_PRETTY_PRINT_H)
>  gimple-iterator.o : gimple-iterator.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
>     $(TREE_H) $(GIMPLE_H) $(TREE_FLOW_H) value-prof.h
> -gimple-fold.o : gimple-fold.c $(TREE_FLOW_H) $(CONFIG_H) coretypes.h
> dumpfile.h \
> -   $(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(GGC_H) \
> +gimple-fold.o : gimple-fold.c $(TREE_FLOW_H) $(CONFIG_H) coretypes.h \
> +   $(DUMPFILE_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(GGC_H) \
>     $(FUNCTION_H) $(TM_H) $(BASIC_BLOCK_H) langhooks.h \
>     tree-ssa-propagate.h $(FLAGS_H) $(TARGET_H) gimple-fold.h
>  gimple-low.o : gimple-low.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
> @@ -2538,15 +2545,16 @@ omp-low.o : omp-low.c $(CONFIG_H) $(SYST
>     $(CFGLOOP_H) tree-iterator.h gt-omp-low.h
>  tree-browser.o : tree-browser.c tree-browser.def $(CONFIG_H) $(SYSTEM_H) \
>     coretypes.h $(TREE_H) $(TREE_PRETTY_PRINT_H)
> -omega.o : omega.c $(OMEGA_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h \
> +omega.o : omega.c $(OMEGA_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h
> $(DUMPFILE_H) \
>     $(TREE_H) $(DIAGNOSTIC_CORE_H)
> -tree-chrec.o : tree-chrec.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h \
> +tree-chrec.o : tree-chrec.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
>     $(TREE_PRETTY_PRINT_H) $(CFGLOOP_H) $(TREE_FLOW_H) $(SCEV_H) \
>     $(PARAMS_H)
>  tree-scalar-evolution.o : tree-scalar-evolution.c $(CONFIG_H) $(SYSTEM_H) \
> -   coretypes.h dumpfile.h $(GIMPLE_PRETTY_PRINT_H) $(TREE_FLOW_H)
> $(CFGLOOP_H) $(SCEV_H) \
> -   $(PARAMS_H) gt-tree-scalar-evolution.h
> -tree-data-ref.o : tree-data-ref.c $(CONFIG_H) $(SYSTEM_H) coretypes.h
> dumpfile.h \
> +   coretypes.h $(DUMPFILE_H) $(GIMPLE_PRETTY_PRINT_H) $(TREE_FLOW_H) \
> +   $(CFGLOOP_H) $(SCEV_H) $(PARAMS_H) gt-tree-scalar-evolution.h
> +tree-data-ref.o : tree-data-ref.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
> +   $(DUMPFILE_H) \
>     $(GIMPLE_PRETTY_PRINT_H) $(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \
>     langhooks.h tree-affine.h $(PARAMS_H)
>  sese.o : sese.c sese.h $(CONFIG_H) $(SYSTEM_H) coretypes.h
> $(TREE_PRETTY_PRINT_H) \
> @@ -2556,7 +2564,7 @@ graphite.o : graphite.c $(CONFIG_H) $(SY
>     $(DBGCNT_H) graphite-poly.h graphite-scop-detection.h \
>     graphite-clast-to-gimple.h graphite-sese-to-poly.h
>  graphite-blocking.o : graphite-blocking.c $(CONFIG_H) $(SYSTEM_H) \
> -   coretypes.h dumpfile.h $(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \
> +   coretypes.h $(DUMPFILE_H) $(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \
>     sese.h graphite-poly.h
>  graphite-clast-to-gimple.o : graphite-clast-to-gimple.c $(CONFIG_H) \
>     $(SYSTEM_H) coretypes.h $(DIAGNOSTIC_CORE_H) $(TREE_FLOW_H) $(TREE_PASS_H) \
> @@ -2566,10 +2574,10 @@ graphite-dependences.o : graphite-depend
>     coretypes.h $(TREE_FLOW_H) $(TREE_PASS_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \
>     sese.h graphite-poly.h
>  graphite-interchange.o : graphite-interchange.c $(CONFIG_H) $(SYSTEM_H) \
> -   coretypes.h dumpfile.h $(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \
> +   coretypes.h $(DUMPFILE_H) $(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \
>     sese.h graphite-poly.h
> -graphite-poly.o : graphite-poly.c $(CONFIG_H) $(SYSTEM_H) coretypes.h
> dumpfile.h \
> -   $(DIAGNOSTIC_CORE_H) $(TREE_FLOW_H) $(GIMPLE_PRETTY_PRINT_H) \
> +graphite-poly.o : graphite-poly.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
> +   $(DUMPFILE_H) $(DIAGNOSTIC_CORE_H) $(TREE_FLOW_H) $(GIMPLE_PRETTY_PRINT_H) \
>     $(CFGLOOP_H) $(TREE_DATA_REF_H) sese.h graphite-poly.h
>  graphite-scop-detection.o : graphite-scop-detection.c $(CONFIG_H) $(SYSTEM_H) \
>     coretypes.h $(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) $(TREE_PASS_H) \
> @@ -2579,40 +2587,40 @@ graphite-sese-to-poly.o : graphite-sese-
>     $(TREE_DATA_REF_H) domwalk.h sese.h graphite-poly.h \
>     graphite-sese-to-poly.h
>  graphite-optimize-isl.o : graphite-optimize-isl.c $(CONFIG_H) $(SYSTEM_H) \
> -    coretypes.h dumpfile.h $(TREE_FLOW_H) $(CFGLOOP_H)
> $(TREE_DATA_REF_H) $(SCEV_H) \
> -    sese.h graphite-poly.h
> +    coretypes.h $(DUMPFILE_H) $(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \
> +    $(SCEV_H) sese.h graphite-poly.h
>  tree-vect-loop.o: tree-vect-loop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
> -   $(TM_H) $(GGC_H) $(TREE_H) $(BASIC_BLOCK_H) $(TREE_FLOW_H) dumpfile.h \
> +   $(TM_H) $(GGC_H) $(TREE_H) $(BASIC_BLOCK_H) $(TREE_FLOW_H) $(DUMPFILE_H) \
>     $(CFGLOOP_H) $(EXPR_H) $(RECOG_H) $(OPTABS_H) \
>     $(DIAGNOSTIC_CORE_H) $(SCEV_H) $(TREE_VECTORIZER_H) \
>     $(GIMPLE_PRETTY_PRINT_H) $(TARGET_H) $(TREE_DATA_REF_H)
>  tree-vect-loop-manip.o: tree-vect-loop-manip.c $(CONFIG_H) $(SYSTEM_H) \
> -   coretypes.h dumpfile.h $(TM_H) $(GGC_H) $(TREE_H) $(BASIC_BLOCK_H) \
> +   coretypes.h $(DUMPFILE_H) $(TM_H) $(GGC_H) $(TREE_H) $(BASIC_BLOCK_H) \
>     $(TREE_FLOW_H) $(CFGLOOP_H) $(DIAGNOSTIC_CORE_H) \
>     $(SCEV_H) $(TREE_VECTORIZER_H) langhooks.h $(GIMPLE_PRETTY_PRINT_H)
>  tree-vect-patterns.o: tree-vect-patterns.c $(CONFIG_H) $(SYSTEM_H) \
> -   coretypes.h dumpfile.h \
> +   coretypes.h $(DUMPFILE_H) \
>     $(TM_H) $(GGC_H) $(TREE_H) $(TARGET_H) $(BASIC_BLOCK_H) \
>     $(TREE_FLOW_H) $(CFGLOOP_H) $(EXPR_H) $(OPTABS_H) $(PARAMS_H) \
>     $(TREE_DATA_REF_H) $(TREE_VECTORIZER_H) $(RECOG_H) $(DIAGNOSTIC_CORE_H) \
>     $(GIMPLE_PRETTY_PRINT_H)
>  tree-vect-slp.o: tree-vect-slp.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
> -   dumpfile.h $(TM_H) $(GGC_H) $(TREE_H) $(TARGET_H) $(BASIC_BLOCK_H) \
> +   $(DUMPFILE_H) $(TM_H) $(GGC_H) $(TREE_H) $(TARGET_H) $(BASIC_BLOCK_H) \
>     $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(CFGLOOP_H) \
>     $(EXPR_H) $(RECOG_H) $(OPTABS_H) $(TREE_VECTORIZER_H) \
>     $(GIMPLE_PRETTY_PRINT_H) $(TREE_DATA_REF_H) langhooks.h
>  tree-vect-stmts.o: tree-vect-stmts.c $(CONFIG_H) $(SYSTEM_H) \
> -   coretypes.h dumpfile.h $(TM_H) $(GGC_H) $(TREE_H) $(TARGET_H) \
> +   coretypes.h $(DUMPFILE_H) $(TM_H) $(GGC_H) $(TREE_H) $(TARGET_H) \
>     $(BASIC_BLOCK_H) $(TREE_FLOW_H) $(CFGLOOP_H) \
>     $(EXPR_H) $(RECOG_H) $(OPTABS_H) $(TREE_VECTORIZER_H) \
>     langhooks.h $(GIMPLE_PRETTY_PRINT_H)
>  tree-vect-data-refs.o: tree-vect-data-refs.c $(CONFIG_H) $(SYSTEM_H) \
> -   coretypes.h dumpfile.h $(TM_H) $(GGC_H) $(TREE_H) $(TARGET_H)
> $(BASIC_BLOCK_H) \
> -   $(TREE_FLOW_H) $(CFGLOOP_H) \
> +   coretypes.h $(DUMPFILE_H) $(TM_H) $(GGC_H) $(TREE_H) $(TARGET_H) \
> +   $(BASIC_BLOCK_H) $(TREE_FLOW_H) $(CFGLOOP_H) \
>     $(EXPR_H) $(OPTABS_H) $(SCEV_H) $(TREE_VECTORIZER_H) \
>     $(DIAGNOSTIC_CORE_H) $(TM_P_H) $(GIMPLE_PRETTY_PRINT_H)
>  tree-vectorizer.o: tree-vectorizer.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
> -   dumpfile.h $(TM_H) $(GGC_H) $(TREE_H) $(TREE_FLOW_H) \
> +   $(DUMPFILE_H) $(TM_H) $(GGC_H) $(TREE_H) $(TREE_FLOW_H) \
>     $(CFGLOOP_H) $(TREE_PASS_H) $(TREE_VECTORIZER_H) \
>     $(TREE_PRETTY_PRINT_H)
>  tree-loop-distribution.o: tree-loop-distribution.c $(CONFIG_H) $(SYSTEM_H) \
> @@ -2633,7 +2641,7 @@ gimple.o : gimple.c $(CONFIG_H) $(SYSTEM
>     $(TREE_FLOW_H) value-prof.h $(FLAGS_H) $(DEMANGLE_H) \
>     $(TARGET_H) $(ALIAS_H)
>  gimple-pretty-print.o : gimple-pretty-print.c $(CONFIG_H) $(SYSTEM_H) \
> -   coretypes.h dumpfile.h \
> +   coretypes.h $(DUMPFILE_H) \
>     $(TREE_H) $(DIAGNOSTIC_H) $(HASHTAB_H) $(TREE_FLOW_H) \
>     $(TM_H) $(GIMPLE_H) value-prof.h \
>     $(TRANS_MEM_H) $(GIMPLE_PRETTY_PRINT_H)
> @@ -2648,9 +2656,10 @@ tree-nomudflap.o : $(CONFIG_H) $(SYSTEM_
>     $(GGC_H) gt-tree-mudflap.h $(TREE_PASS_H) $(DIAGNOSTIC_CORE_H)
>  tree-pretty-print.o : tree-pretty-print.c $(CONFIG_H) $(SYSTEM_H) \
>     $(TREE_H) $(DIAGNOSTIC_H) $(HASHTAB_H) $(TREE_FLOW_H) \
> -   $(TM_H) coretypes.h dumpfile.h tree-iterator.h $(SCEV_H) langhooks.h \
> +   $(TM_H) coretypes.h $(DUMPFILE_H) tree-iterator.h $(SCEV_H) langhooks.h \
>     value-prof.h output.h $(TREE_PRETTY_PRINT_H)
> -tree-diagnostic.o : tree-diagnostic.c $(CONFIG_H) $(SYSTEM_H)
> coretypes.h dumpfile.h \
> +tree-diagnostic.o : tree-diagnostic.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
> +   $(DUMPFILE_H) \
>     $(TREE_H) $(DIAGNOSTIC_H) tree-diagnostic.h langhooks.h $(LANGHOOKS_DEF_H) \
>     $(VEC_H) $(TREE_PRETTY_PRINT_H)
>  fold-const.o : fold-const.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
> @@ -2661,7 +2670,7 @@ diagnostic.o : diagnostic.c $(CONFIG_H)
>     version.h $(DEMANGLE_H) $(INPUT_H) intl.h $(BACKTRACE_H) $(DIAGNOSTIC_H) \
>     diagnostic.def
>  opts.o : opts.c $(OPTS_H) $(OPTIONS_H) $(DIAGNOSTIC_CORE_H)
> $(CONFIG_H) $(SYSTEM_H) \
> -   coretypes.h dumpfile.h $(TM_H) \
> +   coretypes.h $(DUMPFILE_H) $(TM_H) \
>     $(DIAGNOSTIC_H) insn-attr-common.h intl.h $(COMMON_TARGET_H) \
>     $(FLAGS_H) $(PARAMS_H) opts-diagnostic.h
>  opts-global.o : opts-global.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
> @@ -2731,8 +2740,8 @@ rtl-error.o: rtl-error.c $(SYSTEM_H) cor
>  rtl.o : rtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
>    $(GGC_H) $(BCONFIG_H) insn-notes.def reg-notes.def $(DIAGNOSTIC_CORE_H)
>
> -print-rtl.o : print-rtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h
> dumpfile.h $(TM_H) \
> -    $(RTL_H) $(TREE_H) hard-reg-set.h $(BASIC_BLOCK_H) $(FLAGS_H) \
> +print-rtl.o : print-rtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
> +    $(TM_H) $(RTL_H) $(TREE_H) hard-reg-set.h $(BASIC_BLOCK_H) $(FLAGS_H) \
>      $(BCONFIG_H) $(DIAGNOSTIC_H) cselib.h $(TREE_PRETTY_PRINT_H) \
>      $(DWARF2OUT_H)
>  rtlanal.o : rtlanal.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H)
> $(DIAGNOSTIC_CORE_H) \
> @@ -2755,7 +2764,8 @@ function.o : function.c $(CONFIG_H) $(SY
>     $(COMMON_TARGET_H)
>  statistics.o : statistics.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
>     $(TREE_PASS_H) $(TREE_DUMP_H) $(HASHTAB_H) statistics.h $(FUNCTION_H)
> -stmt.o : stmt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h
> $(TM_H) $(RTL_H) \
> +stmt.o : stmt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) $(TM_H) \
> +   $(RTL_H) \
>     $(TREE_H) $(FLAGS_H) $(FUNCTION_H) insn-config.h hard-reg-set.h $(EXPR_H) \
>     $(LIBFUNCS_H) $(EXCEPT_H) $(RECOG_H) $(DIAGNOSTIC_CORE_H) \
>     output.h $(GGC_H) $(TM_P_H) langhooks.h $(PREDICT_H) $(OPTABS_H) \
> @@ -2814,7 +2824,7 @@ sdbout.o : sdbout.c $(CONFIG_H) $(SYSTEM
>     $(TREE_H) $(GGC_H) $(RTL_H) $(REGS_H) $(FLAGS_H) insn-config.h \
>     output.h $(DIAGNOSTIC_CORE_H) $(TM_P_H) gsyms.h langhooks.h
> $(TARGET_H) sdbout.h \
>     gt-sdbout.h reload.h
> -dwarf2out.o : dwarf2out.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h \
> +dwarf2out.o : dwarf2out.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
>     $(TM_H) $(TREE_H) version.h $(RTL_H) $(DWARF2_H) debug.h $(FLAGS_H) \
>     insn-config.h output.h $(DIAGNOSTIC_H) hard-reg-set.h $(REGS_H) $(EXPR_H) \
>     toplev.h $(DIAGNOSTIC_CORE_H) $(DWARF2OUT_H) reload.h \
> @@ -2860,7 +2870,7 @@ simplify-rtx.o : simplify-rtx.c $(CONFIG
>  symtab.o : symtab.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
>     langhooks.h $(DIAGNOSTIC_CORE_H) $(FLAGS_H) $(GGC_H) $(TARGET_H)
> $(CGRAPH_H) \
>     $(TIMEVAR_H) $(HASHTAB_H) gt-symtab.h
> -cgraph.o : cgraph.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h \
> +cgraph.o : cgraph.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
>     $(TM_H) $(TREE_H) $(TIMEVAR_H) \
>     langhooks.h toplev.h $(DIAGNOSTIC_CORE_H) $(FLAGS_H) $(GGC_H)
> $(TARGET_H) $(CGRAPH_H) \
>     gt-cgraph.h intl.h $(BASIC_BLOCK_H) debug.h $(HASHTAB_H) \
> @@ -2929,7 +2939,7 @@ ipa-inline-transform.o : ipa-inline-tran
>     $(HASHTAB_H) $(COVERAGE_H) $(GGC_H) $(TREE_FLOW_H) $(IPA_PROP_H) \
>     $(TREE_PASS_H)
>  ipa-utils.o : ipa-utils.c $(IPA_UTILS_H) $(CONFIG_H) $(SYSTEM_H) \
> -   coretypes.h dumpfile.h $(TM_H) $(TREE_H) $(TREE_FLOW_H) $(TREE_INLINE_H) \
> +   coretypes.h $(DUMPFILE_H) $(TM_H) $(TREE_H) $(TREE_FLOW_H)
> $(TREE_INLINE_H) \
>     langhooks.h pointer-set.h $(GGC_H) $(GIMPLE_H) $(SPLAY_TREE_H) \
>     $(CGRAPH_H) $(FLAGS_H) $(DIAGNOSTIC_H)
>  ipa-reference.o : ipa-reference.c $(CONFIG_H) $(SYSTEM_H) \
> @@ -2944,12 +2954,14 @@ ipa-pure-const.o : ipa-pure-const.c $(CO
>     $(GIMPLE_H) $(CGRAPH_H) $(FLAGS_H) $(TREE_PASS_H) \
>     $(DIAGNOSTIC_H) $(CFGLOOP_H) $(SCEV_H) $(LTO_STREAMER_H) \
>     $(GIMPLE_PRETTY_PRINT_H) $(DATA_STREAMER_H) $(TREE_STREAMER_H)
> -coverage.o : coverage.c $(GCOV_IO_H) $(CONFIG_H) $(SYSTEM_H)
> coretypes.h dumpfile.h \
> +coverage.o : coverage.c $(GCOV_IO_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h \
> +   $(DUMPFILE_H) \
>     $(TM_H) $(RTL_H) $(TREE_H) $(FLAGS_H) output.h $(REGS_H) $(EXPR_H) \
>     $(FUNCTION_H) $(BASIC_BLOCK_H) toplev.h $(DIAGNOSTIC_CORE_H)
> $(GGC_H) langhooks.h $(COVERAGE_H) \
>     tree-iterator.h $(CGRAPH_H) gcov-io.c $(TM_P_H) \
>     $(DIAGNOSTIC_CORE_H) intl.h gt-coverage.h $(TARGET_H) $(HASH_TABLE_H)
> -cselib.o : cselib.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h
> $(TM_H) $(RTL_H) \
> +cselib.o : cselib.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
> +   $(TM_H) $(RTL_H) \
>     $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h $(RECOG_H) \
>     $(EMIT_RTL_H) $(DIAGNOSTIC_CORE_H) $(FUNCTION_H) \
>     cselib.h gt-cselib.h $(GGC_H) $(TM_P_H) $(PARAMS_H) alloc-pool.h \
> @@ -2963,7 +2975,7 @@ dce.o : dce.c $(CONFIG_H) $(SYSTEM_H) co
>     $(TREE_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) $(EXCEPT_H) $(DF_H) cselib.h \
>     $(DBGCNT_H) dce.h $(VALTRACK_H) $(TREE_PASS_H) $(DBGCNT_H) $(TM_P_H) \
>     $(EMIT_RTL_H)
> -dumpfile.o: dumpfile.c dumpfile.h $(CONFIG_H) $(SYSTEM_H) coretypes.h \
> +dumpfile.o: dumpfile.c $(DUMPFILE_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h \
>     $(DIAGNOSTIC_CORE_H) $(GIMPLE_PRETTY_PRINT_H) $(TREE_H)
>  dse.o : dse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
>     $(TREE_H) $(TM_P_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
> @@ -3002,7 +3014,8 @@ store-motion.o : store-motion.c $(CONFIG
>  resource.o : resource.c $(CONFIG_H) $(RTL_H) hard-reg-set.h $(SYSTEM_H) \
>     coretypes.h $(TM_H) $(REGS_H) $(FLAGS_H) output.h $(RESOURCE_H) $(DF_H) \
>     $(FUNCTION_H) $(DIAGNOSTIC_CORE_H) $(INSN_ATTR_H) $(EXCEPT_H)
> $(PARAMS_H) $(TM_P_H)
> -lcm.o : lcm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h $(TM_H)
> $(RTL_H) $(REGS_H) \
> +lcm.o : lcm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) $(TM_H) \
> +   $(RTL_H) $(REGS_H) \
>     hard-reg-set.h $(FLAGS_H) insn-config.h $(INSN_ATTR_H) $(RECOG_H) \
>     $(BASIC_BLOCK_H) $(TM_P_H) $(FUNCTION_H) sbitmap.h
>  mode-switching.o : mode-switching.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
> @@ -3053,11 +3066,13 @@ df-core.o : df-core.c $(CONFIG_H) $(SYST
>     insn-config.h $(RECOG_H) $(FUNCTION_H) $(REGS_H) alloc-pool.h \
>     hard-reg-set.h $(BASIC_BLOCK_H) $(DF_H) $(BITMAP_H) sbitmap.h \
>     $(TM_P_H) $(FLAGS_H) output.h $(TREE_PASS_H) $(PARAMS_H)
> -df-problems.o : df-problems.c $(CONFIG_H) $(SYSTEM_H) coretypes.h
> dumpfile.h $(TM_H) \
> +df-problems.o : df-problems.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
> +   $(DUMPFILE_H) $(TM_H) \
>     $(RTL_H) insn-config.h $(RECOG_H) $(FUNCTION_H) $(REGS_H) alloc-pool.h \
>     hard-reg-set.h $(BASIC_BLOCK_H) $(DF_H) $(BITMAP_H) sbitmap.h $(TIMEVAR_H) \
>     $(TM_P_H) $(TARGET_H) $(FLAGS_H) $(EXCEPT_H) dce.h $(VALTRACK_H)
> -df-scan.o : df-scan.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h
> $(TM_H) $(RTL_H) \
> +df-scan.o : df-scan.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
> +   $(TM_H) $(RTL_H) \
>     insn-config.h $(RECOG_H) $(FUNCTION_H) $(REGS_H) alloc-pool.h \
>     hard-reg-set.h $(BASIC_BLOCK_H) $(DF_H) $(BITMAP_H) sbitmap.h \
>     $(TM_P_H) $(FLAGS_H) $(TARGET_H) $(TARGET_DEF_H) $(TREE_H) \
> @@ -3073,23 +3088,26 @@ var-tracking.o : var-tracking.c $(CONFIG
>     $(REGS_H) $(EXPR_H) $(TREE_PASS_H) $(TREE_FLOW_H) \
>     cselib.h $(TARGET_H) $(DIAGNOSTIC_CORE_H) $(PARAMS_H) $(DIAGNOSTIC_H) \
>     pointer-set.h $(RECOG_H) $(TM_P_H) $(TREE_PRETTY_PRINT_H) $(ALIAS_H)
> -profile.o : profile.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h
> $(TM_H) $(RTL_H) \
> +profile.o : profile.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
> +   $(TM_H) $(RTL_H) \
>     $(TREE_H) $(FLAGS_H) $(REGS_H) $(EXPR_H) $(FUNCTION_H) $(BASIC_BLOCK_H) \
>     $(DIAGNOSTIC_CORE_H) $(COVERAGE_H) $(TREE_FLOW_H) value-prof.h \
>     $(CFGLOOP_H) profile.h
> -mcf.o : mcf.c profile.h $(CONFIG_H) $(SYSTEM_H) $(TM_H) coretypes.h
> dumpfile.h \
> -   $(BASIC_BLOCK_H) langhooks.h $(GCOV_IO_H) $(TREE_H)
> +mcf.o : mcf.c profile.h $(CONFIG_H) $(SYSTEM_H) $(TM_H) coretypes.h \
> +   $(DUMPFILE_H) $(BASIC_BLOCK_H) langhooks.h $(GCOV_IO_H) $(TREE_H)
>  tree-profile.o : tree-profile.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
>     $(TM_H) $(TARGET_H) $(TREE_H) $(FLAGS_H) $(FUNCTION_H) \
>     $(BASIC_BLOCK_H) $(DIAGNOSTIC_CORE_H) $(COVERAGE_H) $(TREE_H) value-prof.h \
>     $(TREE_PASS_H) $(TREE_FLOW_H) gt-tree-profile.h $(CGRAPH_H)
> -value-prof.o : value-prof.c $(CONFIG_H) $(SYSTEM_H) coretypes.h
> dumpfile.h $(TM_H) \
> +value-prof.o : value-prof.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
> +   $(TM_H) \
>     $(BASIC_BLOCK_H) hard-reg-set.h profile.h value-prof.h $(EXPR_H)
> $(FLAGS_H) \
>     $(RECOG_H) insn-config.h $(OPTABS_H) $(REGS_H) $(GGC_H) $(DIAGNOSTIC_H) \
>     $(TREE_H) $(COVERAGE_H) $(RTL_H) $(GCOV_IO_H) $(TREE_FLOW_H) \
>     tree-flow-inline.h $(TIMEVAR_H) $(DIAGNOSTIC_CORE_H) pointer-set.h \
>     $(GIMPLE_PRETTY_PRINT_H)
> -loop-doloop.o : loop-doloop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h
> dumpfile.h $(TM_H) \
> +loop-doloop.o : loop-doloop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
> +   $(DUMPFILE_H) $(TM_H) \
>     $(RTL_H) $(FLAGS_H) $(EXPR_H) hard-reg-set.h $(BASIC_BLOCK_H) $(TM_P_H) \
>     $(DIAGNOSTIC_CORE_H) $(CFGLOOP_H) $(PARAMS_H) $(TARGET_H)
>  alloc-pool.o : alloc-pool.c $(CONFIG_H) $(SYSTEM_H) alloc-pool.h $(HASHTAB_H)
> @@ -3097,7 +3115,8 @@ auto-inc-dec.o : auto-inc-dec.c $(CONFIG
>     $(TREE_H) $(RTL_H) $(TM_P_H) hard-reg-set.h $(BASIC_BLOCK_H) insn-config.h \
>     $(REGS_H) $(FLAGS_H) $(FUNCTION_H) $(EXCEPT_H)
> $(DIAGNOSTIC_CORE_H) $(RECOG_H) \
>     $(EXPR_H) $(TREE_PASS_H) $(DF_H) $(DBGCNT_H) $(TARGET_H)
> -cfg.o : cfg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h
> $(DIAGNOSTIC_CORE_H) \
> +cfg.o : cfg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
> +   $(DIAGNOSTIC_CORE_H) \
>     $(GGC_H) $(OBSTACK_H) alloc-pool.h $(HASH_TABLE_H) $(CFGLOOP_H) $(TREE_H) \
>     $(BASIC_BLOCK_H)
>  cfghooks.o: cfghooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
> @@ -3125,20 +3144,23 @@ cfgcleanup.o : cfgcleanup.c $(CONFIG_H)
>     $(DIAGNOSTIC_CORE_H) insn-config.h cselib.h $(TARGET_H) $(TM_P_H)
> $(PARAMS_H) \
>     $(REGS_H) $(EMIT_RTL_H) $(FUNCTION_H) $(TREE_PASS_H) $(CFGLOOP_H)
> $(EXPR_H) \
>     $(DF_H) $(DBGCNT_H) dce.h
> -cfgloop.o : cfgloop.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) coretypes.h
> dumpfile.h $(TM_H) \
> +cfgloop.o : cfgloop.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) coretypes.h \
> +   $(DUMPFILE_H) $(TM_H) \
>     $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(FLAGS_H) $(FUNCTION_H) \
>     $(OBSTACK_H) toplev.h $(DIAGNOSTIC_CORE_H) $(TREE_FLOW_H)
> $(TREE_H) pointer-set.h \
>     $(GGC_H)
> -cfgloopanal.o : cfgloopanal.c coretypes.h dumpfile.h $(CONFIG_H)
> $(SYSTEM_H) $(RTL_H) \
> +cfgloopanal.o : cfgloopanal.c coretypes.h $(DUMPFILE_H) $(CONFIG_H) \
> +   $(SYSTEM_H) $(RTL_H) \
>     $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(EXPR_H) $(TM_H) \
>     $(OBSTACK_H) graphds.h $(PARAMS_H)
>  graphds.o : graphds.c graphds.h $(CONFIG_H) $(SYSTEM_H) $(BITMAP_H)
> $(OBSTACK_H) \
>     coretypes.h $(VEC_H)
> -loop-iv.o : loop-iv.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h \
> +loop-iv.o : loop-iv.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
>     $(RTL_H) $(BASIC_BLOCK_H) \
>     hard-reg-set.h $(CFGLOOP_H) $(EXPR_H) $(TM_H) $(OBSTACK_H) \
>     intl.h $(DIAGNOSTIC_CORE_H) $(DF_H) $(HASHTAB_H)
> -loop-invariant.o : loop-invariant.c $(CONFIG_H) $(SYSTEM_H)
> coretypes.h dumpfile.h \
> +loop-invariant.o : loop-invariant.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
> +   $(DUMPFILE_H) \
>     $(RTL_H) $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(EXPR_H) $(RECOG_H) \
>     $(TM_H) $(TM_P_H) $(FUNCTION_H) $(FLAGS_H) $(DF_H) $(TARGET_H) \
>     $(OBSTACK_H) $(HASHTAB_H) $(EXCEPT_H) $(PARAMS_H) $(REGS_H) ira.h
> @@ -3149,10 +3171,11 @@ loop-init.o : loop-init.c $(CONFIG_H) $(
>     $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) \
>     coretypes.h $(TM_H) $(OBSTACK_H) $(TREE_PASS_H) $(FLAGS_H) \
>     $(REGS_H) $(DF_H)
> -loop-unswitch.o : loop-unswitch.c $(CONFIG_H) $(SYSTEM_H) coretypes.h
> dumpfile.h \
> +loop-unswitch.o : loop-unswitch.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
> +   $(DUMPFILE_H) \
>     $(RTL_H) $(TM_H) $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(PARAMS_H) \
>     $(EXPR_H) $(TM_H) $(OBSTACK_H)
> -loop-unroll.o: loop-unroll.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h \
> +loop-unroll.o: loop-unroll.c $(CONFIG_H) $(SYSTEM_H) coretypes.h
> $(DUMPFILE_H) \
>     $(RTL_H) $(TM_H) $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(PARAMS_H) \
>     $(EXPR_H) $(TM_H) $(HASHTAB_H) $(RECOG_H) \
>     $(OBSTACK_H)
> @@ -3183,7 +3206,7 @@ reload.o : reload.c $(CONFIG_H) $(SYSTEM
>     $(FLAGS_H) $(EXPR_H) $(OPTABS_H) reload.h $(RECOG_H) \
>     hard-reg-set.h insn-config.h $(REGS_H) $(FUNCTION_H) real.h \
>     addresses.h $(TM_P_H) $(PARAMS_H) $(TARGET_H) $(DF_H) ira.h
> $(DIAGNOSTIC_CORE_H)
> -reload1.o : reload1.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h \
> +reload1.o : reload1.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
>     $(TM_H) $(RTL_ERROR_H) \
>     $(EXPR_H) $(OPTABS_H) reload.h $(REGS_H) hard-reg-set.h insn-config.h \
>     $(BASIC_BLOCK_H) $(RECOG_H) $(FUNCTION_H)  $(TM_P_H) \
> @@ -3201,8 +3224,8 @@ postreload-gcse.o : postreload-gcse.c $(
>     $(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H) $(FUNCTION_H) $(DIAGNOSTIC_CORE_H) \
>     $(TM_P_H) $(EXCEPT_H) $(TREE_H) $(TARGET_H) $(HASHTAB_H) intl.h
> $(OBSTACK_H) \
>     $(PARAMS_H) $(TREE_PASS_H) $(DBGCNT_H)
> -caller-save.o : caller-save.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h \
> -   $(TM_H) $(RTL_H) \
> +caller-save.o : caller-save.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
> +   $(DUMPFILE_H) $(TM_H) $(RTL_H) \
>     $(FLAGS_H) $(REGS_H) hard-reg-set.h insn-config.h $(BASIC_BLOCK_H)
> $(FUNCTION_H) \
>     addresses.h $(RECOG_H) reload.h $(EXPR_H) $(DIAGNOSTIC_CORE_H)
> $(TM_P_H) $(DF_H) \
>     gt-caller-save.h $(GGC_H)
> @@ -3215,7 +3238,8 @@ reorg.o : reorg.c $(CONFIG_H) $(SYSTEM_H
>     $(INSN_ATTR_H) $(EXCEPT_H) $(RECOG_H) $(FUNCTION_H) $(FLAGS_H) output.h \
>     $(EXPR_H) $(DIAGNOSTIC_CORE_H) $(PARAMS_H) $(TM_P_H) $(OBSTACK_H)
> $(RESOURCE_H) \
>     $(TARGET_H) $(TREE_PASS_H)
> -alias.o : alias.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h
> $(TM_H) $(RTL_H) \
> +alias.o : alias.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
> +   $(TM_H) $(RTL_H) \
>     $(FLAGS_H) hard-reg-set.h $(BASIC_BLOCK_H) $(REGS_H) $(DIAGNOSTIC_CORE_H) \
>     $(ALIAS_H) $(EMIT_RTL_H) $(GGC_H) $(FUNCTION_H) cselib.h $(TREE_H)
> $(TM_P_H) \
>     langhooks.h $(TARGET_H) gt-alias.h $(TIMEVAR_H) $(CGRAPH_H) \
> @@ -3315,8 +3339,8 @@ modulo-sched.o : modulo-sched.c $(DDG_H)
>     $(SCHED_INT_H) $(CFGLOOP_H) $(EXPR_H) $(PARAMS_H) \
>     $(GCOV_IO_H) hard-reg-set.h $(TM_H) $(TREE_PASS_H) \
>     $(DF_H) $(DBGCNT_H)
> -haifa-sched.o : haifa-sched.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h \
> -   $(TM_H) $(RTL_H) \
> +haifa-sched.o : haifa-sched.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
> +   $(DUMPFILE_H) $(TM_H) $(RTL_H) \
>     $(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h
> $(FUNCTION_H) \
>     $(INSN_ATTR_H) $(DIAGNOSTIC_CORE_H) $(RECOG_H) $(EXCEPT_H)
> $(TM_P_H) $(TARGET_H) \
>     $(PARAMS_H) $(DBGCNT_H) $(CFGLOOP_H) ira.h $(EMIT_RTL_H)
> $(COMMON_TARGET_H) \
> @@ -3334,8 +3358,8 @@ sched-ebb.o : sched-ebb.c $(CONFIG_H) $(
>     $(RTL_H) $(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
>     $(FUNCTION_H) $(INSN_ATTR_H) $(DIAGNOSTIC_CORE_H) $(RECOG_H)
> $(EXCEPT_H) $(TM_P_H) \
>     $(PARAMS_H) $(TARGET_H)
> -sched-vis.o : sched-vis.c $(CONFIG_H) $(SYSTEM_H) coretypes.h
> dumpfile.h $(TM_H) \
> -   $(INSN_ATTR_H) $(RTL_H) $(TREE_H) $(BASIC_BLOCK_H) $(PRETTY_PRINT_H)
> +sched-vis.o : sched-vis.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
> +   $(TM_H) $(INSN_ATTR_H) $(RTL_H) $(TREE_H) $(BASIC_BLOCK_H) $(PRETTY_PRINT_H)
>  sel-sched.o : sel-sched.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
>     $(RTL_ERROR_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
>     $(FUNCTION_H) $(INSN_ATTR_H)  $(RECOG_H) $(EXCEPT_H) $(PARAMS_H) \
> @@ -3411,7 +3435,7 @@ pointer-set.o: pointer-set.c pointer-set
>  hooks.o: hooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(HOOKS_H)
>  pretty-print.o: $(CONFIG_H) $(SYSTEM_H) coretypes.h intl.h $(PRETTY_PRINT_H)
>  errors.o : errors.c $(CONFIG_H) $(SYSTEM_H) errors.h
> -dbgcnt.o: dbgcnt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h \
> +dbgcnt.o: dbgcnt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
>      $(DIAGNOSTIC_CORE_H) $(DBGCNT_H)
>  lower-subreg.o : lower-subreg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
>     $(MACHMODE_H) $(TM_H) $(RTL_H) $(TM_P_H) $(FLAGS_H) \
> @@ -3423,7 +3447,8 @@ target-globals.o : target-globals.c $(CO
>     $(FLAGS_H) $(REGS_H) $(RTL_H) reload.h expmed.h $(EXPR_H) $(OPTABS_H) \
>     $(LIBFUNCS_H) $(CFGLOOP_H) $(IRA_INT_H) builtins.h gcse.h bb-reorder.h \
>     lower-subreg.h
> -hw-doloop.o : hw-doloop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h
> dumpfile.h $(TM_H) \
> +hw-doloop.o : hw-doloop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
> +   $(TM_H) \
>     $(RTL_H) $(FLAGS_H) $(EXPR_H) hard-reg-set.h $(BASIC_BLOCK_H) $(TM_P_H) \
>     $(DF_H) $(CFGLOOP_H) $(RECOG_H) $(TARGET_H) \
>     $(REGS_H) hw-doloop.h
> Index: gcc/sbitmap.c
> ===================================================================
> --- gcc/sbitmap.c       (revision 196604)
> +++ gcc/sbitmap.c       (working copy)
> @@ -655,6 +655,21 @@ dump_bitmap (FILE *file, const_sbitmap b
>    fprintf (file, "\n");
>  }
>
> +DEBUG_FUNCTION void
> +dump_raw (simple_bitmap_def &ref)
> +{
> +  dump_bitmap (stderr, &ref);
> +}
> +
> +DEBUG_FUNCTION void
> +dump_raw (simple_bitmap_def *ptr)
> +{
> +  if (ptr)
> +    dump_raw (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> +
>  void
>  dump_bitmap_file (FILE *file, const_sbitmap bmap)
>  {
> @@ -684,6 +699,21 @@ debug_bitmap (const_sbitmap bmap)
>    dump_bitmap_file (stderr, bmap);
>  }
>
> +DEBUG_FUNCTION void
> +dump (simple_bitmap_def &ref)
> +{
> +  dump_bitmap_file (stderr, &ref);
> +}
> +
> +DEBUG_FUNCTION void
> +dump (simple_bitmap_def *ptr)
> +{
> +  if (ptr)
> +    dump (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> +
>  void
>  dump_bitmap_vector (FILE *file, const char *title, const char *subtitle,
>                      sbitmap *bmaps, int n_maps)
> Index: gcc/sbitmap.h
> ===================================================================
> --- gcc/sbitmap.h       (revision 196604)
> +++ gcc/sbitmap.h       (working copy)
> @@ -223,7 +223,11 @@ inline void sbitmap_vector_free (sbitmap
>  }
>
>  extern void dump_bitmap (FILE *, const_sbitmap);
> +extern void dump_raw (const simple_bitmap_def &ref);
> +extern void dump_raw (const simple_bitmap_def *ptr);
>  extern void dump_bitmap_file (FILE *, const_sbitmap);
> +extern void dump (const simple_bitmap_def &ref);
> +extern void dump (const simple_bitmap_def *ptr);
>  extern void dump_bitmap_vector (FILE *, const char *, const char *, sbitmap *,
>                                  int);
>  extern sbitmap sbitmap_alloc (unsigned int);
> Index: gcc/tree-ssa-live.c
> ===================================================================
> --- gcc/tree-ssa-live.c (revision 196604)
> +++ gcc/tree-ssa-live.c (working copy)
> @@ -1228,6 +1228,24 @@ dump_var_map (FILE *f, var_map map)
>  }
>
>
> +/* Generic dump for the above.  */
> +
> +DEBUG_FUNCTION void
> +dump (_var_map &ref)
> +{
> +  dump_var_map (stderr, &ref);
> +}
> +
> +DEBUG_FUNCTION void
> +dump (_var_map *ptr)
> +{
> +  if (ptr)
> +    dump (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> +
> +
>  /* Output live range info LIVE to file F, controlled by FLAG.  */
>
>  void
> @@ -1267,6 +1285,25 @@ dump_live_info (FILE *f, tree_live_info_
>      }
>  }
>
> +
> +/* Generic dump for the above.  */
> +
> +DEBUG_FUNCTION void
> +dump (tree_live_info_d &ref)
> +{
> +  dump_live_info (stderr, &ref, 0);
> +}
> +
> +DEBUG_FUNCTION void
> +dump (tree_live_info_d *ptr)
> +{
> +  if (ptr)
> +    dump (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> +
> +
>  #ifdef ENABLE_CHECKING
>  /* Verify that SSA_VAR is a non-virtual SSA_NAME.  */
>
> Index: gcc/tree-ssa-live.h
> ===================================================================
> --- gcc/tree-ssa-live.h (revision 196604)
> +++ gcc/tree-ssa-live.h (working copy)
> @@ -71,6 +71,8 @@ typedef struct _var_map
>  extern var_map init_var_map (int);
>  extern void delete_var_map (var_map);
>  extern void dump_var_map (FILE *, var_map);
> +extern void dump (_var_map &ref);
> +extern void dump (_var_map *ptr);
>  extern int var_union (var_map, tree, tree);
>  extern void partition_view_normal (var_map, bool);
>  extern void partition_view_bitmap (var_map, bitmap, bool);
> @@ -247,6 +249,8 @@ extern void delete_tree_live_info (tree_
>  #define LIVEDUMP_EXIT  0x02
>  #define LIVEDUMP_ALL   (LIVEDUMP_ENTRY | LIVEDUMP_EXIT)
>  extern void dump_live_info (FILE *, tree_live_info_p, int);
> +extern void dump (tree_live_info_d &ref);
> +extern void dump (tree_live_info_d *ptr);
>
>
>  /*  Return TRUE if P is marked as a global in LIVE.  */
> Index: gcc/lra-int.h
> ===================================================================
> --- gcc/lra-int.h       (revision 196604)
> +++ gcc/lra-int.h       (working copy)
> @@ -23,6 +23,8 @@ along with GCC; see the file COPYING3.        I
>  #include "recog.h"
>  #include "insn-attr.h"
>  #include "insn-codes.h"
> +#include "insn-config.h"
> +#include "regs.h"
>
>  #define lra_assert(c) gcc_checking_assert (c)
>
> @@ -350,6 +352,8 @@ extern lra_live_range_t lra_merge_live_r
>  extern bool lra_intersected_live_ranges_p (lra_live_range_t,
>                                            lra_live_range_t);
>  extern void lra_print_live_range_list (FILE *, lra_live_range_t);
> +extern void dump (lra_live_range &ref);
> +extern void dump (lra_live_range *ptr);
>  extern void lra_debug_live_range_list (lra_live_range_t);
>  extern void lra_debug_pseudo_live_ranges (int);
>  extern void lra_debug_live_ranges (void);
> Index: gcc/bitmap.c
> ===================================================================
> --- gcc/bitmap.c        (revision 196604)
> +++ gcc/bitmap.c        (working copy)
> @@ -2117,7 +2117,8 @@ debug_bitmap (const_bitmap head)
>     it does not print anything but the bits.  */
>
>  DEBUG_FUNCTION void
> -bitmap_print (FILE *file, const_bitmap head, const char *prefix,
> const char *suffix)
> +bitmap_print (FILE *file, const_bitmap head, const char *prefix,
> +             const char *suffix)
>  {
>    const char *comma = "";
>    unsigned i;
> @@ -2199,4 +2200,20 @@ dump_bitmap_statistics (void)
>    fprintf (stderr,
> "---------------------------------------------------------------------------------\n");
>  }
>
> +DEBUG_FUNCTION void
> +dump (const bitmap_head_def &ref)
> +{
> +  dump_bitmap (stderr, &ref);
> +}
> +
> +DEBUG_FUNCTION void
> +dump (const bitmap_head_def *ptr)
> +{
> +  if (ptr)
> +    dump (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> +
> +
>  #include "gt-bitmap.h"
> Index: gcc/bitmap.h
> ===================================================================
> --- gcc/bitmap.h        (revision 196604)
> +++ gcc/bitmap.h        (working copy)
> @@ -293,6 +293,8 @@ inline void dump_bitmap (FILE *file, con
>  {
>    bitmap_print (file, map, "", "\n");
>  }
> +extern void dump (const bitmap_head_def &ref);
> +extern void dump (const bitmap_head_def *ptr);
>
>  extern unsigned bitmap_first_set_bit (const_bitmap);
>  extern unsigned bitmap_last_set_bit (const_bitmap);
> Index: gcc/basic-block.h
> ===================================================================
> --- gcc/basic-block.h   (revision 196604)
> +++ gcc/basic-block.h   (working copy)
> @@ -437,6 +437,8 @@ extern basic_block create_basic_block_st
>  extern void clear_bb_flags (void);
>  extern void dump_bb_info (FILE *, basic_block, int, int, bool, bool);
>  extern void dump_edge_info (FILE *, edge, int, int);
> +extern void dump (edge_def &ref);
> +extern void dump (edge_def *ptr);
>  extern void brief_dump_cfg (FILE *, int);
>  extern void clear_edges (void);
>  extern void scale_bbs_frequencies_int (basic_block *, int, int, int);
> Index: gcc/omega.c
> ===================================================================
> --- gcc/omega.c (revision 196604)
> +++ gcc/omega.c (working copy)
> @@ -309,6 +309,23 @@ omega_print_vars (FILE *file, omega_pb p
>    fprintf (file, "\n");
>  }
>
> +/* Dump problem PB.  */
> +
> +DEBUG_FUNCTION void
> +dump (omega_pb_d &ref)
> +{
> +  omega_print_problem (stderr, &ref);
> +}
> +
> +DEBUG_FUNCTION void
> +dump (omega_pb_d *ptr)
> +{
> +  if (ptr)
> +    dump (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> +
>  /* Debug problem PB.  */
>
>  DEBUG_FUNCTION void
> Index: gcc/omega.h
> ===================================================================
> --- gcc/omega.h (revision 196604)
> +++ gcc/omega.h (working copy)
> @@ -122,6 +122,8 @@ extern enum omega_result omega_simplify_
>  extern enum omega_result omega_constrain_variable_sign (omega_pb,
>                                                         enum omega_eqn_color,
>                                                         int, int);
> +extern void dump (omega_pb_d &ref);
> +extern void dump (omega_pb_d *ptr);
>  extern void debug_omega_problem (omega_pb);
>  extern void omega_print_problem (FILE *, omega_pb);
>  extern void omega_print_red_equations (FILE *, omega_pb);
> Index: gcc/tree-dump.c
> ===================================================================
> --- gcc/tree-dump.c     (revision 196604)
> +++ gcc/tree-dump.c     (working copy)
> @@ -28,6 +28,7 @@ along with GCC; see the file COPYING3.
>  #include "tree-dump.h"
>  #include "langhooks.h"
>  #include "tree-iterator.h"
> +#include "tree-pretty-print.h"
>
>  static unsigned int queue (dump_info_p, const_tree, int);
>  static void dump_index (dump_info_p, unsigned int);
> Index: gcc/dumpfile.h
> ===================================================================
> --- gcc/dumpfile.h      (revision 196604)
> +++ gcc/dumpfile.h      (working copy)
> @@ -125,7 +125,6 @@ extern FILE *dump_begin (int, int *);
>  extern void dump_end (int, FILE *);
>  extern int dump_start (int, int *);
>  extern void dump_finish (int);
> -extern void dump_node (const_tree, int, FILE *);
>  extern int dump_switch_p (const char *);
>  extern int opt_info_switch_p (const char *);
>  extern const char *dump_flag_name (int);
> @@ -142,6 +141,9 @@ extern unsigned int dump_register (const
>                                     int, int);
>  extern bool enable_rtl_dump_file (void);
>
> +/* In tree-dump.c  */
> +extern void dump_node (const_tree, int, FILE *);
> +
>  /* In combine.c  */
>  extern void dump_combine_total_stats (FILE *);
>  /* In cfghooks.c  */
> Index: gcc/gimple-pretty-print.c
> ===================================================================
> --- gcc/gimple-pretty-print.c   (revision 196604)
> +++ gcc/gimple-pretty-print.c   (working copy)
> @@ -99,6 +99,21 @@ print_gimple_stmt (FILE *file, gimple g,
>    pp_newline_and_flush (&buffer);
>  }
>
> +DEBUG_FUNCTION void
> +dump (gimple_statement_d &ref)
> +{
> +  print_gimple_stmt (stderr, &ref, 0, 0);
> +}
> +
> +DEBUG_FUNCTION void
> +dump (gimple_statement_d *ptr)
> +{
> +  if (ptr)
> +    dump (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> +
>
>  /* Print GIMPLE statement G to FILE using SPC indentation spaces and
>     FLAGS as in pp_gimple_stmt_1.  Print only the right-hand side
> Index: gcc/gimple-pretty-print.h
> ===================================================================
> --- gcc/gimple-pretty-print.h   (revision 196604)
> +++ gcc/gimple-pretty-print.h   (working copy)
> @@ -29,6 +29,8 @@ extern void debug_gimple_stmt (gimple);
>  extern void debug_gimple_seq (gimple_seq);
>  extern void print_gimple_seq (FILE *, gimple_seq, int, int);
>  extern void print_gimple_stmt (FILE *, gimple, int, int);
> +extern void dump (gimple_statement_d &ref);
> +extern void dump (gimple_statement_d *ptr);
>  extern void print_gimple_expr (FILE *, gimple, int, int);
>  extern void pp_gimple_stmt_1 (pretty_printer *, gimple, int, int);
>  extern void gimple_dump_bb_for_graph (pretty_printer *, basic_block);
> Index: gcc/cfghooks.c
> ===================================================================
> --- gcc/cfghooks.c      (revision 196604)
> +++ gcc/cfghooks.c      (working copy)
> @@ -279,6 +279,22 @@ dump_bb (FILE *outf, basic_block bb, int
>    fputc ('\n', outf);
>  }
>
> +DEBUG_FUNCTION void
> +dump (basic_block_def &ref)
> +{
> +  dump_bb (stderr, &ref, 0, 0);
> +}
> +
> +DEBUG_FUNCTION void
> +dump (basic_block_def *ptr)
> +{
> +  if (ptr)
> +    dump (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> +
> +
>  /* Dumps basic block BB to pretty-printer PP, for use as a label of
>     a DOT graph record-node.  The implementation of this hook is
>     expected to write the label to the stream that is attached to PP.
> Index: gcc/ira-int.h
> ===================================================================
> --- gcc/ira-int.h       (revision 196604)
> +++ gcc/ira-int.h       (working copy)
> @@ -33,7 +33,7 @@ along with GCC; see the file COPYING3.
>  #define ira_assert(c) gcc_assert (c)
>  #else
>  /* Always define and include C, so that warnings for empty body in an
> -  ‘if’ statement and unused variable do not occur.  */
> +  'if' statement and unused variable do not occur.  */
>  #define ira_assert(c) ((void)(0 && (c)))
>  #endif
>
> @@ -933,8 +933,13 @@ extern ira_loop_tree_node_t ira_curr_loo
>  extern ira_allocno_t *ira_curr_regno_allocno_map;
>
>  extern void ira_debug_copy (ira_copy_t);
> +extern void dump (ira_allocno_copy &ref);
> +extern void dump (ira_allocno_copy *ptr);
> +
>  extern void ira_debug_copies (void);
>  extern void ira_debug_allocno_copies (ira_allocno_t);
> +extern void dump (ira_allocno &ref);
> +extern void dump (ira_allocno *ptr);
>
>  extern void ira_traverse_loop_tree (bool, ira_loop_tree_node_t,
>                                     void (*) (ira_loop_tree_node_t),
> @@ -983,6 +988,8 @@ extern void ira_tune_allocno_costs (void
>
>  extern void ira_rebuild_start_finish_chains (void);
>  extern void ira_print_live_range_list (FILE *, live_range_t);
> +extern void dump (live_range &ref);
> +extern void dump (live_range *ptr);
>  extern void ira_debug_live_range_list (live_range_t);
>  extern void ira_debug_allocno_live_ranges (ira_allocno_t);
>  extern void ira_debug_live_ranges (void);
> Index: gcc/rtl.h
> ===================================================================
> --- gcc/rtl.h   (revision 196604)
> +++ gcc/rtl.h   (working copy)
> @@ -2587,6 +2587,8 @@ extern void sel_sched_fix_param (const c
>
>  /* In print-rtl.c */
>  extern const char *print_rtx_head;
> +extern void dump (const rtx_def &ref);
> +extern void dump (const rtx_def *ptr);
>  extern void debug_rtx (const_rtx);
>  extern void debug_rtx_list (const_rtx, int);
>  extern void debug_rtx_range (const_rtx, const_rtx);
> Index: gcc/dwarf2out.c
> ===================================================================
> --- gcc/dwarf2out.c     (revision 196604)
> +++ gcc/dwarf2out.c     (working copy)
> @@ -5351,6 +5351,22 @@ debug_dwarf_die (dw_die_ref die)
>    print_die (die, stderr);
>  }
>
> +DEBUG_FUNCTION void
> +dump (die_struct &ref)
> +{
> +  print_die (&ref, stderr);
> +}
> +
> +DEBUG_FUNCTION void
> +dump (die_struct *ptr)
> +{
> +  if (ptr)
> +    dump (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> +
> +
>  /* Print all DWARF information collected for the compilation unit.
>     This routine is a debugging aid only.  */
>
> Index: gcc/dwarf2out.h
> ===================================================================
> --- gcc/dwarf2out.h     (revision 196604)
> +++ gcc/dwarf2out.h     (working copy)
> @@ -257,6 +257,8 @@ extern void dwarf2out_emit_cfi (dw_cfi_r
>  extern void debug_dwarf (void);
>  struct die_struct;
>  extern void debug_dwarf_die (struct die_struct *);
> +extern void dump (die_struct &ref);
> +extern void dump (die_struct *ptr);
>  extern void dwarf2out_set_demangle_name_func (const char *(*) (const char *));
>  #ifdef VMS_DEBUGGING_INFO
>  extern void dwarf2out_vms_debug_main_pointer (void);
> Index: gcc/lra-lives.c
> ===================================================================
> --- gcc/lra-lives.c     (revision 196604)
> +++ gcc/lra-lives.c     (working copy)
> @@ -848,6 +848,21 @@ lra_print_live_range_list (FILE *f, lra_
>    fprintf (f, "\n");
>  }
>
> +DEBUG_FUNCTION void
> +dump (lra_live_range &ref)
> +{
> +  lra_print_live_range_list (stderr, &ref);
> +}
> +
> +DEBUG_FUNCTION void
> +dump (lra_live_range *ptr)
> +{
> +  if (ptr)
> +    dump (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> +
>  /* Print live ranges R to stderr.  */
>  void
>  lra_debug_live_range_list (lra_live_range_t r)
> Index: gcc/ira-lives.c
> ===================================================================
> --- gcc/ira-lives.c     (revision 196604)
> +++ gcc/ira-lives.c     (working copy)
> @@ -1522,6 +1522,21 @@ ira_print_live_range_list (FILE *f, live
>    fprintf (f, "\n");
>  }
>
> +DEBUG_FUNCTION void
> +dump (live_range &ref)
> +{
> +  ira_print_live_range_list (stderr, &ref);
> +}
> +
> +DEBUG_FUNCTION void
> +dump (live_range *ptr)
> +{
> +  if (ptr)
> +    dump (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> +
>  /* Print live ranges R to stderr.  */
>  void
>  ira_debug_live_range_list (live_range_t r)
> Index: gcc/print-rtl.c
> ===================================================================
> --- gcc/print-rtl.c     (revision 196604)
> +++ gcc/print-rtl.c     (working copy)
> @@ -662,6 +662,23 @@ debug_rtx (const_rtx x)
>    fprintf (stderr, "\n");
>  }
>
> +/* Dump rtx REF.  */
> +
> +DEBUG_FUNCTION void
> +dump (const rtx_def &ref)
> +{
> +  debug_rtx (&ref);
> +}
> +
> +DEBUG_FUNCTION void
> +dump (const rtx_def *ptr)
> +{
> +  if (ptr)
> +    dump (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> +
>  /* Count of rtx's to print with debug_rtx_list.
>     This global exists because gdb user defined commands have no arguments.  */
>
> Index: gcc/ira-build.c
> ===================================================================
> --- gcc/ira-build.c     (revision 196604)
> +++ gcc/ira-build.c     (working copy)
> @@ -1321,6 +1321,21 @@ print_copy (FILE *f, ira_copy_t cp)
>            ? "move" : cp->constraint_p ? "constraint" : "shuffle");
>  }
>
> +DEBUG_FUNCTION void
> +dump (ira_allocno_copy &ref)
> +{
> +  print_copy (stderr, &ref);
> +}
> +
> +DEBUG_FUNCTION void
> +dump (ira_allocno_copy *ptr)
> +{
> +  if (ptr)
> +    dump (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> +
>  /* Print info about copy CP into stderr.  */
>  void
>  ira_debug_copy (ira_copy_t cp)
> @@ -1374,6 +1389,22 @@ print_allocno_copies (FILE *f, ira_alloc
>    fprintf (f, "\n");
>  }
>
> +DEBUG_FUNCTION void
> +dump (ira_allocno &ref)
> +{
> +  print_allocno_copies (stderr, &ref);
> +}
> +
> +DEBUG_FUNCTION void
> +dump (ira_allocno *ptr)
> +{
> +  if (ptr)
> +    dump (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
> +}
> +
> +
>  /* Print info about copies involving allocno A into stderr.  */
>  void
>  ira_debug_allocno_copies (ira_allocno_t a)
>
> --
> Lawrence Crowl
Tom Tromey March 25, 2013, 1:45 p.m. UTC | #2
>>>>> "Lawrence" == Lawrence Crowl <crowl@googlers.com> writes:

Lawrence> This patch is somewhat different from the original plan at
Lawrence> gcc.gnu.org/wiki/cxx-conversion/debugging-dumps.  The reason
Lawrence> is that gdb has an incomplete implementation of C++ call syntax;
Lawrence> requiring explicit specification of template arguments and explicit
Lawrence> specification of function arguments even when they have default
Lawrence> values.

Note that the latter is because GCC doesn't emit this information.

As for the former ... we have a patch that works in some cases, but it's
actually unclear to me how well the debugger can do in general here.  We
haven't put it in since it seems better to require users to be explicit
than to silently do the wrong thing in some cases.

Tom
Lawrence Crowl March 25, 2013, 5:19 p.m. UTC | #3
On 3/25/13, Richard Biener <richard.guenther@gmail.com> wrote:
> You add a not used new interface.  What for?

So that people can use it.

> For use from gdb only?

No, for use from both gdb and internally.  It is often that folks add
dumps in various places while developing/debugging.  These functions
support that effort without having to hunt down the name.

> In which case it should be debug (), not dump ().

I will use whatever name you wish, but I would have preferred that
we addressed naming issues when we published the plan, not after
I've done the implementation.  What name do you wish?
Lawrence Crowl March 25, 2013, 5:25 p.m. UTC | #4
On 3/25/13, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Lawrence" == Lawrence Crowl <crowl@googlers.com> writes:
> Lawrence> This patch is somewhat different from the original plan at
> Lawrence> gcc.gnu.org/wiki/cxx-conversion/debugging-dumps.  The reason
> Lawrence> is that gdb has an incomplete implementation of C++ call syntax;
> Lawrence> requiring explicit specification of template arguments and
> Lawrence> explicit specification of function arguments even when they have
> Lawrence> default values.
>
> Note that the latter is because GCC doesn't emit this information.

I'm not laying blame anywhere, just informing folks of an adjustment
to the plan due to the current situation.

> As for the former ... we have a patch that works in some cases,
> but it's actually unclear to me how well the debugger can do
> in general here.  We haven't put it in since it seems better to
> require users to be explicit than to silently do the wrong thing
> in some cases.

My model is that I should be able to cut and paste an expression
from the source to the debugger and have it work.  I concede that
C++ function overload resolution is a hard problem.  However, gdb
has a slightly easier task in that it won't be doing instantiation
(as that expression has already instantiated everything it needs)
and so it need only pick among what exists.
Tom Tromey March 25, 2013, 5:59 p.m. UTC | #5
>>>>> "Lawrence" == Lawrence Crowl <crowl@googlers.com> writes:

Lawrence> My model is that I should be able to cut and paste an expression
Lawrence> from the source to the debugger and have it work.  I concede that
Lawrence> C++ function overload resolution is a hard problem.  However, gdb
Lawrence> has a slightly easier task in that it won't be doing instantiation
Lawrence> (as that expression has already instantiated everything it needs)
Lawrence> and so it need only pick among what exists.

Yeah, what isn't clear to me is that even this can be done in a
behavior-preserving way, at least short of having full source available
and the entire compiler in the debugger.

I'd be very pleased to be wrong, but my current understanding is that
one can play arbitrary games with SFINAE to come up with code that
defeats any less complete solution.

Sergio is going to look at this area again.  So if you know differently,
it would be great to have your input.

I can dig up the current ("pending" -- but really unreviewed for a few
years for the above reasons) gdb patch if you are interested.  I believe
it worked by applying overload-resolution-like rules to templates
(though it has been a while).

Tom
Richard Biener March 26, 2013, 9:25 a.m. UTC | #6
On Mon, Mar 25, 2013 at 6:19 PM, Lawrence Crowl <crowl@googlers.com> wrote:
> On 3/25/13, Richard Biener <richard.guenther@gmail.com> wrote:
>> You add a not used new interface.  What for?
>
> So that people can use it.
>
>> For use from gdb only?
>
> No, for use from both gdb and internally.  It is often that folks add
> dumps in various places while developing/debugging.  These functions
> support that effort without having to hunt down the name.

But having both interfaces is bad.  As you are unconditionally "dumping"
to stderr using debug () is correct.  Sorry that I don't follow each and every
proposal - nobody follows up my proposals either.

The dump_ namespace is claimed by dumping to dumpfiles and diagnostics.

>> In which case it should be debug (), not dump ().
>
> I will use whatever name you wish, but I would have preferred that
> we addressed naming issues when we published the plan, not after
> I've done the implementation.  What name do you wish?

debug ().

And I'd like you to remove the alternate debug_ interface that is obsoleted
by the overloads.

Btw, the overloading will provide extra headache to one of the most used
ways to the debug_ routines:

(gdb) call debug_tree (fndecl)
 <function_decl 0x7ffff6e1b900 foo
    type <function_type 0x7ffff6d28c78
        type <integer_type 0x7ffff6d175e8 int public SI
            size <integer_cst 0x7ffff6d1a0c0 constant 32>
            unit size <integer_cst 0x7ffff6d1a0e0 constant 4>
            align 32 symtab 0 alias set -1 canonical type
0x7ffff6d175e8 precision 32 min <integer_cst 0x7ffff6d1a060
-2147483648> max <integer_cst 0x7ffff6d1a080 2147483647>
...
(gdb) call debug_tree (0x7ffff6d175e8)
Cannot resolve function debug_tree to any overloaded instance
(gdb) call debug_tree<tab><tab>
debug_tree(tree_node*)
debug_tree_chain(tree_node*)
debug_tree_chain(tree_node*)::__FUNCTION__
debug_tree_ssa()
debug_tree_ssa_stats()
<aha! (ok, I know this one is 'tree')>
(gdb) call debug_tree ((tree_node*)0x7ffff6d175e8)
 <integer_type 0x7ffff6d175e8 int public SI
    size <integer_cst 0x7ffff6d1a0c0 type <integer_type 0x7ffff6d170a8
bitsizetype> constant 32>
    unit size <integer_cst 0x7ffff6d1a0e0 type <integer_type
0x7ffff6d17000 sizetype> constant 4>
    align 32 symtab 0 alias set -1 canonical type 0x7ffff6d175e8
precision 32 min <integer_cst 0x7ffff6d1a060 -2147483648> max
<integer_cst 0x7ffff6d1a080 2147483647>
    pointer_to_this <pointer_type 0x7ffff6d1f2a0>>

but with debug () having overloads to each and every thing we'd ever want to
debug the list of possible types I have to cast that literal address I
cut&pasted
will be endless.

Any suggestion on how to improve this situation?  Yes, it's already
bad as with typing debug_tree I know it's a tree I am interested in and

(gdb) call debug_<tab><tab>
... endless list of functions and overloads ...

is probably as useless as

(gdb) call debug<tab><tab>

is after your patch.

Thanks,
Richard.

> --
> Lawrence Crowl
Lawrence Crowl March 26, 2013, 6:20 p.m. UTC | #7
On 3/26/13, Richard Biener <richard.guenther@gmail.com> wrote:
> On Mar 25, 2013 Lawrence Crowl <crowl@googlers.com> wrote:
> > On 3/25/13, Richard Biener <richard.guenther@gmail.com> wrote:
> > > You add a not used new interface.  What for?
> >
> > So that people can use it.
> >
> > > For use from gdb only?
> >
> > No, for use from both gdb and internally.  It is often that
> > folks add dumps in various places while developing/debugging.
> > These functions support that effort without having to hunt down
> > the name.
>
> But having both interfaces is bad.  As you are unconditionally
> "dumping" to stderr using debug () is correct.  Sorry that I
> don't follow each and every proposal - nobody follows up my
> proposals either.
>
> The dump_ namespace is claimed by dumping to dumpfiles and
> diagnostics.
>
> > > In which case it should be debug (), not dump ().
> >
> > I will use whatever name you wish, but I would have preferred
> > that we addressed naming issues when we published the plan,
> > not after I've done the implementation.  What name do you wish?
>
> debug ().

Okay.

> And I'd like you to remove the alternate debug_ interface that
> is obsoleted by the overloads.

I'm sure that folks have the old interfaces baked into scripts and
dot files.  I think it would should not remove the old interface
until they have had some time to migrate.

> Btw, the overloading will provide extra headache to one of the
> most used ways to the debug_ routines:
>
> (gdb) call debug_tree (fndecl)
> <function_decl 0x7ffff6e1b900 foo
>    type <function_type 0x7ffff6d28c78
>        type <integer_type 0x7ffff6d175e8 int public SI
>            size <integer_cst 0x7ffff6d1a0c0 constant 32>
>            unit size <integer_cst 0x7ffff6d1a0e0 constant 4>
>            align 32 symtab 0 alias set -1 canonical type
> 0x7ffff6d175e8 precision 32 min <integer_cst 0x7ffff6d1a060
> -2147483648> max <integer_cst 0x7ffff6d1a080 2147483647>
> ...
> (gdb) call debug_tree (0x7ffff6d175e8)
> Cannot resolve function debug_tree to any overloaded instance
> (gdb) call debug_tree<tab><tab>
> debug_tree(tree_node*)
> debug_tree_chain(tree_node*)
> debug_tree_chain(tree_node*)::__FUNCTION__
> debug_tree_ssa()
> debug_tree_ssa_stats()
> <aha! (ok, I know this one is 'tree')>
> (gdb) call debug_tree ((tree_node*)0x7ffff6d175e8)
> <integer_type 0x7ffff6d175e8 int public SI
>    size <integer_cst 0x7ffff6d1a0c0 type <integer_type 0x7ffff6d170a8
> bitsizetype> constant 32>
>    unit size <integer_cst 0x7ffff6d1a0e0 type <integer_type
> 0x7ffff6d17000 sizetype> constant 4>
>    align 32 symtab 0 alias set -1 canonical type 0x7ffff6d175e8
> precision 32 min <integer_cst 0x7ffff6d1a060 -2147483648> max
> <integer_cst 0x7ffff6d1a080 2147483647>
>    pointer_to_this <pointer_type 0x7ffff6d1f2a0>>
>
> but with debug () having overloads to each and every thing we'd
> ever want to debug the list of possible types I have to cast that
> literal address I cut&pasted will be endless.
>
> Any suggestion on how to improve this situation?  Yes, it's already
> bad as with typing debug_tree I know it's a tree I am interested
> in and
>
> (gdb) call debug_<tab><tab>
> ... endless list of functions and overloads ...
>
> is probably as useless as
>
> (gdb) call debug<tab><tab>
>
> is after your patch.

I have three suggestions, in increasing order of difficulty.

First, modify the dumpers to print the type cast in front of
the hex value.  The cut and paste is just a bit wider.

Second, modify the dumpers to print the access expression (which
would then not require the hex value).  I'm not actually sure how
well this would work in practice.  It's a thought.

Third, modify gdb to have an interactive data explorer.  As a
straw man, "explorer foo" would open up a window with all of
foo's elements.  Each pointer is clickable and changes your view to
its referrent.  I've used such a tool, and while it was sometimes
at too low a level of abstraction, it was generally quite handy
for exploring the data.  In retrospect, it would be nice to fold
sub-objects (in the editor sense).
Lawrence Crowl March 26, 2013, 11:50 p.m. UTC | #8
On 3/26/13, Lawrence Crowl <crowl@googlers.com> wrote:
> On 3/26/13, Richard Biener <richard.guenther@gmail.com> wrote:
>> On Mar 25, 2013 Lawrence Crowl <crowl@googlers.com> wrote:
>> > On 3/25/13, Richard Biener <richard.guenther@gmail.com> wrote:
>> > > You add a not used new interface.  What for?
>> >
>> > So that people can use it.
>> >
>> > > For use from gdb only?
>> >
>> > No, for use from both gdb and internally.  It is often that
>> > folks add dumps in various places while developing/debugging.
>> > These functions support that effort without having to hunt down
>> > the name.
>>
>> But having both interfaces is bad.  As you are unconditionally
>> "dumping" to stderr using debug () is correct.  Sorry that I
>> don't follow each and every proposal - nobody follows up my
>> proposals either.
>>
>> The dump_ namespace is claimed by dumping to dumpfiles and
>> diagnostics.
>>
>> > > In which case it should be debug (), not dump ().
>> >
>> > I will use whatever name you wish, but I would have preferred
>> > that we addressed naming issues when we published the plan,
>> > not after I've done the implementation.  What name do you wish?
>>
>> debug ().
>
> Okay.
>
>> And I'd like you to remove the alternate debug_ interface that
>> is obsoleted by the overloads.
>
> I'm sure that folks have the old interfaces baked into scripts and
> dot files.  I think it would should not remove the old interface
> until they have had some time to migrate.
>
>> Btw, the overloading will provide extra headache to one of the
>> most used ways to the debug_ routines:
>>
>> (gdb) call debug_tree (fndecl)
>> <function_decl 0x7ffff6e1b900 foo
>>    type <function_type 0x7ffff6d28c78
>>        type <integer_type 0x7ffff6d175e8 int public SI
>>            size <integer_cst 0x7ffff6d1a0c0 constant 32>
>>            unit size <integer_cst 0x7ffff6d1a0e0 constant 4>
>>            align 32 symtab 0 alias set -1 canonical type
>> 0x7ffff6d175e8 precision 32 min <integer_cst 0x7ffff6d1a060
>> -2147483648> max <integer_cst 0x7ffff6d1a080 2147483647>
>> ...
>> (gdb) call debug_tree (0x7ffff6d175e8)
>> Cannot resolve function debug_tree to any overloaded instance
>> (gdb) call debug_tree<tab><tab>
>> debug_tree(tree_node*)
>> debug_tree_chain(tree_node*)
>> debug_tree_chain(tree_node*)::__FUNCTION__
>> debug_tree_ssa()
>> debug_tree_ssa_stats()
>> <aha! (ok, I know this one is 'tree')>
>> (gdb) call debug_tree ((tree_node*)0x7ffff6d175e8)
>> <integer_type 0x7ffff6d175e8 int public SI
>>    size <integer_cst 0x7ffff6d1a0c0 type <integer_type 0x7ffff6d170a8
>> bitsizetype> constant 32>
>>    unit size <integer_cst 0x7ffff6d1a0e0 type <integer_type
>> 0x7ffff6d17000 sizetype> constant 4>
>>    align 32 symtab 0 alias set -1 canonical type 0x7ffff6d175e8
>> precision 32 min <integer_cst 0x7ffff6d1a060 -2147483648> max
>> <integer_cst 0x7ffff6d1a080 2147483647>
>>    pointer_to_this <pointer_type 0x7ffff6d1f2a0>>
>>
>> but with debug () having overloads to each and every thing we'd
>> ever want to debug the list of possible types I have to cast that
>> literal address I cut&pasted will be endless.
>>
>> Any suggestion on how to improve this situation?  Yes, it's already
>> bad as with typing debug_tree I know it's a tree I am interested
>> in and
>>
>> (gdb) call debug_<tab><tab>
>> ... endless list of functions and overloads ...
>>
>> is probably as useless as
>>
>> (gdb) call debug<tab><tab>
>>
>> is after your patch.
>
> I have three suggestions, in increasing order of difficulty.
>
> First, modify the dumpers to print the type cast in front of
> the hex value.  The cut and paste is just a bit wider.
>
> Second, modify the dumpers to print the access expression (which
> would then not require the hex value).  I'm not actually sure how
> well this would work in practice.  It's a thought.
>
> Third, modify gdb to have an interactive data explorer.  As a
> straw man, "explorer foo" would open up a window with all of
> foo's elements.  Each pointer is clickable and changes your view to
> its referrent.  I've used such a tool, and while it was sometimes
> at too low a level of abstraction, it was generally quite handy
> for exploring the data.  In retrospect, it would be nice to fold
> sub-objects (in the editor sense).

Patch with rename to debug attached.
Tested on x86_64.


Add uniform debug dump function names.


Add some overloaded functions that provide uniform debug dump
function names.  These names are:

  debug: the general debug dumper
  debug_verbose: for more details
  debug_raw: for the gory details
  debug_head: for the heads of declarations, e.g. function heads
  debug_body: for the bodies of declarations, e.g. function bodies

Not all types have the last four versions.

The debug functions come in two flavors, those that take pointers
to the type, and those that take references to the type.  The first
handles printing of '<nil>' for null pointers.  The second assumes
a valid reference, and prints the content.


Example uses are as follows:

  cp_token t, *p;
  debug (t);
  debug (p);

From the debugger, use

  call debug (t)


The functions sets implemented are:

debug (only)

    basic_block_def, const bitmap_head_def, cp_binding_level,
    cp_parser, cp_token, data_reference, die_struct, edge_def,
    gimple_statement_d, ira_allocno, ira_allocno_copy, live_range,
    lra_live_range, omega_pb_d, pt_solution, const rtx_def, sreal,
    tree_live_info_d, _var_map,

    vec<cp_token, va_gc>, vec<data_reference_p>, vec<ddr_p>,
    vec<rtx>, vec<tree, va_gc>,

debug and debug_raw

    simple_bitmap_def

debug and debug_verbose

    expr_def, struct loop, vinsn_def

debug, debug_raw, debug_verbose, debug_head, debug_body

    const tree_node


This patch is somewhat different from the original plan at
gcc.gnu.org/wiki/cxx-conversion/debugging-dumps.  The reason
is that gdb has an incomplete implementation of C++ call syntax;
requiring explicit specification of template arguments and explicit
specification of function arguments even when they have default
values.  So, the original plan would have required typing

  call dump <cp_token> (t, 0, 0, stderr)

which is undesireable.  Instead instead of templates, we overload
plain functions.  This adds a small burden of manually adding
the pointer version of dump for each type.  Instead of default
function arguments, we simply assume the default values.  Most of
the underlying dump functions did not use the options and indent
parameters anyway.  Several provide FILE* parameters, but we expect
debugging to use stderr anyway.  So, the explicit specification of
arguments was not as valuable as we thought initially.  Finally,
a change of name from dump to debug reflect the implicit output
to stderr.


Index: gcc/cp/ChangeLog

2013-03-26  Lawrence Crowl  <crowl@google.com>

	* Make-lang.in
	(CXX_PARSER_H): Add header dependence.
	* cp-tree.h
	(extern debug (cp_binding_level &)): New.
	(extern debug (cp_binding_level *)): New.
	* name-lookup.h
	(debug (cp_binding_level &)): New.
	(debug (cp_binding_level *)): New.
	* parser.c
	(debug (cp_parser &)): New.
	(debug (cp_parser *)): New.
	(debug (cp_token &)): New.
	(debug (cp_token *)): New.
	(debug (vec<cp_token, va_gc> &)): New.
	(debug (vec<cp_token, va_gc> *)): New.
	* parser.c: Add header dependence.
	(extern debug (cp_parser &)): New.
	(extern debug (cp_parser *)): New.
	(extern debug (cp_token &)): New.
	(extern debug (cp_token *)): New.
	(extern debug (vec<cp_token, va_gc> &)): New.
	(extern debug (vec<cp_token, va_gc> *)): New.

Index: gcc/ChangeLog

2013-03-26  Lawrence Crowl  <crowl@google.com>

	* Makefile.in: Add several missing include dependences.
	(DUMPFILE_H): New.
	(test-dump.o): New.  This object is not added to any executable,
	but is present for ad-hoc testing.
	* bitmap.c
	(debug (const bitmap_head_def &)): New.
	(debug (const bitmap_head_def *)): New.
	* bitmap.h
	(extern debug (const bitmap_head_def &)): New.
	(extern debug (const bitmap_head_def *)): New.
	* cfg.c
	(debug (edge_def &)): New.
	(debug (edge_def *)): New.
	* cfghooks.c
	(debug (basic_block_def &)): New.
	(debug (basic_block_def *)): New.
	* dumpfile.h
	(dump_node (const_tree, int, FILE *)): Correct source file.
	* dwarf2out.c
	(debug (die_struct &)): New.
	(debug (die_struct *)): New.
	* dwarf2out.h
	(extern debug (die_struct &)): New.
	(extern debug (die_struct *)): New.
	* gimple-pretty-print.c
	(debug (gimple_statement_d &)): New.
	(debug (gimple_statement_d *)): New.
	* gimple-pretty-print.h
	(extern debug (gimple_statement_d &)): New.
	(extern debug (gimple_statement_d *)): New.
	* ira-build.c
	(debug (ira_allocno_copy &)): New.
	(debug (ira_allocno_copy *)): New.
	(debug (ira_allocno &)): New.
	(debug (ira_allocno *)): New.
	* ira-int.h
	(extern debug (ira_allocno_copy &)): New.
	(extern debug (ira_allocno_copy *)): New.
	(extern debug (ira_allocno &)): New.
	(extern debug (ira_allocno *)): New.
	* ira-lives.c
	(debug (live_range &)): New.
	(debug (live_range *)): New.
	* lra-int.h
	(debug (lra_live_range &)): New.
	(debug (lra_live_range *)): New.
	* lra-lives.c
	(debug (lra_live_range &)): New.
	(debug (lra_live_range *)): New.
	* omega.c
	(debug (omega_pb_d &)): New.
	(debug (omega_pb_d *)): New.
	* omega.h
	(extern debug (omega_pb_d &)): New.
	(extern debug (omega_pb_d *)): New.
	* print-rtl.c
	(debug (const rtx_def &)): New.
	(debug (const rtx_def *)): New.
	* print-tree.c
	(debug_tree (tree): Move within file.
	(debug_raw (const tree_node &)): New.
	(debug_raw (const tree_node *)): New.
	(dump_tree_via_hooks (const tree_node *, int)): New.
	(debug (const tree_node &)): New.
	(debug (const tree_node *)): New.
	(debug_verbose (const tree_node &)): New.
	(debug_verbose (const tree_node *)): New.
	(debug_head (const tree_node &)): New.
	(debug_head (const tree_node *)): New.
	(debug_body (const tree_node &)): New.
	(debug_body (const tree_node *)): New.
	(debug_vec_tree (tree): Move and reimplement in terms of dump.
	(debug (vec<tree, va_gc> &)): New.
	(debug (vec<tree, va_gc> *)): New.
	* rtl.h
	(extern debug (const rtx_def &)): New.
	(extern debug (const rtx_def *)): New.
	* sbitmap.c
	(debug_raw (simple_bitmap_def &)): New.
	(debug_raw (simple_bitmap_def *)): New.
	(debug (simple_bitmap_def &)): New.
	(debug (simple_bitmap_def *)): New.
	* sbitmap.h
	(extern debug (simple_bitmap_def &)): New.
	(extern debug (simple_bitmap_def *)): New.
	(extern debug_raw (simple_bitmap_def &)): New.
	(extern debug_raw (simple_bitmap_def *)): New.
	* sel-sched-dump.c
	(debug (vinsn_def &)): New.
	(debug (vinsn_def *)): New.
	(debug_verbose (vinsn_def &)): New.
	(debug_verbose (vinsn_def *)): New.
	(debug (expr_def &)): New.
	(debug (expr_def *)): New.
	(debug_verbose (expr_def &)): New.
	(debug_verbose (expr_def *)): New.
	(debug (vec<rtx> &)): New.
	(debug (vec<rtx> *)): New.
	* sel-sched-dump.h
	(extern debug (vinsn_def &)): New.
	(extern debug (vinsn_def *)): New.
	(extern debug_verbose (vinsn_def &)): New.
	(extern debug_verbose (vinsn_def *)): New.
	(extern debug (expr_def &)): New.
	(extern debug (expr_def *)): New.
	(extern debug_verbose (expr_def &)): New.
	(extern debug_verbose (expr_def *)): New.
	(extern debug (vec<rtx> &)): New.
	(extern debug (vec<rtx> *)): New.
	* sel-sched-ir.h
	(_list_iter_cond_expr): Make inline instead of static.
	* sreal.c
	(debug (sreal &)): New.
	(debug (sreal *)): New.
	* sreal.h
	(extern debug (sreal &)): New.
	(extern debug (sreal *)): New.
	* tree.h
	(extern debug_raw (const tree_node &)): New.
	(extern debug_raw (const tree_node *)): New.
	(extern debug (const tree_node &)): New.
	(extern debug (const tree_node *)): New.
	(extern debug_verbose (const tree_node &)): New.
	(extern debug_verbose (const tree_node *)): New.
	(extern debug_head (const tree_node &)): New.
	(extern debug_head (const tree_node *)): New.
	(extern debug_body (const tree_node &)): New.
	(extern debug_body (const tree_node *)): New.
	(extern debug (vec<tree, va_gc> &)): New.
	(extern debug (vec<tree, va_gc> *)): New.
	* tree-cfg.c
	(debug (struct loop &)): New.
	(debug (struct loop *)): New.
	(debug_verbose (struct loop &)): New.
	(debug_verbose (struct loop *)): New.
	* tree-dump.c: Add header dependence.
	* tree-flow.h
	(extern debug (struct loop &)): New.
	(extern debug (struct loop *)): New.
	(extern debug_verbose (struct loop &)): New.
	(extern debug_verbose (struct loop *)): New.
	* tree-data-ref.c
	(debug (data_reference &)): New.
	(debug (data_reference *)): New.
	(debug (vec<data_reference_p> &)): New.
	(debug (vec<data_reference_p> *)): New.
	(debug (vec<ddr_p> &)): New.
	(debug (vec<ddr_p> *)): New.
	* tree-data-ref.h
	(extern debug (data_reference &)): New.
	(extern debug (data_reference *)): New.
	(extern debug (vec<data_reference_p> &)): New.
	(extern debug (vec<data_reference_p> *)): New.
	(extern debug (vec<ddr_p> &)): New.
	(extern debug (vec<ddr_p> *)): New.
	* tree-ssa-alias.c
	(debug (pt_solution &)): New.
	(debug (pt_solution *)): New.
	* tree-ssa-alias.h
	(extern debug (pt_solution &)): New.
	(extern debug (pt_solution *)): New.
	* tree-ssa-alias.c
	(debug (_var_map &)): New.
	(debug (_var_map *)): New.
	(debug (tree_live_info_d &)): New.
	(debug (tree_live_info_d *)): New.
	* tree-ssa-alias.h
	(extern debug (_var_map &)): New.
	(extern debug (_var_map *)): New.
	(extern debug (tree_live_info_d &)): New.
	(extern debug (tree_live_info_d *)): New.
Richard Biener March 27, 2013, 9:26 a.m. UTC | #9
On Wed, Mar 27, 2013 at 12:50 AM, Lawrence Crowl <crowl@googlers.com> wrote:
> On 3/26/13, Lawrence Crowl <crowl@googlers.com> wrote:
>> On 3/26/13, Richard Biener <richard.guenther@gmail.com> wrote:
>>> On Mar 25, 2013 Lawrence Crowl <crowl@googlers.com> wrote:
>>> > On 3/25/13, Richard Biener <richard.guenther@gmail.com> wrote:
>>> > > You add a not used new interface.  What for?
>>> >
>>> > So that people can use it.
>>> >
>>> > > For use from gdb only?
>>> >
>>> > No, for use from both gdb and internally.  It is often that
>>> > folks add dumps in various places while developing/debugging.
>>> > These functions support that effort without having to hunt down
>>> > the name.
>>>
>>> But having both interfaces is bad.  As you are unconditionally
>>> "dumping" to stderr using debug () is correct.  Sorry that I
>>> don't follow each and every proposal - nobody follows up my
>>> proposals either.
>>>
>>> The dump_ namespace is claimed by dumping to dumpfiles and
>>> diagnostics.
>>>
>>> > > In which case it should be debug (), not dump ().
>>> >
>>> > I will use whatever name you wish, but I would have preferred
>>> > that we addressed naming issues when we published the plan,
>>> > not after I've done the implementation.  What name do you wish?
>>>
>>> debug ().
>>
>> Okay.
>>
>>> And I'd like you to remove the alternate debug_ interface that
>>> is obsoleted by the overloads.
>>
>> I'm sure that folks have the old interfaces baked into scripts and
>> dot files.  I think it would should not remove the old interface
>> until they have had some time to migrate.
>>
>>> Btw, the overloading will provide extra headache to one of the
>>> most used ways to the debug_ routines:
>>>
>>> (gdb) call debug_tree (fndecl)
>>> <function_decl 0x7ffff6e1b900 foo
>>>    type <function_type 0x7ffff6d28c78
>>>        type <integer_type 0x7ffff6d175e8 int public SI
>>>            size <integer_cst 0x7ffff6d1a0c0 constant 32>
>>>            unit size <integer_cst 0x7ffff6d1a0e0 constant 4>
>>>            align 32 symtab 0 alias set -1 canonical type
>>> 0x7ffff6d175e8 precision 32 min <integer_cst 0x7ffff6d1a060
>>> -2147483648> max <integer_cst 0x7ffff6d1a080 2147483647>
>>> ...
>>> (gdb) call debug_tree (0x7ffff6d175e8)
>>> Cannot resolve function debug_tree to any overloaded instance
>>> (gdb) call debug_tree<tab><tab>
>>> debug_tree(tree_node*)
>>> debug_tree_chain(tree_node*)
>>> debug_tree_chain(tree_node*)::__FUNCTION__
>>> debug_tree_ssa()
>>> debug_tree_ssa_stats()
>>> <aha! (ok, I know this one is 'tree')>
>>> (gdb) call debug_tree ((tree_node*)0x7ffff6d175e8)
>>> <integer_type 0x7ffff6d175e8 int public SI
>>>    size <integer_cst 0x7ffff6d1a0c0 type <integer_type 0x7ffff6d170a8
>>> bitsizetype> constant 32>
>>>    unit size <integer_cst 0x7ffff6d1a0e0 type <integer_type
>>> 0x7ffff6d17000 sizetype> constant 4>
>>>    align 32 symtab 0 alias set -1 canonical type 0x7ffff6d175e8
>>> precision 32 min <integer_cst 0x7ffff6d1a060 -2147483648> max
>>> <integer_cst 0x7ffff6d1a080 2147483647>
>>>    pointer_to_this <pointer_type 0x7ffff6d1f2a0>>
>>>
>>> but with debug () having overloads to each and every thing we'd
>>> ever want to debug the list of possible types I have to cast that
>>> literal address I cut&pasted will be endless.
>>>
>>> Any suggestion on how to improve this situation?  Yes, it's already
>>> bad as with typing debug_tree I know it's a tree I am interested
>>> in and
>>>
>>> (gdb) call debug_<tab><tab>
>>> ... endless list of functions and overloads ...
>>>
>>> is probably as useless as
>>>
>>> (gdb) call debug<tab><tab>
>>>
>>> is after your patch.
>>
>> I have three suggestions, in increasing order of difficulty.
>>
>> First, modify the dumpers to print the type cast in front of
>> the hex value.  The cut and paste is just a bit wider.
>>
>> Second, modify the dumpers to print the access expression (which
>> would then not require the hex value).  I'm not actually sure how
>> well this would work in practice.  It's a thought.
>>
>> Third, modify gdb to have an interactive data explorer.  As a
>> straw man, "explorer foo" would open up a window with all of
>> foo's elements.  Each pointer is clickable and changes your view to
>> its referrent.  I've used such a tool, and while it was sometimes
>> at too low a level of abstraction, it was generally quite handy
>> for exploring the data.  In retrospect, it would be nice to fold
>> sub-objects (in the editor sense).
>
> Patch with rename to debug attached.
> Tested on x86_64.
>
>
> Add uniform debug dump function names.
>
>
> Add some overloaded functions that provide uniform debug dump
> function names.  These names are:
>
>   debug: the general debug dumper
>   debug_verbose: for more details
>   debug_raw: for the gory details
>   debug_head: for the heads of declarations, e.g. function heads
>   debug_body: for the bodies of declarations, e.g. function bodies
>
> Not all types have the last four versions.
>
> The debug functions come in two flavors, those that take pointers
> to the type, and those that take references to the type.  The first
> handles printing of '<nil>' for null pointers.  The second assumes
> a valid reference, and prints the content.
>
>
> Example uses are as follows:
>
>   cp_token t, *p;
>   debug (t);
>   debug (p);
>
> From the debugger, use
>
>   call debug (t)
>
>
> The functions sets implemented are:
>
> debug (only)
>
>     basic_block_def, const bitmap_head_def, cp_binding_level,
>     cp_parser, cp_token, data_reference, die_struct, edge_def,
>     gimple_statement_d, ira_allocno, ira_allocno_copy, live_range,
>     lra_live_range, omega_pb_d, pt_solution, const rtx_def, sreal,
>     tree_live_info_d, _var_map,
>
>     vec<cp_token, va_gc>, vec<data_reference_p>, vec<ddr_p>,
>     vec<rtx>, vec<tree, va_gc>,
>
> debug and debug_raw
>
>     simple_bitmap_def
>
> debug and debug_verbose
>
>     expr_def, struct loop, vinsn_def
>
> debug, debug_raw, debug_verbose, debug_head, debug_body
>
>     const tree_node
>
>
> This patch is somewhat different from the original plan at
> gcc.gnu.org/wiki/cxx-conversion/debugging-dumps.  The reason
> is that gdb has an incomplete implementation of C++ call syntax;
> requiring explicit specification of template arguments and explicit
> specification of function arguments even when they have default
> values.  So, the original plan would have required typing
>
>   call dump <cp_token> (t, 0, 0, stderr)
>
> which is undesireable.  Instead instead of templates, we overload
> plain functions.  This adds a small burden of manually adding
> the pointer version of dump for each type.  Instead of default
> function arguments, we simply assume the default values.  Most of
> the underlying dump functions did not use the options and indent
> parameters anyway.  Several provide FILE* parameters, but we expect
> debugging to use stderr anyway.  So, the explicit specification of
> arguments was not as valuable as we thought initially.

Note that generally modules should provide a

 print_FOO (FILE *, FOO *...)

interface which should be the worker for the dump_* interface
which prints to dumpfiles (and stdout/stderr with -fopt-info) and
the debug_* interface (which just prints to stderr).

>  Finally,
> a change of name from dump to debug reflect the implicit output
> to stderr.

A few more questions.  As we are now using C++ and these functions
are not called by GCC itself - do we really need all the extern declarations
in the header files?  We don't have -Wstrict-prototypes issues with C++
and I do not consider the debug () interface part of the public API of
a module.  This avoids people ending up calling debug () from inside
GCC.

+  if (ptr)
+    debug (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");

can we avoid repeating this using a common helper?  I'd use a simple
#define like

#define DO_DEBUG_PTR(p) do { if (p) debug (*(p)) else fprintf (stderr,
"<nil>\n"); } while (0)

but I suppose you can come up with something more clever using C++?

Thanks,
Richard.

>
> Index: gcc/cp/ChangeLog
>
> 2013-03-26  Lawrence Crowl  <crowl@google.com>
>
>         * Make-lang.in
>         (CXX_PARSER_H): Add header dependence.
>         * cp-tree.h
>         (extern debug (cp_binding_level &)): New.
>         (extern debug (cp_binding_level *)): New.
>         * name-lookup.h
>         (debug (cp_binding_level &)): New.
>         (debug (cp_binding_level *)): New.
>         * parser.c
>         (debug (cp_parser &)): New.
>         (debug (cp_parser *)): New.
>         (debug (cp_token &)): New.
>         (debug (cp_token *)): New.
>         (debug (vec<cp_token, va_gc> &)): New.
>         (debug (vec<cp_token, va_gc> *)): New.
>         * parser.c: Add header dependence.
>         (extern debug (cp_parser &)): New.
>         (extern debug (cp_parser *)): New.
>         (extern debug (cp_token &)): New.
>         (extern debug (cp_token *)): New.
>         (extern debug (vec<cp_token, va_gc> &)): New.
>         (extern debug (vec<cp_token, va_gc> *)): New.
>
> Index: gcc/ChangeLog
>
> 2013-03-26  Lawrence Crowl  <crowl@google.com>
>
>         * Makefile.in: Add several missing include dependences.
>         (DUMPFILE_H): New.
>         (test-dump.o): New.  This object is not added to any executable,
>         but is present for ad-hoc testing.
>         * bitmap.c
>         (debug (const bitmap_head_def &)): New.
>         (debug (const bitmap_head_def *)): New.
>         * bitmap.h
>         (extern debug (const bitmap_head_def &)): New.
>         (extern debug (const bitmap_head_def *)): New.
>         * cfg.c
>         (debug (edge_def &)): New.
>         (debug (edge_def *)): New.
>         * cfghooks.c
>         (debug (basic_block_def &)): New.
>         (debug (basic_block_def *)): New.
>         * dumpfile.h
>         (dump_node (const_tree, int, FILE *)): Correct source file.
>         * dwarf2out.c
>         (debug (die_struct &)): New.
>         (debug (die_struct *)): New.
>         * dwarf2out.h
>         (extern debug (die_struct &)): New.
>         (extern debug (die_struct *)): New.
>         * gimple-pretty-print.c
>         (debug (gimple_statement_d &)): New.
>         (debug (gimple_statement_d *)): New.
>         * gimple-pretty-print.h
>         (extern debug (gimple_statement_d &)): New.
>         (extern debug (gimple_statement_d *)): New.
>         * ira-build.c
>         (debug (ira_allocno_copy &)): New.
>         (debug (ira_allocno_copy *)): New.
>         (debug (ira_allocno &)): New.
>         (debug (ira_allocno *)): New.
>         * ira-int.h
>         (extern debug (ira_allocno_copy &)): New.
>         (extern debug (ira_allocno_copy *)): New.
>         (extern debug (ira_allocno &)): New.
>         (extern debug (ira_allocno *)): New.
>         * ira-lives.c
>         (debug (live_range &)): New.
>         (debug (live_range *)): New.
>         * lra-int.h
>         (debug (lra_live_range &)): New.
>         (debug (lra_live_range *)): New.
>         * lra-lives.c
>         (debug (lra_live_range &)): New.
>         (debug (lra_live_range *)): New.
>         * omega.c
>         (debug (omega_pb_d &)): New.
>         (debug (omega_pb_d *)): New.
>         * omega.h
>         (extern debug (omega_pb_d &)): New.
>         (extern debug (omega_pb_d *)): New.
>         * print-rtl.c
>         (debug (const rtx_def &)): New.
>         (debug (const rtx_def *)): New.
>         * print-tree.c
>         (debug_tree (tree): Move within file.
>         (debug_raw (const tree_node &)): New.
>         (debug_raw (const tree_node *)): New.
>         (dump_tree_via_hooks (const tree_node *, int)): New.
>         (debug (const tree_node &)): New.
>         (debug (const tree_node *)): New.
>         (debug_verbose (const tree_node &)): New.
>         (debug_verbose (const tree_node *)): New.
>         (debug_head (const tree_node &)): New.
>         (debug_head (const tree_node *)): New.
>         (debug_body (const tree_node &)): New.
>         (debug_body (const tree_node *)): New.
>         (debug_vec_tree (tree): Move and reimplement in terms of dump.
>         (debug (vec<tree, va_gc> &)): New.
>         (debug (vec<tree, va_gc> *)): New.
>         * rtl.h
>         (extern debug (const rtx_def &)): New.
>         (extern debug (const rtx_def *)): New.
>         * sbitmap.c
>         (debug_raw (simple_bitmap_def &)): New.
>         (debug_raw (simple_bitmap_def *)): New.
>         (debug (simple_bitmap_def &)): New.
>         (debug (simple_bitmap_def *)): New.
>         * sbitmap.h
>         (extern debug (simple_bitmap_def &)): New.
>         (extern debug (simple_bitmap_def *)): New.
>         (extern debug_raw (simple_bitmap_def &)): New.
>         (extern debug_raw (simple_bitmap_def *)): New.
>         * sel-sched-dump.c
>         (debug (vinsn_def &)): New.
>         (debug (vinsn_def *)): New.
>         (debug_verbose (vinsn_def &)): New.
>         (debug_verbose (vinsn_def *)): New.
>         (debug (expr_def &)): New.
>         (debug (expr_def *)): New.
>         (debug_verbose (expr_def &)): New.
>         (debug_verbose (expr_def *)): New.
>         (debug (vec<rtx> &)): New.
>         (debug (vec<rtx> *)): New.
>         * sel-sched-dump.h
>         (extern debug (vinsn_def &)): New.
>         (extern debug (vinsn_def *)): New.
>         (extern debug_verbose (vinsn_def &)): New.
>         (extern debug_verbose (vinsn_def *)): New.
>         (extern debug (expr_def &)): New.
>         (extern debug (expr_def *)): New.
>         (extern debug_verbose (expr_def &)): New.
>         (extern debug_verbose (expr_def *)): New.
>         (extern debug (vec<rtx> &)): New.
>         (extern debug (vec<rtx> *)): New.
>         * sel-sched-ir.h
>         (_list_iter_cond_expr): Make inline instead of static.
>         * sreal.c
>         (debug (sreal &)): New.
>         (debug (sreal *)): New.
>         * sreal.h
>         (extern debug (sreal &)): New.
>         (extern debug (sreal *)): New.
>         * tree.h
>         (extern debug_raw (const tree_node &)): New.
>         (extern debug_raw (const tree_node *)): New.
>         (extern debug (const tree_node &)): New.
>         (extern debug (const tree_node *)): New.
>         (extern debug_verbose (const tree_node &)): New.
>         (extern debug_verbose (const tree_node *)): New.
>         (extern debug_head (const tree_node &)): New.
>         (extern debug_head (const tree_node *)): New.
>         (extern debug_body (const tree_node &)): New.
>         (extern debug_body (const tree_node *)): New.
>         (extern debug (vec<tree, va_gc> &)): New.
>         (extern debug (vec<tree, va_gc> *)): New.
>         * tree-cfg.c
>         (debug (struct loop &)): New.
>         (debug (struct loop *)): New.
>         (debug_verbose (struct loop &)): New.
>         (debug_verbose (struct loop *)): New.
>         * tree-dump.c: Add header dependence.
>         * tree-flow.h
>         (extern debug (struct loop &)): New.
>         (extern debug (struct loop *)): New.
>         (extern debug_verbose (struct loop &)): New.
>         (extern debug_verbose (struct loop *)): New.
>         * tree-data-ref.c
>         (debug (data_reference &)): New.
>         (debug (data_reference *)): New.
>         (debug (vec<data_reference_p> &)): New.
>         (debug (vec<data_reference_p> *)): New.
>         (debug (vec<ddr_p> &)): New.
>         (debug (vec<ddr_p> *)): New.
>         * tree-data-ref.h
>         (extern debug (data_reference &)): New.
>         (extern debug (data_reference *)): New.
>         (extern debug (vec<data_reference_p> &)): New.
>         (extern debug (vec<data_reference_p> *)): New.
>         (extern debug (vec<ddr_p> &)): New.
>         (extern debug (vec<ddr_p> *)): New.
>         * tree-ssa-alias.c
>         (debug (pt_solution &)): New.
>         (debug (pt_solution *)): New.
>         * tree-ssa-alias.h
>         (extern debug (pt_solution &)): New.
>         (extern debug (pt_solution *)): New.
>         * tree-ssa-alias.c
>         (debug (_var_map &)): New.
>         (debug (_var_map *)): New.
>         (debug (tree_live_info_d &)): New.
>         (debug (tree_live_info_d *)): New.
>         * tree-ssa-alias.h
>         (extern debug (_var_map &)): New.
>         (extern debug (_var_map *)): New.
>         (extern debug (tree_live_info_d &)): New.
>         (extern debug (tree_live_info_d *)): New.
>
>
> --
> Lawrence Crowl
Lawrence Crowl March 27, 2013, 4:15 p.m. UTC | #10
On 3/27/13, Richard Biener <richard.guenther@gmail.com> wrote:
> On Mar 27, 2013, Lawrence Crowl <crowl@googlers.com> wrote:
>> Patch with rename to debug attached.
>> Tested on x86_64.
>>
>>
>> Add uniform debug dump function names.
>>
>>
>> Add some overloaded functions that provide uniform debug dump
>> function names.  These names are:
>>
>>   debug: the general debug dumper
>>   debug_verbose: for more details
>>   debug_raw: for the gory details
>>   debug_head: for the heads of declarations, e.g. function heads
>>   debug_body: for the bodies of declarations, e.g. function bodies
>>
>> Not all types have the last four versions.
>>
>> The debug functions come in two flavors, those that take pointers
>> to the type, and those that take references to the type.  The first
>> handles printing of '<nil>' for null pointers.  The second assumes
>> a valid reference, and prints the content.
>>
>>
>> Example uses are as follows:
>>
>>   cp_token t, *p;
>>   debug (t);
>>   debug (p);
>>
>> From the debugger, use
>>
>>   call debug (t)
>>
>>
>> The functions sets implemented are:
>>
>> debug (only)
>>
>>     basic_block_def, const bitmap_head_def, cp_binding_level,
>>     cp_parser, cp_token, data_reference, die_struct, edge_def,
>>     gimple_statement_d, ira_allocno, ira_allocno_copy, live_range,
>>     lra_live_range, omega_pb_d, pt_solution, const rtx_def, sreal,
>>     tree_live_info_d, _var_map,
>>
>>     vec<cp_token, va_gc>, vec<data_reference_p>, vec<ddr_p>,
>>     vec<rtx>, vec<tree, va_gc>,
>>
>> debug and debug_raw
>>
>>     simple_bitmap_def
>>
>> debug and debug_verbose
>>
>>     expr_def, struct loop, vinsn_def
>>
>> debug, debug_raw, debug_verbose, debug_head, debug_body
>>
>>     const tree_node
>>
>>
>> This patch is somewhat different from the original plan at
>> gcc.gnu.org/wiki/cxx-conversion/debugging-dumps.  The reason
>> is that gdb has an incomplete implementation of C++ call syntax;
>> requiring explicit specification of template arguments and explicit
>> specification of function arguments even when they have default
>> values.  So, the original plan would have required typing
>>
>>   call dump <cp_token> (t, 0, 0, stderr)
>>
>> which is undesireable.  Instead instead of templates, we overload
>> plain functions.  This adds a small burden of manually adding
>> the pointer version of dump for each type.  Instead of default
>> function arguments, we simply assume the default values.  Most of
>> the underlying dump functions did not use the options and indent
>> parameters anyway.  Several provide FILE* parameters, but we expect
>> debugging to use stderr anyway.  So, the explicit specification of
>> arguments was not as valuable as we thought initially.
>
> Note that generally modules should provide a
>
>  print_FOO (FILE *, FOO *...)
>
> interface which should be the worker for the dump_* interface
> which prints to dumpfiles (and stdout/stderr with -fopt-info) and
> the debug_* interface (which just prints to stderr).

I'm not sure what you're saying here.  I haven't been adding new
underlying functionality.  If there are missing print_FOO functions,
shouldn't they be a separate work item?

>> Finally, a change of name from dump to debug reflect the implicit
>> output to stderr.
>
> A few more questions.  As we are now using C++ and these
> functions are not called by GCC itself - do we really need
> all the extern declarations in the header files?  We don't have
> -Wstrict-prototypes issues with C++ and I do not consider the debug
> () interface part of the public API of a module.  This avoids
> people ending up calling debug () from inside GCC.

We don't need the extern declarations for gdb, but I've written
temporary calls to debug into the source code while I was developing.
It would be handy to not have to add declarations simultaneously.
Your call.

> +  if (ptr)
> +    debug (*ptr);
> +  else
> +    fprintf (stderr, "<nil>\n");
>
> can we avoid repeating this using a common helper?  I'd use a simple
> #define like
>
> #define DO_DEBUG_PTR(p) do { if (p) debug (*(p)) else fprintf (stderr,
> "<nil>\n"); } while (0)
>
> but I suppose you can come up with something more clever using C++?

I had a template that did this for us in my earlier code.  I removed
the template when I discovered the gdb issue.  One advantage to
removing the template was that I no longer needed a common header and
its inclusion in various files.  Adding the macro would reintroduce
the header.

My personal preference is to avoid the macros and just live with the
repeated pattern.
Richard Biener March 28, 2013, 9:25 a.m. UTC | #11
On Wed, Mar 27, 2013 at 5:15 PM, Lawrence Crowl <crowl@googlers.com> wrote:
> On 3/27/13, Richard Biener <richard.guenther@gmail.com> wrote:
>> On Mar 27, 2013, Lawrence Crowl <crowl@googlers.com> wrote:
>>> Patch with rename to debug attached.
>>> Tested on x86_64.
>>>
>>>
>>> Add uniform debug dump function names.
>>>
>>>
>>> Add some overloaded functions that provide uniform debug dump
>>> function names.  These names are:
>>>
>>>   debug: the general debug dumper
>>>   debug_verbose: for more details
>>>   debug_raw: for the gory details
>>>   debug_head: for the heads of declarations, e.g. function heads
>>>   debug_body: for the bodies of declarations, e.g. function bodies
>>>
>>> Not all types have the last four versions.
>>>
>>> The debug functions come in two flavors, those that take pointers
>>> to the type, and those that take references to the type.  The first
>>> handles printing of '<nil>' for null pointers.  The second assumes
>>> a valid reference, and prints the content.
>>>
>>>
>>> Example uses are as follows:
>>>
>>>   cp_token t, *p;
>>>   debug (t);
>>>   debug (p);
>>>
>>> From the debugger, use
>>>
>>>   call debug (t)
>>>
>>>
>>> The functions sets implemented are:
>>>
>>> debug (only)
>>>
>>>     basic_block_def, const bitmap_head_def, cp_binding_level,
>>>     cp_parser, cp_token, data_reference, die_struct, edge_def,
>>>     gimple_statement_d, ira_allocno, ira_allocno_copy, live_range,
>>>     lra_live_range, omega_pb_d, pt_solution, const rtx_def, sreal,
>>>     tree_live_info_d, _var_map,
>>>
>>>     vec<cp_token, va_gc>, vec<data_reference_p>, vec<ddr_p>,
>>>     vec<rtx>, vec<tree, va_gc>,
>>>
>>> debug and debug_raw
>>>
>>>     simple_bitmap_def
>>>
>>> debug and debug_verbose
>>>
>>>     expr_def, struct loop, vinsn_def
>>>
>>> debug, debug_raw, debug_verbose, debug_head, debug_body
>>>
>>>     const tree_node
>>>
>>>
>>> This patch is somewhat different from the original plan at
>>> gcc.gnu.org/wiki/cxx-conversion/debugging-dumps.  The reason
>>> is that gdb has an incomplete implementation of C++ call syntax;
>>> requiring explicit specification of template arguments and explicit
>>> specification of function arguments even when they have default
>>> values.  So, the original plan would have required typing
>>>
>>>   call dump <cp_token> (t, 0, 0, stderr)
>>>
>>> which is undesireable.  Instead instead of templates, we overload
>>> plain functions.  This adds a small burden of manually adding
>>> the pointer version of dump for each type.  Instead of default
>>> function arguments, we simply assume the default values.  Most of
>>> the underlying dump functions did not use the options and indent
>>> parameters anyway.  Several provide FILE* parameters, but we expect
>>> debugging to use stderr anyway.  So, the explicit specification of
>>> arguments was not as valuable as we thought initially.
>>
>> Note that generally modules should provide a
>>
>>  print_FOO (FILE *, FOO *...)
>>
>> interface which should be the worker for the dump_* interface
>> which prints to dumpfiles (and stdout/stderr with -fopt-info) and
>> the debug_* interface (which just prints to stderr).
>
> I'm not sure what you're saying here.  I haven't been adding new
> underlying functionality.  If there are missing print_FOO functions,
> shouldn't they be a separate work item?

Sure.  I just wanted to mention naming / semantics convention where
you mentioned FILE parameters.

>>> Finally, a change of name from dump to debug reflect the implicit
>>> output to stderr.
>>
>> A few more questions.  As we are now using C++ and these
>> functions are not called by GCC itself - do we really need
>> all the extern declarations in the header files?  We don't have
>> -Wstrict-prototypes issues with C++ and I do not consider the debug
>> () interface part of the public API of a module.  This avoids
>> people ending up calling debug () from inside GCC.
>
> We don't need the extern declarations for gdb, but I've written
> temporary calls to debug into the source code while I was developing.
> It would be handy to not have to add declarations simultaneously.
> Your call.

Ah, I see.  I have no strong preference here.

>> +  if (ptr)
>> +    debug (*ptr);
>> +  else
>> +    fprintf (stderr, "<nil>\n");
>>
>> can we avoid repeating this using a common helper?  I'd use a simple
>> #define like
>>
>> #define DO_DEBUG_PTR(p) do { if (p) debug (*(p)) else fprintf (stderr,
>> "<nil>\n"); } while (0)
>>
>> but I suppose you can come up with something more clever using C++?
>
> I had a template that did this for us in my earlier code.  I removed
> the template when I discovered the gdb issue.  One advantage to
> removing the template was that I no longer needed a common header and
> its inclusion in various files.  Adding the macro would reintroduce
> the header.
>
> My personal preference is to avoid the macros and just live with the
> repeated pattern.

Ok, fine with me - I just wanted to double-check.

The patch is ok as-is.

Richard.

> --
> Lawrence Crowl
Lawrence Crowl March 29, 2013, 5:54 a.m. UTC | #12
On 3/28/13, Richard Biener <richard.guenther@gmail.com> wrote:
> The patch is ok as-is.

Committed.
diff mbox

Patch

Index: gcc/cp/ChangeLog

2013-03-21  Lawrence Crowl  <crowl@google.com>

	* Make-lang.in
	(CXX_PARSER_H): Add header dependence.
	* cp-tree.h
	(extern dump (cp_binding_level &)): New.
	(extern dump (cp_binding_level *)): New.
	* name-lookup.h
	(dump (cp_binding_level &)): New.
	(dump (cp_binding_level *)): New.
	* parser.c
	(dump (cp_parser &)): New.
	(dump (cp_parser *)): New.
	(dump (cp_token &)): New.
	(dump (cp_token *)): New.
	(dump (vec<cp_token, va_gc> &)): New.
	(dump (vec<cp_token, va_gc> *)): New.
	* parser.c: Add header dependence.
	(extern dump (cp_parser &)): New.
	(extern dump (cp_parser *)): New.
	(extern dump (cp_token &)): New.
	(extern dump (cp_token *)): New.
	(extern dump (vec<cp_token, va_gc> &)): New.
	(extern dump (vec<cp_token, va_gc> *)): New.

Index: gcc/ChangeLog

2013-03-21  Lawrence Crowl  <crowl@google.com>

	* Makefile.in: Add several missing include dependences.
	(DUMPFILE_H): New.
	(test-dump.o): New.  This object is not added to any executable,
	but is present for ad-hoc testing.
	* bitmap.c
	(dump (const bitmap_head_def &)): New.
	(dump (const bitmap_head_def *)): New.
	* bitmap.h
	(extern dump (const bitmap_head_def &)): New.
	(extern dump (const bitmap_head_def *)): New.
	* cfg.c
	(dump (edge_def &)): New.
	(dump (edge_def *)): New.
	* cfghooks.c
	(dump (basic_block_def &)): New.
	(dump (basic_block_def *)): New.
	* dumpfile.h
	(dump_node (const_tree, int, FILE *)): Correct source file.
	* dwarf2out.c
	(dump (die_struct &)): New.
	(dump (die_struct *)): New.
	* dwarf2out.h
	(extern dump (die_struct &)): New.
	(extern dump (die_struct *)): New.
	* gimple-pretty-print.c
	(dump (gimple_statement_d &)): New.
	(dump (gimple_statement_d *)): New.
	* gimple-pretty-print.h
	(extern dump (gimple_statement_d &)): New.
	(extern dump (gimple_statement_d *)): New.
	* ira-build.c
	(dump (ira_allocno_copy &)): New.
	(dump (ira_allocno_copy *)): New.
	(dump (ira_allocno &)): New.
	(dump (ira_allocno *)): New.
	* ira-int.h
	(extern dump (ira_allocno_copy &)): New.
	(extern dump (ira_allocno_copy *)): New.
	(extern dump (ira_allocno &)): New.
	(extern dump (ira_allocno *)): New.
	* ira-lives.c
	(dump (live_range &)): New.
	(dump (live_range *)): New.
	* lra-int.h
	(dump (lra_live_range &)): New.
	(dump (lra_live_range *)): New.
	* lra-lives.c
	(dump (lra_live_range &)): New.
	(dump (lra_live_range *)): New.
	* omega.c
	(dump (omega_pb_d &)): New.
	(dump (omega_pb_d *)): New.
	* omega.h
	(extern dump (omega_pb_d &)): New.
	(extern dump (omega_pb_d *)): New.
	* print-rtl.c
	(dump (const rtx_def &)): New.
	(dump (const rtx_def *)): New.
	* print-tree.c
	(debug_tree (tree): Move within file.
	(dump_raw (const tree_node &)): New.
	(dump_raw (const tree_node *)): New.
	(dump_tree_via_hooks (const tree_node *, int)): New.
	(dump (const tree_node &)): New.
	(dump (const tree_node *)): New.
	(dump_verbose (const tree_node &)): New.
	(dump_verbose (const tree_node *)): New.
	(dump_head (const tree_node &)): New.
	(dump_head (const tree_node *)): New.
	(dump_body (const tree_node &)): New.
	(dump_body (const tree_node *)): New.
	(debug_vec_tree (tree): Move and reimplement in terms of dump.
	(dump (vec<tree, va_gc> &)): New.
	(dump (vec<tree, va_gc> *)): New.
	* rtl.h
	(extern dump (const rtx_def &)): New.
	(extern dump (const rtx_def *)): New.
	* sbitmap.c
	(dump_raw (simple_bitmap_def &)): New.
	(dump_raw (simple_bitmap_def *)): New.
	(dump (simple_bitmap_def &)): New.
	(dump (simple_bitmap_def *)): New.
	* sbitmap.h
	(extern dump (simple_bitmap_def &)): New.
	(extern dump (simple_bitmap_def *)): New.
	(extern dump_raw (simple_bitmap_def &)): New.
	(extern dump_raw (simple_bitmap_def *)): New.
	* sel-sched-dump.c
	(dump (vinsn_def &)): New.
	(dump (vinsn_def *)): New.
	(dump_verbose (vinsn_def &)): New.
	(dump_verbose (vinsn_def *)): New.
	(dump (expr_def &)): New.
	(dump (expr_def *)): New.
	(dump_verbose (expr_def &)): New.
	(dump_verbose (expr_def *)): New.
	(dump (vec<rtx> &)): New.
	(dump (vec<rtx> *)): New.
	* sel-sched-dump.h
	(extern dump (vinsn_def &)): New.
	(extern dump (vinsn_def *)): New.
	(extern dump_verbose (vinsn_def &)): New.
	(extern dump_verbose (vinsn_def *)): New.
	(extern dump (expr_def &)): New.
	(extern dump (expr_def *)): New.
	(extern dump_verbose (expr_def &)): New.
	(extern dump_verbose (expr_def *)): New.
	(extern dump (vec<rtx> &)): New.
	(extern dump (vec<rtx> *)): New.
	* sel-sched-ir.h
	(_list_iter_cond_expr): Make inline instead of static.
	* sreal.c
	(dump (sreal &)): New.
	(dump (sreal *)): New.
	* sreal.h
	(extern dump (sreal &)): New.
	(extern dump (sreal *)): New.
	* tree.h
	(extern dump_raw (const tree_node &)): New.
	(extern dump_raw (const tree_node *)): New.
	(extern dump (const tree_node &)): New.
	(extern dump (const tree_node *)): New.
	(extern dump_verbose (const tree_node &)): New.
	(extern dump_verbose (const tree_node *)): New.
	(extern dump_head (const tree_node &)): New.
	(extern dump_head (const tree_node *)): New.
	(extern dump_body (const tree_node &)): New.
	(extern dump_body (const tree_node *)): New.
	(extern dump (vec<tree, va_gc> &)): New.
	(extern dump (vec<tree, va_gc> *)): New.
	* tree-cfg.c
	(dump (struct loop &)): New.
	(dump (struct loop *)): New.
	(dump_verbose (struct loop &)): New.
	(dump_verbose (struct loop *)): New.
	* tree-dump.c: Add header dependence.
	* tree-flow.h
	(extern dump (struct loop &)): New.
	(extern dump (struct loop *)): New.
	(extern dump_verbose (struct loop &)): New.
	(extern dump_verbose (struct loop *)): New.
	* tree-data-ref.c
	(dump (data_reference &)): New.
	(dump (data_reference *)): New.
	(dump (vec<data_reference_p> &)): New.
	(dump (vec<data_reference_p> *)): New.
	(dump (vec<ddr_p> &)): New.
	(dump (vec<ddr_p> *)): New.
	* tree-data-ref.h
	(extern dump (data_reference &)): New.
	(extern dump (data_reference *)): New.
	(extern dump (vec<data_reference_p> &)): New.
	(extern dump (vec<data_reference_p> *)): New.
	(extern dump (vec<ddr_p> &)): New.
	(extern dump (vec<ddr_p> *)): New.
	* tree-ssa-alias.c
	(dump (pt_solution &)): New.
	(dump (pt_solution *)): New.
	* tree-ssa-alias.h
	(extern dump (pt_solution &)): New.
	(extern dump (pt_solution *)): New.
	* tree-ssa-alias.c
	(dump (_var_map &)): New.
	(dump (_var_map *)): New.
	(dump (tree_live_info_d &)): New.
	(dump (tree_live_info_d *)): New.
	* tree-ssa-alias.h
	(extern dump (_var_map &)): New.
	(extern dump (_var_map *)): New.
	(extern dump (tree_live_info_d &)): New.
	(extern dump (tree_live_info_d *)): New.

Index: gcc/sel-sched-ir.h
===================================================================
--- gcc/sel-sched-ir.h	(revision 196604)
+++ gcc/sel-sched-ir.h	(working copy)
@@ -530,7 +530,7 @@  typedef _list_iterator av_set_iterator;
 #define FOR_EACH_EXPR(EXPR, I, AV) _FOR_EACH (expr, (EXPR), (I), (AV))
 #define FOR_EACH_EXPR_1(EXPR, I, AV) _FOR_EACH_1 (expr, (EXPR), (I), (AV))

-static bool
+inline bool
 _list_iter_cond_expr (av_set_t av, expr_t *exprp)
 {
   if (av)
Index: gcc/sreal.c
===================================================================
--- gcc/sreal.c	(revision 196604)
+++ gcc/sreal.c	(working copy)
@@ -72,6 +72,22 @@  dump_sreal (FILE *file, sreal *x)
 #endif
 }

+DEBUG_FUNCTION void
+dump (sreal &ref)
+{
+  dump_sreal (stderr, &ref);
+}
+
+DEBUG_FUNCTION void
+dump (sreal *ptr)
+{
+  if (ptr)
+    dump (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
+
+
 /* Copy the sreal number.  */

 static inline void
Index: gcc/tree-ssa-alias.c
===================================================================
--- gcc/tree-ssa-alias.c	(revision 196604)
+++ gcc/tree-ssa-alias.c	(working copy)
@@ -454,6 +454,25 @@  dump_points_to_solution (FILE *file, str
     }
 }

+
+/* Unified dump function for pt_solution.  */
+
+DEBUG_FUNCTION void
+dump (pt_solution &ref)
+{
+  dump_points_to_solution (stderr, &ref);
+}
+
+DEBUG_FUNCTION void
+dump (pt_solution *ptr)
+{
+  if (ptr)
+    dump (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
+
+
 /* Dump points-to information for SSA_NAME PTR into FILE.  */

 void
Index: gcc/sreal.h
===================================================================
--- gcc/sreal.h	(revision 196604)
+++ gcc/sreal.h	(working copy)
@@ -53,6 +53,8 @@  typedef struct sreal
 } sreal;

 extern void dump_sreal (FILE *, sreal *);
+extern void dump (sreal &ref);
+extern void dump (sreal *ptr);
 extern sreal *sreal_init (sreal *, unsigned HOST_WIDE_INT, signed int);
 extern HOST_WIDE_INT sreal_to_int (sreal *);
 extern int sreal_compare (sreal *, sreal *);
Index: gcc/tree-ssa-alias.h
===================================================================
--- gcc/tree-ssa-alias.h	(revision 196604)
+++ gcc/tree-ssa-alias.h	(working copy)
@@ -120,6 +120,8 @@  extern struct ptr_info_def *get_ptr_info
 extern void dump_alias_info (FILE *);
 extern void debug_alias_info (void);
 extern void dump_points_to_solution (FILE *, struct pt_solution *);
+extern void dump (pt_solution &ref);
+extern void dump (pt_solution *ptr);
 extern void dump_points_to_info_for (FILE *, tree);
 extern void debug_points_to_info_for (tree);
 extern void dump_alias_stats (FILE *);
Index: gcc/cp/parser.c
===================================================================
--- gcc/cp/parser.c	(revision 196604)
+++ gcc/cp/parser.c	(working copy)
@@ -327,6 +327,21 @@  cp_lexer_debug_tokens (vec<cp_token, va_
   cp_lexer_dump_tokens (stderr, buffer, NULL, 0, NULL);
 }

+DEBUG_FUNCTION void
+dump (vec<cp_token, va_gc> &ref)
+{
+  cp_lexer_dump_tokens (stderr, &ref, NULL, 0, NULL);
+}
+
+DEBUG_FUNCTION void
+dump (vec<cp_token, va_gc> *ptr)
+{
+  if (ptr)
+    dump (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
+

 /* Dump the cp_parser tree field T to FILE if T is non-NULL.  DESC is the
    description for T.  */
@@ -545,6 +560,20 @@  cp_debug_parser (FILE *file, cp_parser *
   fprintf (file, "\tColumn: %d\n", eloc.column);
 }

+DEBUG_FUNCTION void
+dump (cp_parser &ref)
+{
+  cp_debug_parser (stderr, &ref);
+}
+
+DEBUG_FUNCTION void
+dump (cp_parser *ptr)
+{
+  if (ptr)
+    dump (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}

 /* Allocate memory for a new lexer object and return it.  */

@@ -1140,6 +1169,23 @@  cp_lexer_print_token (FILE * stream, cp_
     }
 }

+DEBUG_FUNCTION void
+dump (cp_token &ref)
+{
+  cp_lexer_print_token (stderr, &ref);
+  fprintf (stderr, "\n");
+}
+
+DEBUG_FUNCTION void
+dump (cp_token *ptr)
+{
+  if (ptr)
+    dump (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
+
+
 /* Start emitting debugging information.  */

 static void
Index: gcc/cp/parser.h
===================================================================
--- gcc/cp/parser.h	(revision 196604)
+++ gcc/cp/parser.h	(working copy)
@@ -21,6 +21,7 @@  along with GCC; see the file COPYING3.
 #define GCC_CP_PARSER_H

 #include "tree.h"
+#include "cp/cp-tree.h"
 #include "c-family/c-pragma.h"

 /* A token's value and its associated deferred access checks and
@@ -343,7 +344,13 @@  typedef struct GTY(()) cp_parser {
 } cp_parser;

 /* In parser.c  */
+extern void dump (cp_token &ref);
+extern void dump (cp_token *ptr);
 extern void cp_lexer_debug_tokens (vec<cp_token, va_gc> *);
+extern void dump (vec<cp_token, va_gc> &ref);
+extern void dump (vec<cp_token, va_gc> *ptr);
 extern void cp_debug_parser (FILE *, cp_parser *);
+extern void dump (cp_parser &ref);
+extern void dump (cp_parser *ptr);

 #endif  /* GCC_CP_PARSER_H  */
Index: gcc/cp/cp-tree.h
===================================================================
--- gcc/cp/cp-tree.h	(revision 196604)
+++ gcc/cp/cp-tree.h	(working copy)
@@ -5072,6 +5072,8 @@  extern tree make_anon_name			(void);
 extern tree pushdecl_top_level_maybe_friend	(tree, bool);
 extern tree pushdecl_top_level_and_finish	(tree, tree);
 extern tree check_for_out_of_scope_variable	(tree);
+extern void dump				(cp_binding_level &ref);
+extern void dump				(cp_binding_level *ptr);
 extern void print_other_binding_stack		(cp_binding_level *);
 extern tree maybe_push_decl			(tree);
 extern tree current_decl_namespace		(void);
Index: gcc/cp/Make-lang.in
===================================================================
--- gcc/cp/Make-lang.in	(revision 196604)
+++ gcc/cp/Make-lang.in	(working copy)
@@ -260,7 +260,7 @@  CXX_TREE_H = $(TREE_H) cp/name-lookup.h
 	$(FUNCTION_H) \
 	$(SYSTEM_H) coretypes.h $(CONFIG_H) $(TARGET_H) $(GGC_H) \
 	$(srcdir)/../include/hashtab.h
-CXX_PARSER_H = tree.h c-family/c-pragma.h cp/parser.h
+CXX_PARSER_H = tree.h $(CXX_TREE_H) c-family/c-pragma.h cp/parser.h
 CXX_PRETTY_PRINT_H = cp/cxx-pretty-print.h $(C_PRETTY_PRINT_H)

 cp/lex.o: cp/lex.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) \
Index: gcc/cp/name-lookup.c
===================================================================
--- gcc/cp/name-lookup.c	(revision 196604)
+++ gcc/cp/name-lookup.c	(working copy)
@@ -1802,6 +1802,22 @@  print_binding_level (cp_binding_level* l
     }
 }

+DEBUG_FUNCTION void
+dump (cp_binding_level &ref)
+{
+  print_binding_level (&ref);
+}
+
+DEBUG_FUNCTION void
+dump (cp_binding_level *ptr)
+{
+  if (ptr)
+    dump (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
+
+
 void
 print_other_binding_stack (cp_binding_level *stack)
 {
Index: gcc/print-tree.c
===================================================================
--- gcc/print-tree.c	(revision 196604)
+++ gcc/print-tree.c	(working copy)
@@ -29,6 +29,7 @@  along with GCC; see the file COPYING3.
 #include "diagnostic.h"
 #include "gimple-pretty-print.h" /* FIXME */
 #include "tree-flow.h"
+#include "tree-dump.h"
 #include "dumpfile.h"

 /* Define the hash table of nodes already seen.
@@ -44,34 +45,6 @@  struct bucket

 static struct bucket **table;

-/* Print the node NODE on standard error, for debugging.
-   Most nodes referred to by this one are printed recursively
-   down to a depth of six.  */
-
-DEBUG_FUNCTION void
-debug_tree (tree node)
-{
-  table = XCNEWVEC (struct bucket *, HASH_SIZE);
-  print_node (stderr, "", node, 0);
-  free (table);
-  table = 0;
-  putc ('\n', stderr);
-}
-
-/* Print the vector of trees VEC on standard error, for debugging.
-   Most nodes referred to by this one are printed recursively
-   down to a depth of six.  */
-
-DEBUG_FUNCTION void
-debug_vec_tree (vec<tree, va_gc> *vec)
-{
-  table = XCNEWVEC (struct bucket *, HASH_SIZE);
-  print_vec_tree (stderr, "", vec, 0);
-  free (table);
-  table = 0;
-  putc ('\n', stderr);
-}
-
 /* Print PREFIX and ADDR to FILE.  */
 void
 dump_addr (FILE *file, const char *prefix, const void *addr)
@@ -1011,3 +984,146 @@  print_vec_tree (FILE *file, const char *
       print_node (file, temp, elt, indent + 4);
     }
 }
+
+
+/* Print the node NODE on standard error, for debugging.
+   Most nodes referred to by this one are printed recursively
+   down to a depth of six.  */
+
+DEBUG_FUNCTION void
+debug_tree (tree node)
+{
+  table = XCNEWVEC (struct bucket *, HASH_SIZE);
+  print_node (stderr, "", node, 0);
+  free (table);
+  table = 0;
+  putc ('\n', stderr);
+}
+
+DEBUG_FUNCTION void
+dump_raw (const tree_node &ref)
+{
+  debug_tree (const_cast <tree> (&ref));
+}
+
+DEBUG_FUNCTION void
+dump_raw (const tree_node *ptr)
+{
+  if (ptr)
+    dump_raw (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
+
+static void
+dump_tree_via_hooks (const tree_node *ptr, int options)
+{
+  if (DECL_P (ptr))
+    lang_hooks.print_decl (stderr, const_cast <tree_node*> (ptr), 0);
+  else if (TYPE_P (ptr))
+    lang_hooks.print_type (stderr, const_cast <tree_node*> (ptr), 0);
+  else if (TREE_CODE (ptr) == IDENTIFIER_NODE)
+    lang_hooks.print_identifier (stderr, const_cast <tree_node*> (ptr), 0);
+  else
+    print_generic_expr (stderr, const_cast <tree_node*> (ptr), options);
+  fprintf (stderr, "\n");
+}
+
+DEBUG_FUNCTION void
+dump (const tree_node &ref)
+{
+  dump_tree_via_hooks (&ref, 0);
+}
+
+DEBUG_FUNCTION void
+dump (const tree_node *ptr)
+{
+  if (ptr)
+    dump (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
+
+DEBUG_FUNCTION void
+dump_verbose (const tree_node &ref)
+{
+  dump_tree_via_hooks (&ref, TDF_VERBOSE);
+}
+
+DEBUG_FUNCTION void
+dump_verbose (const tree_node *ptr)
+{
+  if (ptr)
+    dump_verbose (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
+
+DEBUG_FUNCTION void
+dump_head (const tree_node &ref)
+{
+  dump (ref);
+}
+
+DEBUG_FUNCTION void
+dump_head (const tree_node *ptr)
+{
+  if (ptr)
+    dump_head (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
+
+DEBUG_FUNCTION void
+dump_body (const tree_node &ref)
+{
+  if (TREE_CODE (&ref) == FUNCTION_DECL)
+    dump_function_to_file (const_cast <tree_node*> (&ref), stderr, 0);
+  else
+    dump (ref);
+}
+
+DEBUG_FUNCTION void
+dump_body (const tree_node *ptr)
+{
+  if (ptr)
+    dump_body (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
+
+/* Print the vector of trees VEC on standard error, for debugging.
+   Most nodes referred to by this one are printed recursively
+   down to a depth of six.  */
+
+DEBUG_FUNCTION void
+debug_vec_tree (vec<tree, va_gc> *vec)
+{
+  tree elt;
+  unsigned ix;
+
+  /* Print the slot this node is in, and its code, and address.  */
+  fprintf (stderr, "<VEC");
+  dump_addr (stderr, " ", vec->address ());
+
+  FOR_EACH_VEC_ELT (*vec, ix, elt)
+    {
+      fprintf (stderr, "elt %d ", ix);
+      dump (elt);
+    }
+}
+
+DEBUG_FUNCTION void
+dump (vec<tree, va_gc> &ref)
+{
+  debug_vec_tree (&ref);
+}
+
+DEBUG_FUNCTION void
+dump (vec<tree, va_gc> *ptr)
+{
+  if (ptr)
+    dump (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
Index: gcc/sel-sched-dump.c
===================================================================
--- gcc/sel-sched-dump.c	(revision 196604)
+++ gcc/sel-sched-dump.c	(working copy)
@@ -207,6 +207,42 @@  dump_vinsn (vinsn_t vi)
   dump_vinsn_1 (vi, dump_vinsn_flags);
 }

+DEBUG_FUNCTION void
+dump (vinsn_def &ref)
+{
+  switch_dump (stderr);
+  dump_vinsn_1 (&ref, dump_vinsn_flags);
+  sel_print ("\n");
+  restore_dump ();
+}
+
+DEBUG_FUNCTION void
+dump (vinsn_def *ptr)
+{
+  if (ptr)
+    dump (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
+
+DEBUG_FUNCTION void
+dump_verbose (vinsn_def &ref)
+{
+  switch_dump (stderr);
+  dump_vinsn_1 (&ref, debug_vinsn_flags);
+  sel_print ("\n");
+  restore_dump ();
+}
+
+DEBUG_FUNCTION void
+dump_verbose (vinsn_def *ptr)
+{
+  if (ptr)
+    dump (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
+
 /* Dump vinsn VI to stderr.  */
 DEBUG_FUNCTION void
 debug_vinsn (vinsn_t vi)
@@ -298,6 +334,46 @@  debug_expr (expr_t expr)
   restore_dump ();
 }

+/* Dump expression REF.  */
+
+DEBUG_FUNCTION void
+dump (expr_def &ref)
+{
+  switch_dump (stderr);
+  dump_expr_1 (&ref, 0);
+  sel_print ("\n");
+  restore_dump ();
+}
+
+DEBUG_FUNCTION void
+dump (expr_def *ptr)
+{
+  if (ptr)
+    dump (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
+
+/* Dump expression REF verbosely.  */
+
+DEBUG_FUNCTION void
+dump_verbose (expr_def &ref)
+{
+  switch_dump (stderr);
+  dump_expr_1 (&ref, DUMP_EXPR_ALL);
+  sel_print ("\n");
+  restore_dump ();
+}
+
+DEBUG_FUNCTION void
+dump_verbose (expr_def *ptr)
+{
+  if (ptr)
+    dump_verbose (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
+
 /* Dump insn I honoring FLAGS.  */
 void
 dump_insn_1 (insn_t i, int flags)
@@ -918,6 +994,25 @@  debug_blist (blist_t bnds)
   restore_dump ();
 }

+/* Dump a rtx vector REF.  */
+DEBUG_FUNCTION void
+dump (vec<rtx> &ref)
+{
+  switch_dump (stderr);
+  dump_insn_vector (ref);
+  sel_print ("\n");
+  restore_dump ();
+}
+
+DEBUG_FUNCTION void
+dump (vec<rtx> *ptr)
+{
+  if (ptr)
+    dump (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
+
 /* Dump an insn vector SUCCS.  */
 DEBUG_FUNCTION void
 debug_insn_vector (rtx_vec_t succs)
Index: gcc/sel-sched-dump.h
===================================================================
--- gcc/sel-sched-dump.h	(revision 196604)
+++ gcc/sel-sched-dump.h	(working copy)
@@ -111,6 +111,12 @@  extern void dump_vinsn_1 (vinsn_t, int);
 extern void dump_vinsn (vinsn_t);
 extern void debug_vinsn (vinsn_t);

+extern void dump (vinsn_def &ref);
+extern void dump (vinsn_def *ptr);
+extern void dump_verbose (vinsn_def &ref);
+extern void dump_verbose (vinsn_def *ptr);
+
+
 /* These values control dumping of expressions.  The meaning of the fields
    is explained in sel-sched-ir.h.  */
 enum dump_expr_def
@@ -146,6 +152,12 @@  extern void dump_expr_1 (expr_t, int);
 extern void dump_expr (expr_t);
 extern void debug_expr (expr_t);

+extern void dump (expr_def &ref);
+extern void dump (expr_def *ptr);
+extern void dump_verbose (expr_def &ref);
+extern void dump_verbose (expr_def *ptr);
+
+
 /* A enumeration for dumping flags of an insn.  The difference from
    dump_insn_rtx_def is that these fields are for insns in stream only.  */
 enum dump_insn_def
@@ -214,6 +226,8 @@  extern void debug_av_set (av_set_t);
 extern void debug_lv_set (regset);
 extern void debug_ilist (ilist_t);
 extern void debug_blist (blist_t);
+extern void dump (vec<rtx> &ref);
+extern void dump (vec<rtx> *ptr);
 extern void debug_insn_vector (rtx_vec_t);
 extern void debug_hard_reg_set (HARD_REG_SET);
 extern rtx debug_mem_addr_value (rtx);
Index: gcc/tree-data-ref.c
===================================================================
--- gcc/tree-data-ref.c	(revision 196604)
+++ gcc/tree-data-ref.c	(working copy)
@@ -149,6 +149,24 @@  dump_data_references (FILE *file, vec<da
     dump_data_reference (file, dr);
 }

+/* Unified dump into FILE all the data references from DATAREFS.  */
+
+DEBUG_FUNCTION void
+dump (vec<data_reference_p> &ref)
+{
+  dump_data_references (stderr, ref);
+}
+
+DEBUG_FUNCTION void
+dump (vec<data_reference_p> *ptr)
+{
+  if (ptr)
+    dump (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
+
+
 /* Dump into STDERR all the data references from DATAREFS.  */

 DEBUG_FUNCTION void
@@ -190,6 +208,24 @@  dump_data_reference (FILE *outf,
   fprintf (outf, "#)\n");
 }

+/* Unified dump function for a DATA_REFERENCE structure.  */
+
+DEBUG_FUNCTION void
+dump (data_reference &ref)
+{
+  dump_data_reference (stderr, &ref);
+}
+
+DEBUG_FUNCTION void
+dump (data_reference *ptr)
+{
+  if (ptr)
+    dump (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
+
+
 /* Dumps the affine function described by FN to the file OUTF.  */

 static void
@@ -442,6 +478,22 @@  dump_data_dependence_relations (FILE *fi
     dump_data_dependence_relation (file, ddr);
 }

+DEBUG_FUNCTION void
+dump (vec<ddr_p> &ref)
+{
+  dump_data_dependence_relations (stderr, ref);
+}
+
+DEBUG_FUNCTION void
+dump (vec<ddr_p> *ptr)
+{
+  if (ptr)
+    dump (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
+
+
 /* Dump to STDERR all the dependence relations from DDRS.  */

 DEBUG_FUNCTION void
Index: gcc/tree-data-ref.h
===================================================================
--- gcc/tree-data-ref.h	(revision 196604)
+++ gcc/tree-data-ref.h	(working copy)
@@ -369,10 +369,16 @@  extern bool compute_data_dependences_for
                                              vec<ddr_p> *);
 extern void debug_ddrs (vec<ddr_p> );
 extern void dump_data_reference (FILE *, struct data_reference *);
+extern void dump (data_reference &ref);
+extern void dump (data_reference *ptr);
 extern void debug_data_reference (struct data_reference *);
 extern void debug_data_references (vec<data_reference_p> );
+extern void dump (vec<data_reference_p> &ref);
+extern void dump (vec<data_reference_p> *ptr);
 extern void debug_data_dependence_relation (struct data_dependence_relation *);
 extern void dump_data_dependence_relations (FILE *, vec<ddr_p> );
+extern void dump (vec<ddr_p> &ref);
+extern void dump (vec<ddr_p> *ptr);
 extern void debug_data_dependence_relations (vec<ddr_p> );
 extern void free_dependence_relation (struct data_dependence_relation *);
 extern void free_dependence_relations (vec<ddr_p> );
Index: gcc/tree-cfg.c
===================================================================
--- gcc/tree-cfg.c	(revision 196604)
+++ gcc/tree-cfg.c	(working copy)
@@ -7031,7 +7031,8 @@  print_loop (FILE *file, struct loop *loo
    loop, or just its structure.  */

 static void
-print_loop_and_siblings (FILE *file, struct loop *loop, int indent,
int verbosity)
+print_loop_and_siblings (FILE *file, struct loop *loop, int indent,
+			 int verbosity)
 {
   if (loop == NULL)
     return;
@@ -7053,6 +7054,40 @@  print_loops (FILE *file, int verbosity)
     print_loop_and_siblings (file, bb->loop_father, 0, verbosity);
 }

+/* Dump a loop.  */
+
+DEBUG_FUNCTION void
+dump (struct loop &ref)
+{
+  print_loop (stderr, &ref, 0, /*verbosity*/0);
+}
+
+DEBUG_FUNCTION void
+dump (struct loop *ptr)
+{
+  if (ptr)
+    dump (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
+
+/* Dump a loop verbosely.  */
+
+DEBUG_FUNCTION void
+dump_verbose (struct loop &ref)
+{
+  print_loop (stderr, &ref, 0, /*verbosity*/3);
+}
+
+DEBUG_FUNCTION void
+dump_verbose (struct loop *ptr)
+{
+  if (ptr)
+    dump (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
+

 /* Debugging loops structure at tree level, at some VERBOSITY level.  */

Index: gcc/tree.h
===================================================================
--- gcc/tree.h	(revision 196604)
+++ gcc/tree.h	(working copy)
@@ -5983,7 +5983,19 @@  extern void print_rtl (FILE *, const_rtx

 /* In print-tree.c */
 extern void debug_tree (tree);
+extern void dump_raw (const tree_node &ref);
+extern void dump_raw (const tree_node *ptr);
+extern void dump (const tree_node &ref);
+extern void dump (const tree_node *ptr);
+extern void dump_verbose (const tree_node &ref);
+extern void dump_verbose (const tree_node *ptr);
+extern void dump_head (const tree_node &ref);
+extern void dump_head (const tree_node *ptr);
+extern void dump_body (const tree_node &ref);
+extern void dump_body (const tree_node *ptr);
 extern void debug_vec_tree (vec<tree, va_gc> *);
+extern void dump (vec<tree, va_gc> &ref);
+extern void dump (vec<tree, va_gc> *ptr);
 #ifdef BUFSIZ
 extern void dump_addr (FILE*, const char *, const void *);
 extern void print_node (FILE *, const char *, tree, int);
Index: gcc/tree-flow.h
===================================================================
--- gcc/tree-flow.h	(revision 196604)
+++ gcc/tree-flow.h	(working copy)
@@ -378,6 +378,10 @@  extern void dot_cfg (void);
 extern void debug_cfg_stats (void);
 extern void debug_loops (int);
 extern void debug_loop (struct loop *, int);
+extern void dump (struct loop &ref);
+extern void dump (struct loop *ptr);
+extern void dump_verbose (struct loop &ref);
+extern void dump_verbose (struct loop *ptr);
 extern void debug_loop_num (unsigned, int);
 extern void print_loops (FILE *, int);
 extern void print_loops_bb (FILE *, basic_block, int, int);
Index: gcc/cfg.c
===================================================================
--- gcc/cfg.c	(revision 196604)
+++ gcc/cfg.c	(working copy)
@@ -504,6 +504,23 @@  dump_edge_info (FILE *file, edge e, int
       fputc (')', file);
     }
 }
+
+DEBUG_FUNCTION void
+dump (edge_def &ref)
+{
+  /* FIXME (crowl): Is this desireable?  */
+  dump_edge_info (stderr, &ref, 0, false);
+  dump_edge_info (stderr, &ref, 0, true);
+}
+
+DEBUG_FUNCTION void
+dump (edge_def *ptr)
+{
+  if (ptr)
+    dump (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
 
 /* Simple routines to easily allocate AUX fields of basic blocks.  */

Index: gcc/Makefile.in
===================================================================
--- gcc/Makefile.in	(revision 196604)
+++ gcc/Makefile.in	(working copy)
@@ -834,6 +834,7 @@  REVISION_s  := "\"\""
 endif

 # Shorthand variables for dependency lists.
+DUMPFILE_H = $(srcdir)/../libcpp/include/line-map.h dumpfile.h
 VEC_H = vec.h statistics.h $(GGC_H)
 HASH_TABLE_H = $(HASHTAB_H) hash-table.h
 EXCEPT_H = except.h $(HASHTAB_H)
@@ -931,8 +932,8 @@  MKDEPS_H = $(srcdir)/../libcpp/include/m
 SYMTAB_H = $(srcdir)/../libcpp/include/symtab.h $(OBSTACK_H)
 CPP_ID_DATA_H = $(CPPLIB_H) $(srcdir)/../libcpp/include/cpp-id-data.h
 CPP_INTERNAL_H = $(srcdir)/../libcpp/internal.h $(CPP_ID_DATA_H)
-TREE_DUMP_H = tree-dump.h $(SPLAY_TREE_H) dumpfile.h
-TREE_PASS_H = tree-pass.h $(TIMEVAR_H) dumpfile.h
+TREE_DUMP_H = tree-dump.h $(SPLAY_TREE_H) $(DUMPFILE_H)
+TREE_PASS_H = tree-pass.h $(TIMEVAR_H) $(DUMPFILE_H)
 TREE_FLOW_H = tree-flow.h tree-flow-inline.h tree-ssa-operands.h \
 		$(BITMAP_H) sbitmap.h $(BASIC_BLOCK_H) $(GIMPLE_H) \
 		$(HASHTAB_H) $(CGRAPH_H) $(IPA_REFERENCE_H) \
@@ -953,7 +954,8 @@  TREE_DATA_REF_H = tree-data-ref.h $(OMEG
 TREE_INLINE_H = tree-inline.h
 REAL_H = real.h $(MACHMODE_H)
 IRA_INT_H = ira.h ira-int.h $(CFGLOOP_H) alloc-pool.h
-LRA_INT_H = lra.h $(BITMAP_H) $(RECOG_H) $(INSN_ATTR_H) insn-codes.h lra-int.h
+LRA_INT_H = lra.h $(BITMAP_H) $(RECOG_H) $(INSN_ATTR_H) insn-codes.h \
+   insn-config.h $(REGS_H) lra-int.h
 DBGCNT_H = dbgcnt.h dbgcnt.def
 LTO_STREAMER_H = lto-streamer.h $(LINKER_PLUGIN_API_H) $(TARGET_H) \
 		$(CGRAPH_H) $(VEC_H) $(TREE_H) $(GIMPLE_H) \
@@ -1851,7 +1853,7 @@  gcc.srcextra: gengtype-lex.c

 graph.o: graph.c graph.h $(CONFIG_H) $(SYSTEM_H) coretypes.h \
     $(DIAGNOSTIC_CORE_H) sbitmap.h $(BASIC_BLOCK_H) $(CFGLOOP_H) \
-    $(PRETTY_PRINT_H) dumpfile.h
+    $(PRETTY_PRINT_H) $(DUMPFILE_H)

 sbitmap.o: sbitmap.c sbitmap.h $(CONFIG_H) $(SYSTEM_H) coretypes.h
 sparseset.o: sparseset.c $(SYSTEM_H) sparseset.h $(CONFIG_H)
@@ -1956,7 +1958,7 @@  c-family/c-gimplify.o : c-family/c-gimpl
 	$(C_COMMON_H) $(DIAGNOSTIC_CORE_H) $(GIMPLE_H) \
 	$(FLAGS_H) langhooks.h $(LANGHOOKS_DEF_H) \
 	$(TM_H) coretypes.h $(C_PRETTY_PRINT_H) $(CGRAPH_H) \
-	dumpfile.h $(TREE_INLINE_H)
+	$(DUMPFILE_H) $(TREE_INLINE_H)

 c-family/c-lex.o : c-family/c-lex.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
 	$(TM_H) $(TREE_H) $(FIXED_VALUE_H) debug.h $(C_COMMON_H) $(SPLAY_TREE_H) \
@@ -2000,7 +2002,7 @@  c-family/c-semantics.o : c-family/c-sema

 c-family/c-ada-spec.o : c-family/c-ada-spec.c c-family/c-ada-spec.h \
 	$(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(CPP_ID_DATA_H) $(TM_H) \
-	coretypes.h tree-iterator.h dumpfile.h
+	coretypes.h tree-iterator.h $(DUMPFILE_H)

 c-family/stub-objc.o : c-family/stub-objc.c $(CONFIG_H) $(SYSTEM_H) \
 	coretypes.h $(TREE_H) $(C_COMMON_H) c-family/c-objc.h
@@ -2202,6 +2204,11 @@  langhooks.o : langhooks.c $(CONFIG_H) $(
    $(TREE_H) toplev.h $(DIAGNOSTIC_CORE_H) $(TREE_INLINE_H) $(RTL_H)
insn-config.h \
    langhooks.h $(TARGET_H) $(LANGHOOKS_DEF_H) $(FLAGS_H) $(GGC_H)
$(DIAGNOSTIC_H) \
    intl.h $(GIMPLE_H) $(CGRAPH_H) output.h tree-diagnostic.h
+test-dump.o : test-dump.c $(CONFIG_H) $(SYSTEM_H) $(CORETYPES_H) \
+   $(BITMAP_H) sbitmap.h sreal.h $(TREE_H) $(CXX_PARSER_H) $(DWARF2OUT_H) \
+   $(GIMPLE_PRETTY_PRINT_H) $(BASIC_BLOCK_H) insn-config.h $(LRA_INT.H) \
+   $(SEL_SCHED_DUMP_H) $(IRA_INT_H) $(TREE_DATA_REF_H) $(TREE_FLOW_H) \
+   $(TREE_SSA_LIVE_H) tree-ssa-alias.h $(OMEGA_H) $(RTL_H)
 tree.o: tree.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
    all-tree.def $(FLAGS_H) $(FUNCTION_H) $(PARAMS_H) \
    toplev.h $(DIAGNOSTIC_CORE_H) $(GGC_H) $(HASHTAB_H) $(TARGET_H)
output.h $(TM_P_H) \
@@ -2211,7 +2218,7 @@  tree.o: tree.c $(CONFIG_H) $(SYSTEM_H) c
    $(EXCEPT_H) debug.h intl.h tree-diagnostic.h $(TREE_PRETTY_PRINT_H) \
    $(COMMON_TARGET_H)
 tree-dump.o: tree-dump.c $(CONFIG_H) $(SYSTEM_H) $(TM_H) $(TREE_H) \
-   langhooks.h $(TREE_DUMP_H) tree-iterator.h
+   langhooks.h $(TREE_DUMP_H) tree-iterator.h $(TREE_PRETTY_PRINT_H)
 tree-inline.o : tree-inline.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
    $(TREE_H) $(RTL_H) $(FLAGS_H) $(PARAMS_H) $(INPUT_H) insn-config.h \
    $(HASHTAB_H) langhooks.h $(TREE_INLINE_H) $(CGRAPH_H) \
@@ -2219,9 +2226,9 @@  tree-inline.o : tree-inline.c $(CONFIG_H
    debug.h $(DIAGNOSTIC_H) $(EXCEPT_H) $(TREE_FLOW_H) tree-iterator.h
tree-mudflap.h \
    $(IPA_PROP_H) value-prof.h $(TREE_PASS_H) $(TARGET_H) \
    $(TREE_PRETTY_PRINT_H)
-print-tree.o : print-tree.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h \
+print-tree.o : print-tree.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
    $(TM_H) $(TREE_H) $(GGC_H) langhooks.h tree-iterator.h \
-   $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(GIMPLE_PRETTY_PRINT_H)
+   $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(GIMPLE_PRETTY_PRINT_H) $(TREE_DUMP_H)
 stor-layout.o : stor-layout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
    $(TREE_H) $(PARAMS_H) $(FLAGS_H) $(FUNCTION_H) $(EXPR_H) $(RTL_H) \
    $(GGC_H) $(TM_P_H) $(TARGET_H) langhooks.h $(REGS_H) gt-stor-layout.h \
@@ -2271,15 +2278,15 @@  tree-into-ssa.o : tree-into-ssa.c $(TREE
    $(BITMAP_H) $(CFGLOOP_H) $(FLAGS_H) $(HASHTAB_H) \
    $(GIMPLE_H) $(TREE_INLINE_H) $(GIMPLE_PRETTY_PRINT_H)
 tree-ssa-ter.o : tree-ssa-ter.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
-   $(TREE_H) $(DIAGNOSTIC_H) $(TM_H) coretypes.h dumpfile.h \
+   $(TREE_H) $(DIAGNOSTIC_H) $(TM_H) coretypes.h $(DUMPFILE_H) \
    $(TREE_SSA_LIVE_H) $(BITMAP_H) $(FLAGS_H) \
    $(GIMPLE_PRETTY_PRINT_H)
 tree-ssa-coalesce.o : tree-ssa-coalesce.c $(TREE_FLOW_H) $(CONFIG_H) \
-   $(SYSTEM_H) $(TREE_H) $(DIAGNOSTIC_H) $(TM_H) coretypes.h dumpfile.h \
+   $(SYSTEM_H) $(TREE_H) $(DIAGNOSTIC_H) $(TM_H) coretypes.h $(DUMPFILE_H) \
    $(TREE_SSA_LIVE_H) $(BITMAP_H) $(FLAGS_H) $(HASH_TABLE_H) \
    $(TREE_PRETTY_PRINT_H)
 tree-outof-ssa.o : tree-outof-ssa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
-   $(TREE_H) $(DIAGNOSTIC_H) $(TM_H) coretypes.h dumpfile.h \
+   $(TREE_H) $(DIAGNOSTIC_H) $(TM_H) coretypes.h $(DUMPFILE_H) \
    $(TREE_SSA_LIVE_H) $(BASIC_BLOCK_H) $(BITMAP_H) $(GGC_H) \
    $(EXPR_H) $(SSAEXPAND_H) $(GIMPLE_PRETTY_PRINT_H)
 tree-ssa-dse.o : tree-ssa-dse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
@@ -2316,7 +2323,7 @@  tree-ssa-copy.o : tree-ssa-copy.c $(TREE
    $(FLAGS_H) $(CFGLOOP_H) $(GIMPLE_PRETTY_PRINT_H)
 tree-ssa-propagate.o : tree-ssa-propagate.c $(TREE_FLOW_H) $(CONFIG_H) \
    $(SYSTEM_H) $(TREE_H) $(TM_P_H) \
-   $(DIAGNOSTIC_H) $(FUNCTION_H) $(TM_H) coretypes.h dumpfile.h \
+   $(DIAGNOSTIC_H) $(FUNCTION_H) $(TM_H) coretypes.h $(DUMPFILE_H) \
    $(BASIC_BLOCK_H) langhooks.h \
    tree-ssa-propagate.h $(VEC_H) value-prof.h gt-tree-ssa-propagate.h
$(FLAGS_H) \
    $(GIMPLE_H) $(GIMPLE_PRETTY_PRINT_H)
@@ -2332,14 +2339,14 @@  tree-ssa-uncprop.o : tree-ssa-uncprop.c
    $(BASIC_BLOCK_H) domwalk.h $(TREE_PASS_H) $(FLAGS_H) \
    tree-ssa-propagate.h
 tree-ssa-threadedge.o : tree-ssa-threadedge.c $(TREE_FLOW_H) $(CONFIG_H) \
-   $(SYSTEM_H) coretypes.h dumpfile.h $(TM_H) $(TREE_H) $(FLAGS_H) $(TM_P_H) \
-   $(BASIC_BLOCK_H) $(CFGLOOP_H) \
+   $(SYSTEM_H) coretypes.h $(DUMPFILE_H) $(TM_H) $(TREE_H) $(FLAGS_H) \
+   $(TM_P_H) $(BASIC_BLOCK_H) $(CFGLOOP_H) \
    $(FUNCTION_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TREE_FLOW_H) \
    tree-ssa-propagate.h langhooks.h \
    $(PARAMS_H)
 tree-ssa-threadupdate.o : tree-ssa-threadupdate.c $(TREE_FLOW_H) $(CONFIG_H) \
    $(SYSTEM_H) $(TREE_H) $(TM_P_H) $(HASH_TABLE_H) \
-   $(DIAGNOSTIC_H) $(FUNCTION_H) $(TM_H) coretypes.h dumpfile.h \
+   $(DIAGNOSTIC_H) $(FUNCTION_H) $(TM_H) coretypes.h $(DUMPFILE_H) \
    $(BASIC_BLOCK_H) $(FLAGS_H) $(CFGLOOP_H)
 tree-ssanames.o : tree-ssanames.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
    $(TM_H) $(TREE_H) $(TREE_FLOW_H) $(TREE_PASS_H)
@@ -2349,7 +2356,7 @@  tree-phinodes.o : tree-phinodes.c $(CONF
 domwalk.o : domwalk.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
    $(BASIC_BLOCK_H) domwalk.h sbitmap.h
 tree-ssa-live.o : tree-ssa-live.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
-   $(TREE_H) $(DIAGNOSTIC_H) $(TM_H) coretypes.h dumpfile.h $(TIMEVAR_H) \
+   $(TREE_H) $(DIAGNOSTIC_H) $(TM_H) coretypes.h $(DUMPFILE_H) $(TIMEVAR_H) \
    $(TREE_SSA_LIVE_H) $(BITMAP_H) debug.h $(FLAGS_H) \
    $(GIMPLE_PRETTY_PRINT_H) $(GIMPLE_H)
 tree-ssa-copyrename.o : tree-ssa-copyrename.c $(TREE_FLOW_H) $(CONFIG_H) \
@@ -2365,7 +2372,7 @@  tree-ssa-pre.o : tree-ssa-pre.c $(TREE_F
    $(DBGCNT_H) tree-scalar-evolution.h $(GIMPLE_PRETTY_PRINT_H) domwalk.h
 tree-ssa-sccvn.o : tree-ssa-sccvn.c $(TREE_FLOW_H) $(CONFIG_H) \
    $(SYSTEM_H) $(TREE_H) $(DIAGNOSTIC_H) \
-   $(TM_H) coretypes.h dumpfile.h $(FLAGS_H) $(CFGLOOP_H) \
+   $(TM_H) coretypes.h $(DUMPFILE_H) $(FLAGS_H) $(CFGLOOP_H) \
    alloc-pool.h $(BASIC_BLOCK_H) $(BITMAP_H) $(HASHTAB_H) $(GIMPLE_H) \
    $(TREE_INLINE_H) tree-ssa-propagate.h tree-ssa-sccvn.h \
    $(PARAMS_H) $(GIMPLE_PRETTY_PRINT_H) gimple-fold.h
@@ -2420,8 +2427,8 @@  tree-dfa.o : tree-dfa.c $(TREE_FLOW_H) $
    $(TREE_PRETTY_PRINT_H)
 tree-ssa-operands.o : tree-ssa-operands.c $(TREE_FLOW_H) $(CONFIG_H) \
    $(SYSTEM_H) $(TREE_H) $(GGC_H) $(DIAGNOSTIC_H) $(TREE_INLINE_H) \
-   $(FLAGS_H) $(FUNCTION_H) $(TM_H) $(TIMEVAR_H) \
-   coretypes.h dumpfile.h langhooks.h $(IPA_REFERENCE_H)
$(GIMPLE_PRETTY_PRINT_H)
+   $(FLAGS_H) $(FUNCTION_H) $(TM_H) $(TIMEVAR_H) coretypes.h $(DUMPFILE_H) \
+   langhooks.h $(IPA_REFERENCE_H) $(GIMPLE_PRETTY_PRINT_H)
 tree-eh.o : tree-eh.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
    $(TREE_H) $(TM_H) $(FLAGS_H) $(FUNCTION_H) $(EXCEPT_H) langhooks.h \
    $(GGC_H) $(TREE_PASS_H) coretypes.h pointer-set.h \
@@ -2438,13 +2445,13 @@  tree-ssa-loop-unswitch.o : tree-ssa-loop
     $(TREE_INLINE_H)
 tree-ssa-address.o : tree-ssa-address.c $(TREE_FLOW_H) $(CONFIG_H) \
    $(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) \
-   $(DIAGNOSTIC_H) $(TM_H) coretypes.h dumpfile.h \
+   $(DIAGNOSTIC_H) $(TM_H) coretypes.h $(DUMPFILE_H) \
    $(FLAGS_H) $(TREE_INLINE_H) $(RECOG_H) insn-config.h \
    $(EXPR_H) gt-tree-ssa-address.h $(GGC_H) tree-affine.h $(TARGET_H) \
    $(TREE_PRETTY_PRINT_H) expmed.h
 tree-ssa-loop-niter.o : tree-ssa-loop-niter.c $(TREE_FLOW_H) $(CONFIG_H) \
    $(SYSTEM_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) $(PARAMS_H) \
-   $(TREE_INLINE_H) $(DIAGNOSTIC_H) $(TM_H) coretypes.h dumpfile.h \
+   $(TREE_INLINE_H) $(DIAGNOSTIC_H) $(TM_H) coretypes.h $(DUMPFILE_H) \
    $(DIAGNOSTIC_CORE_H) $(FLAGS_H) $(TREE_DATA_REF_H) \
    $(BASIC_BLOCK_H) $(GGC_H) intl.h $(GIMPLE_PRETTY_PRINT_H)
 tree-ssa-loop-ivcanon.o : tree-ssa-loop-ivcanon.c $(TREE_FLOW_H) $(CONFIG_H) \
@@ -2476,10 +2483,10 @@  tree-ssa-loop-ivopts.o : tree-ssa-loop-i
    $(GIMPLE_PRETTY_PRINT_H) tree-ssa-propagate.h
 tree-affine.o : tree-affine.c tree-affine.h $(CONFIG_H) pointer-set.h \
    $(SYSTEM_H) $(TREE_H) $(GIMPLE_H) \
-   coretypes.h dumpfile.h $(FLAGS_H) \
+   coretypes.h $(DUMPFILE_H) $(FLAGS_H) \
    $(TREE_PRETTY_PRINT_H)
 tree-ssa-loop-manip.o : tree-ssa-loop-manip.c $(TREE_FLOW_H) $(CONFIG_H) \
-   $(SYSTEM_H) coretypes.h dumpfile.h $(TM_H) $(TREE_H) \
+   $(SYSTEM_H) coretypes.h $(DUMPFILE_H) $(TM_H) $(TREE_H) \
    $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) \
    $(CFGLOOP_H) $(TREE_PASS_H) \
    $(SCEV_H) $(PARAMS_H) $(TREE_INLINE_H) langhooks.h
@@ -2494,7 +2501,7 @@  tree-ssa-math-opts.o : tree-ssa-math-opt
    $(DIAGNOSTIC_H) $(RTL_H) $(EXPR_H) $(OPTABS_H) $(GIMPLE_PRETTY_PRINT_H)
 tree-ssa-alias.o : tree-ssa-alias.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
    $(TREE_H) $(TM_P_H) $(GGC_H) $(TREE_INLINE_H) $(FLAGS_H) \
-   $(FUNCTION_H) $(TIMEVAR_H) convert.h $(TM_H) coretypes.h dumpfile.h \
+   $(FUNCTION_H) $(TIMEVAR_H) convert.h $(TM_H) coretypes.h $(DUMPFILE_H) \
    langhooks.h \
    $(PARAMS_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) \
    $(GIMPLE_H) $(VEC_H) $(TARGET_H) \
@@ -2522,8 +2529,8 @@  gimplify.o : gimplify.c $(CONFIG_H) $(SY
    $(SPLAY_TREE_H) $(VEC_H) tree-iterator.h $(TREE_PASS_H)
$(TREE_PRETTY_PRINT_H)
 gimple-iterator.o : gimple-iterator.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
    $(TREE_H) $(GIMPLE_H) $(TREE_FLOW_H) value-prof.h
-gimple-fold.o : gimple-fold.c $(TREE_FLOW_H) $(CONFIG_H) coretypes.h
dumpfile.h \
-   $(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(GGC_H) \
+gimple-fold.o : gimple-fold.c $(TREE_FLOW_H) $(CONFIG_H) coretypes.h \
+   $(DUMPFILE_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(GGC_H) \
    $(FUNCTION_H) $(TM_H) $(BASIC_BLOCK_H) langhooks.h \
    tree-ssa-propagate.h $(FLAGS_H) $(TARGET_H) gimple-fold.h
 gimple-low.o : gimple-low.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
@@ -2538,15 +2545,16 @@  omp-low.o : omp-low.c $(CONFIG_H) $(SYST
    $(CFGLOOP_H) tree-iterator.h gt-omp-low.h
 tree-browser.o : tree-browser.c tree-browser.def $(CONFIG_H) $(SYSTEM_H) \
    coretypes.h $(TREE_H) $(TREE_PRETTY_PRINT_H)
-omega.o : omega.c $(OMEGA_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h \
+omega.o : omega.c $(OMEGA_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h
$(DUMPFILE_H) \
    $(TREE_H) $(DIAGNOSTIC_CORE_H)
-tree-chrec.o : tree-chrec.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h \
+tree-chrec.o : tree-chrec.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
    $(TREE_PRETTY_PRINT_H) $(CFGLOOP_H) $(TREE_FLOW_H) $(SCEV_H) \
    $(PARAMS_H)
 tree-scalar-evolution.o : tree-scalar-evolution.c $(CONFIG_H) $(SYSTEM_H) \
-   coretypes.h dumpfile.h $(GIMPLE_PRETTY_PRINT_H) $(TREE_FLOW_H)
$(CFGLOOP_H) $(SCEV_H) \
-   $(PARAMS_H) gt-tree-scalar-evolution.h
-tree-data-ref.o : tree-data-ref.c $(CONFIG_H) $(SYSTEM_H) coretypes.h
dumpfile.h \
+   coretypes.h $(DUMPFILE_H) $(GIMPLE_PRETTY_PRINT_H) $(TREE_FLOW_H) \
+   $(CFGLOOP_H) $(SCEV_H) $(PARAMS_H) gt-tree-scalar-evolution.h
+tree-data-ref.o : tree-data-ref.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+   $(DUMPFILE_H) \
    $(GIMPLE_PRETTY_PRINT_H) $(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \
    langhooks.h tree-affine.h $(PARAMS_H)
 sese.o : sese.c sese.h $(CONFIG_H) $(SYSTEM_H) coretypes.h
$(TREE_PRETTY_PRINT_H) \
@@ -2556,7 +2564,7 @@  graphite.o : graphite.c $(CONFIG_H) $(SY
    $(DBGCNT_H) graphite-poly.h graphite-scop-detection.h \
    graphite-clast-to-gimple.h graphite-sese-to-poly.h
 graphite-blocking.o : graphite-blocking.c $(CONFIG_H) $(SYSTEM_H) \
-   coretypes.h dumpfile.h $(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \
+   coretypes.h $(DUMPFILE_H) $(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \
    sese.h graphite-poly.h
 graphite-clast-to-gimple.o : graphite-clast-to-gimple.c $(CONFIG_H) \
    $(SYSTEM_H) coretypes.h $(DIAGNOSTIC_CORE_H) $(TREE_FLOW_H) $(TREE_PASS_H) \
@@ -2566,10 +2574,10 @@  graphite-dependences.o : graphite-depend
    coretypes.h $(TREE_FLOW_H) $(TREE_PASS_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \
    sese.h graphite-poly.h
 graphite-interchange.o : graphite-interchange.c $(CONFIG_H) $(SYSTEM_H) \
-   coretypes.h dumpfile.h $(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \
+   coretypes.h $(DUMPFILE_H) $(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \
    sese.h graphite-poly.h
-graphite-poly.o : graphite-poly.c $(CONFIG_H) $(SYSTEM_H) coretypes.h
dumpfile.h \
-   $(DIAGNOSTIC_CORE_H) $(TREE_FLOW_H) $(GIMPLE_PRETTY_PRINT_H) \
+graphite-poly.o : graphite-poly.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+   $(DUMPFILE_H) $(DIAGNOSTIC_CORE_H) $(TREE_FLOW_H) $(GIMPLE_PRETTY_PRINT_H) \
    $(CFGLOOP_H) $(TREE_DATA_REF_H) sese.h graphite-poly.h
 graphite-scop-detection.o : graphite-scop-detection.c $(CONFIG_H) $(SYSTEM_H) \
    coretypes.h $(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) $(TREE_PASS_H) \
@@ -2579,40 +2587,40 @@  graphite-sese-to-poly.o : graphite-sese-
    $(TREE_DATA_REF_H) domwalk.h sese.h graphite-poly.h \
    graphite-sese-to-poly.h
 graphite-optimize-isl.o : graphite-optimize-isl.c $(CONFIG_H) $(SYSTEM_H) \
-    coretypes.h dumpfile.h $(TREE_FLOW_H) $(CFGLOOP_H)
$(TREE_DATA_REF_H) $(SCEV_H) \
-    sese.h graphite-poly.h
+    coretypes.h $(DUMPFILE_H) $(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \
+    $(SCEV_H) sese.h graphite-poly.h
 tree-vect-loop.o: tree-vect-loop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
-   $(TM_H) $(GGC_H) $(TREE_H) $(BASIC_BLOCK_H) $(TREE_FLOW_H) dumpfile.h \
+   $(TM_H) $(GGC_H) $(TREE_H) $(BASIC_BLOCK_H) $(TREE_FLOW_H) $(DUMPFILE_H) \
    $(CFGLOOP_H) $(EXPR_H) $(RECOG_H) $(OPTABS_H) \
    $(DIAGNOSTIC_CORE_H) $(SCEV_H) $(TREE_VECTORIZER_H) \
    $(GIMPLE_PRETTY_PRINT_H) $(TARGET_H) $(TREE_DATA_REF_H)
 tree-vect-loop-manip.o: tree-vect-loop-manip.c $(CONFIG_H) $(SYSTEM_H) \
-   coretypes.h dumpfile.h $(TM_H) $(GGC_H) $(TREE_H) $(BASIC_BLOCK_H) \
+   coretypes.h $(DUMPFILE_H) $(TM_H) $(GGC_H) $(TREE_H) $(BASIC_BLOCK_H) \
    $(TREE_FLOW_H) $(CFGLOOP_H) $(DIAGNOSTIC_CORE_H) \
    $(SCEV_H) $(TREE_VECTORIZER_H) langhooks.h $(GIMPLE_PRETTY_PRINT_H)
 tree-vect-patterns.o: tree-vect-patterns.c $(CONFIG_H) $(SYSTEM_H) \
-   coretypes.h dumpfile.h \
+   coretypes.h $(DUMPFILE_H) \
    $(TM_H) $(GGC_H) $(TREE_H) $(TARGET_H) $(BASIC_BLOCK_H) \
    $(TREE_FLOW_H) $(CFGLOOP_H) $(EXPR_H) $(OPTABS_H) $(PARAMS_H) \
    $(TREE_DATA_REF_H) $(TREE_VECTORIZER_H) $(RECOG_H) $(DIAGNOSTIC_CORE_H) \
    $(GIMPLE_PRETTY_PRINT_H)
 tree-vect-slp.o: tree-vect-slp.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
-   dumpfile.h $(TM_H) $(GGC_H) $(TREE_H) $(TARGET_H) $(BASIC_BLOCK_H) \
+   $(DUMPFILE_H) $(TM_H) $(GGC_H) $(TREE_H) $(TARGET_H) $(BASIC_BLOCK_H) \
    $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(CFGLOOP_H) \
    $(EXPR_H) $(RECOG_H) $(OPTABS_H) $(TREE_VECTORIZER_H) \
    $(GIMPLE_PRETTY_PRINT_H) $(TREE_DATA_REF_H) langhooks.h
 tree-vect-stmts.o: tree-vect-stmts.c $(CONFIG_H) $(SYSTEM_H) \
-   coretypes.h dumpfile.h $(TM_H) $(GGC_H) $(TREE_H) $(TARGET_H) \
+   coretypes.h $(DUMPFILE_H) $(TM_H) $(GGC_H) $(TREE_H) $(TARGET_H) \
    $(BASIC_BLOCK_H) $(TREE_FLOW_H) $(CFGLOOP_H) \
    $(EXPR_H) $(RECOG_H) $(OPTABS_H) $(TREE_VECTORIZER_H) \
    langhooks.h $(GIMPLE_PRETTY_PRINT_H)
 tree-vect-data-refs.o: tree-vect-data-refs.c $(CONFIG_H) $(SYSTEM_H) \
-   coretypes.h dumpfile.h $(TM_H) $(GGC_H) $(TREE_H) $(TARGET_H)
$(BASIC_BLOCK_H) \
-   $(TREE_FLOW_H) $(CFGLOOP_H) \
+   coretypes.h $(DUMPFILE_H) $(TM_H) $(GGC_H) $(TREE_H) $(TARGET_H) \
+   $(BASIC_BLOCK_H) $(TREE_FLOW_H) $(CFGLOOP_H) \
    $(EXPR_H) $(OPTABS_H) $(SCEV_H) $(TREE_VECTORIZER_H) \
    $(DIAGNOSTIC_CORE_H) $(TM_P_H) $(GIMPLE_PRETTY_PRINT_H)
 tree-vectorizer.o: tree-vectorizer.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
-   dumpfile.h $(TM_H) $(GGC_H) $(TREE_H) $(TREE_FLOW_H) \
+   $(DUMPFILE_H) $(TM_H) $(GGC_H) $(TREE_H) $(TREE_FLOW_H) \
    $(CFGLOOP_H) $(TREE_PASS_H) $(TREE_VECTORIZER_H) \
    $(TREE_PRETTY_PRINT_H)
 tree-loop-distribution.o: tree-loop-distribution.c $(CONFIG_H) $(SYSTEM_H) \
@@ -2633,7 +2641,7 @@  gimple.o : gimple.c $(CONFIG_H) $(SYSTEM
    $(TREE_FLOW_H) value-prof.h $(FLAGS_H) $(DEMANGLE_H) \
    $(TARGET_H) $(ALIAS_H)
 gimple-pretty-print.o : gimple-pretty-print.c $(CONFIG_H) $(SYSTEM_H) \
-   coretypes.h dumpfile.h \
+   coretypes.h $(DUMPFILE_H) \
    $(TREE_H) $(DIAGNOSTIC_H) $(HASHTAB_H) $(TREE_FLOW_H) \
    $(TM_H) $(GIMPLE_H) value-prof.h \
    $(TRANS_MEM_H) $(GIMPLE_PRETTY_PRINT_H)
@@ -2648,9 +2656,10 @@  tree-nomudflap.o : $(CONFIG_H) $(SYSTEM_
    $(GGC_H) gt-tree-mudflap.h $(TREE_PASS_H) $(DIAGNOSTIC_CORE_H)
 tree-pretty-print.o : tree-pretty-print.c $(CONFIG_H) $(SYSTEM_H) \
    $(TREE_H) $(DIAGNOSTIC_H) $(HASHTAB_H) $(TREE_FLOW_H) \
-   $(TM_H) coretypes.h dumpfile.h tree-iterator.h $(SCEV_H) langhooks.h \
+   $(TM_H) coretypes.h $(DUMPFILE_H) tree-iterator.h $(SCEV_H) langhooks.h \
    value-prof.h output.h $(TREE_PRETTY_PRINT_H)
-tree-diagnostic.o : tree-diagnostic.c $(CONFIG_H) $(SYSTEM_H)
coretypes.h dumpfile.h \
+tree-diagnostic.o : tree-diagnostic.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+   $(DUMPFILE_H) \
    $(TREE_H) $(DIAGNOSTIC_H) tree-diagnostic.h langhooks.h $(LANGHOOKS_DEF_H) \
    $(VEC_H) $(TREE_PRETTY_PRINT_H)
 fold-const.o : fold-const.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
@@ -2661,7 +2670,7 @@  diagnostic.o : diagnostic.c $(CONFIG_H)
    version.h $(DEMANGLE_H) $(INPUT_H) intl.h $(BACKTRACE_H) $(DIAGNOSTIC_H) \
    diagnostic.def
 opts.o : opts.c $(OPTS_H) $(OPTIONS_H) $(DIAGNOSTIC_CORE_H)
$(CONFIG_H) $(SYSTEM_H) \
-   coretypes.h dumpfile.h $(TM_H) \
+   coretypes.h $(DUMPFILE_H) $(TM_H) \
    $(DIAGNOSTIC_H) insn-attr-common.h intl.h $(COMMON_TARGET_H) \
    $(FLAGS_H) $(PARAMS_H) opts-diagnostic.h
 opts-global.o : opts-global.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
@@ -2731,8 +2740,8 @@  rtl-error.o: rtl-error.c $(SYSTEM_H) cor
 rtl.o : rtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
   $(GGC_H) $(BCONFIG_H) insn-notes.def reg-notes.def $(DIAGNOSTIC_CORE_H)

-print-rtl.o : print-rtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h
dumpfile.h $(TM_H) \
-    $(RTL_H) $(TREE_H) hard-reg-set.h $(BASIC_BLOCK_H) $(FLAGS_H) \
+print-rtl.o : print-rtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
+    $(TM_H) $(RTL_H) $(TREE_H) hard-reg-set.h $(BASIC_BLOCK_H) $(FLAGS_H) \
     $(BCONFIG_H) $(DIAGNOSTIC_H) cselib.h $(TREE_PRETTY_PRINT_H) \
     $(DWARF2OUT_H)
 rtlanal.o : rtlanal.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H)
$(DIAGNOSTIC_CORE_H) \
@@ -2755,7 +2764,8 @@  function.o : function.c $(CONFIG_H) $(SY
    $(COMMON_TARGET_H)
 statistics.o : statistics.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
    $(TREE_PASS_H) $(TREE_DUMP_H) $(HASHTAB_H) statistics.h $(FUNCTION_H)
-stmt.o : stmt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h
$(TM_H) $(RTL_H) \
+stmt.o : stmt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) $(TM_H) \
+   $(RTL_H) \
    $(TREE_H) $(FLAGS_H) $(FUNCTION_H) insn-config.h hard-reg-set.h $(EXPR_H) \
    $(LIBFUNCS_H) $(EXCEPT_H) $(RECOG_H) $(DIAGNOSTIC_CORE_H) \
    output.h $(GGC_H) $(TM_P_H) langhooks.h $(PREDICT_H) $(OPTABS_H) \
@@ -2814,7 +2824,7 @@  sdbout.o : sdbout.c $(CONFIG_H) $(SYSTEM
    $(TREE_H) $(GGC_H) $(RTL_H) $(REGS_H) $(FLAGS_H) insn-config.h \
    output.h $(DIAGNOSTIC_CORE_H) $(TM_P_H) gsyms.h langhooks.h
$(TARGET_H) sdbout.h \
    gt-sdbout.h reload.h
-dwarf2out.o : dwarf2out.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h \
+dwarf2out.o : dwarf2out.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
    $(TM_H) $(TREE_H) version.h $(RTL_H) $(DWARF2_H) debug.h $(FLAGS_H) \
    insn-config.h output.h $(DIAGNOSTIC_H) hard-reg-set.h $(REGS_H) $(EXPR_H) \
    toplev.h $(DIAGNOSTIC_CORE_H) $(DWARF2OUT_H) reload.h \
@@ -2860,7 +2870,7 @@  simplify-rtx.o : simplify-rtx.c $(CONFIG
 symtab.o : symtab.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
    langhooks.h $(DIAGNOSTIC_CORE_H) $(FLAGS_H) $(GGC_H) $(TARGET_H)
$(CGRAPH_H) \
    $(TIMEVAR_H) $(HASHTAB_H) gt-symtab.h
-cgraph.o : cgraph.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h \
+cgraph.o : cgraph.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
    $(TM_H) $(TREE_H) $(TIMEVAR_H) \
    langhooks.h toplev.h $(DIAGNOSTIC_CORE_H) $(FLAGS_H) $(GGC_H)
$(TARGET_H) $(CGRAPH_H) \
    gt-cgraph.h intl.h $(BASIC_BLOCK_H) debug.h $(HASHTAB_H) \
@@ -2929,7 +2939,7 @@  ipa-inline-transform.o : ipa-inline-tran
    $(HASHTAB_H) $(COVERAGE_H) $(GGC_H) $(TREE_FLOW_H) $(IPA_PROP_H) \
    $(TREE_PASS_H)
 ipa-utils.o : ipa-utils.c $(IPA_UTILS_H) $(CONFIG_H) $(SYSTEM_H) \
-   coretypes.h dumpfile.h $(TM_H) $(TREE_H) $(TREE_FLOW_H) $(TREE_INLINE_H) \
+   coretypes.h $(DUMPFILE_H) $(TM_H) $(TREE_H) $(TREE_FLOW_H)
$(TREE_INLINE_H) \
    langhooks.h pointer-set.h $(GGC_H) $(GIMPLE_H) $(SPLAY_TREE_H) \
    $(CGRAPH_H) $(FLAGS_H) $(DIAGNOSTIC_H)
 ipa-reference.o : ipa-reference.c $(CONFIG_H) $(SYSTEM_H) \
@@ -2944,12 +2954,14 @@  ipa-pure-const.o : ipa-pure-const.c $(CO
    $(GIMPLE_H) $(CGRAPH_H) $(FLAGS_H) $(TREE_PASS_H) \
    $(DIAGNOSTIC_H) $(CFGLOOP_H) $(SCEV_H) $(LTO_STREAMER_H) \
    $(GIMPLE_PRETTY_PRINT_H) $(DATA_STREAMER_H) $(TREE_STREAMER_H)
-coverage.o : coverage.c $(GCOV_IO_H) $(CONFIG_H) $(SYSTEM_H)
coretypes.h dumpfile.h \
+coverage.o : coverage.c $(GCOV_IO_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+   $(DUMPFILE_H) \
    $(TM_H) $(RTL_H) $(TREE_H) $(FLAGS_H) output.h $(REGS_H) $(EXPR_H) \
    $(FUNCTION_H) $(BASIC_BLOCK_H) toplev.h $(DIAGNOSTIC_CORE_H)
$(GGC_H) langhooks.h $(COVERAGE_H) \
    tree-iterator.h $(CGRAPH_H) gcov-io.c $(TM_P_H) \
    $(DIAGNOSTIC_CORE_H) intl.h gt-coverage.h $(TARGET_H) $(HASH_TABLE_H)
-cselib.o : cselib.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h
$(TM_H) $(RTL_H) \
+cselib.o : cselib.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
+   $(TM_H) $(RTL_H) \
    $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h $(RECOG_H) \
    $(EMIT_RTL_H) $(DIAGNOSTIC_CORE_H) $(FUNCTION_H) \
    cselib.h gt-cselib.h $(GGC_H) $(TM_P_H) $(PARAMS_H) alloc-pool.h \
@@ -2963,7 +2975,7 @@  dce.o : dce.c $(CONFIG_H) $(SYSTEM_H) co
    $(TREE_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) $(EXCEPT_H) $(DF_H) cselib.h \
    $(DBGCNT_H) dce.h $(VALTRACK_H) $(TREE_PASS_H) $(DBGCNT_H) $(TM_P_H) \
    $(EMIT_RTL_H)
-dumpfile.o: dumpfile.c dumpfile.h $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+dumpfile.o: dumpfile.c $(DUMPFILE_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h \
    $(DIAGNOSTIC_CORE_H) $(GIMPLE_PRETTY_PRINT_H) $(TREE_H)
 dse.o : dse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
    $(TREE_H) $(TM_P_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
@@ -3002,7 +3014,8 @@  store-motion.o : store-motion.c $(CONFIG
 resource.o : resource.c $(CONFIG_H) $(RTL_H) hard-reg-set.h $(SYSTEM_H) \
    coretypes.h $(TM_H) $(REGS_H) $(FLAGS_H) output.h $(RESOURCE_H) $(DF_H) \
    $(FUNCTION_H) $(DIAGNOSTIC_CORE_H) $(INSN_ATTR_H) $(EXCEPT_H)
$(PARAMS_H) $(TM_P_H)
-lcm.o : lcm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h $(TM_H)
$(RTL_H) $(REGS_H) \
+lcm.o : lcm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) $(TM_H) \
+   $(RTL_H) $(REGS_H) \
    hard-reg-set.h $(FLAGS_H) insn-config.h $(INSN_ATTR_H) $(RECOG_H) \
    $(BASIC_BLOCK_H) $(TM_P_H) $(FUNCTION_H) sbitmap.h
 mode-switching.o : mode-switching.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
@@ -3053,11 +3066,13 @@  df-core.o : df-core.c $(CONFIG_H) $(SYST
    insn-config.h $(RECOG_H) $(FUNCTION_H) $(REGS_H) alloc-pool.h \
    hard-reg-set.h $(BASIC_BLOCK_H) $(DF_H) $(BITMAP_H) sbitmap.h \
    $(TM_P_H) $(FLAGS_H) output.h $(TREE_PASS_H) $(PARAMS_H)
-df-problems.o : df-problems.c $(CONFIG_H) $(SYSTEM_H) coretypes.h
dumpfile.h $(TM_H) \
+df-problems.o : df-problems.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+   $(DUMPFILE_H) $(TM_H) \
    $(RTL_H) insn-config.h $(RECOG_H) $(FUNCTION_H) $(REGS_H) alloc-pool.h \
    hard-reg-set.h $(BASIC_BLOCK_H) $(DF_H) $(BITMAP_H) sbitmap.h $(TIMEVAR_H) \
    $(TM_P_H) $(TARGET_H) $(FLAGS_H) $(EXCEPT_H) dce.h $(VALTRACK_H)
-df-scan.o : df-scan.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h
$(TM_H) $(RTL_H) \
+df-scan.o : df-scan.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
+   $(TM_H) $(RTL_H) \
    insn-config.h $(RECOG_H) $(FUNCTION_H) $(REGS_H) alloc-pool.h \
    hard-reg-set.h $(BASIC_BLOCK_H) $(DF_H) $(BITMAP_H) sbitmap.h \
    $(TM_P_H) $(FLAGS_H) $(TARGET_H) $(TARGET_DEF_H) $(TREE_H) \
@@ -3073,23 +3088,26 @@  var-tracking.o : var-tracking.c $(CONFIG
    $(REGS_H) $(EXPR_H) $(TREE_PASS_H) $(TREE_FLOW_H) \
    cselib.h $(TARGET_H) $(DIAGNOSTIC_CORE_H) $(PARAMS_H) $(DIAGNOSTIC_H) \
    pointer-set.h $(RECOG_H) $(TM_P_H) $(TREE_PRETTY_PRINT_H) $(ALIAS_H)
-profile.o : profile.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h
$(TM_H) $(RTL_H) \
+profile.o : profile.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
+   $(TM_H) $(RTL_H) \
    $(TREE_H) $(FLAGS_H) $(REGS_H) $(EXPR_H) $(FUNCTION_H) $(BASIC_BLOCK_H) \
    $(DIAGNOSTIC_CORE_H) $(COVERAGE_H) $(TREE_FLOW_H) value-prof.h \
    $(CFGLOOP_H) profile.h
-mcf.o : mcf.c profile.h $(CONFIG_H) $(SYSTEM_H) $(TM_H) coretypes.h
dumpfile.h \
-   $(BASIC_BLOCK_H) langhooks.h $(GCOV_IO_H) $(TREE_H)
+mcf.o : mcf.c profile.h $(CONFIG_H) $(SYSTEM_H) $(TM_H) coretypes.h \
+   $(DUMPFILE_H) $(BASIC_BLOCK_H) langhooks.h $(GCOV_IO_H) $(TREE_H)
 tree-profile.o : tree-profile.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
    $(TM_H) $(TARGET_H) $(TREE_H) $(FLAGS_H) $(FUNCTION_H) \
    $(BASIC_BLOCK_H) $(DIAGNOSTIC_CORE_H) $(COVERAGE_H) $(TREE_H) value-prof.h \
    $(TREE_PASS_H) $(TREE_FLOW_H) gt-tree-profile.h $(CGRAPH_H)
-value-prof.o : value-prof.c $(CONFIG_H) $(SYSTEM_H) coretypes.h
dumpfile.h $(TM_H) \
+value-prof.o : value-prof.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
+   $(TM_H) \
    $(BASIC_BLOCK_H) hard-reg-set.h profile.h value-prof.h $(EXPR_H)
$(FLAGS_H) \
    $(RECOG_H) insn-config.h $(OPTABS_H) $(REGS_H) $(GGC_H) $(DIAGNOSTIC_H) \
    $(TREE_H) $(COVERAGE_H) $(RTL_H) $(GCOV_IO_H) $(TREE_FLOW_H) \
    tree-flow-inline.h $(TIMEVAR_H) $(DIAGNOSTIC_CORE_H) pointer-set.h \
    $(GIMPLE_PRETTY_PRINT_H)
-loop-doloop.o : loop-doloop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h
dumpfile.h $(TM_H) \
+loop-doloop.o : loop-doloop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+   $(DUMPFILE_H) $(TM_H) \
    $(RTL_H) $(FLAGS_H) $(EXPR_H) hard-reg-set.h $(BASIC_BLOCK_H) $(TM_P_H) \
    $(DIAGNOSTIC_CORE_H) $(CFGLOOP_H) $(PARAMS_H) $(TARGET_H)
 alloc-pool.o : alloc-pool.c $(CONFIG_H) $(SYSTEM_H) alloc-pool.h $(HASHTAB_H)
@@ -3097,7 +3115,8 @@  auto-inc-dec.o : auto-inc-dec.c $(CONFIG
    $(TREE_H) $(RTL_H) $(TM_P_H) hard-reg-set.h $(BASIC_BLOCK_H) insn-config.h \
    $(REGS_H) $(FLAGS_H) $(FUNCTION_H) $(EXCEPT_H)
$(DIAGNOSTIC_CORE_H) $(RECOG_H) \
    $(EXPR_H) $(TREE_PASS_H) $(DF_H) $(DBGCNT_H) $(TARGET_H)
-cfg.o : cfg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h
$(DIAGNOSTIC_CORE_H) \
+cfg.o : cfg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
+   $(DIAGNOSTIC_CORE_H) \
    $(GGC_H) $(OBSTACK_H) alloc-pool.h $(HASH_TABLE_H) $(CFGLOOP_H) $(TREE_H) \
    $(BASIC_BLOCK_H)
 cfghooks.o: cfghooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
@@ -3125,20 +3144,23 @@  cfgcleanup.o : cfgcleanup.c $(CONFIG_H)
    $(DIAGNOSTIC_CORE_H) insn-config.h cselib.h $(TARGET_H) $(TM_P_H)
$(PARAMS_H) \
    $(REGS_H) $(EMIT_RTL_H) $(FUNCTION_H) $(TREE_PASS_H) $(CFGLOOP_H)
$(EXPR_H) \
    $(DF_H) $(DBGCNT_H) dce.h
-cfgloop.o : cfgloop.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) coretypes.h
dumpfile.h $(TM_H) \
+cfgloop.o : cfgloop.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) coretypes.h \
+   $(DUMPFILE_H) $(TM_H) \
    $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(FLAGS_H) $(FUNCTION_H) \
    $(OBSTACK_H) toplev.h $(DIAGNOSTIC_CORE_H) $(TREE_FLOW_H)
$(TREE_H) pointer-set.h \
    $(GGC_H)
-cfgloopanal.o : cfgloopanal.c coretypes.h dumpfile.h $(CONFIG_H)
$(SYSTEM_H) $(RTL_H) \
+cfgloopanal.o : cfgloopanal.c coretypes.h $(DUMPFILE_H) $(CONFIG_H) \
+   $(SYSTEM_H) $(RTL_H) \
    $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(EXPR_H) $(TM_H) \
    $(OBSTACK_H) graphds.h $(PARAMS_H)
 graphds.o : graphds.c graphds.h $(CONFIG_H) $(SYSTEM_H) $(BITMAP_H)
$(OBSTACK_H) \
    coretypes.h $(VEC_H)
-loop-iv.o : loop-iv.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h \
+loop-iv.o : loop-iv.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
    $(RTL_H) $(BASIC_BLOCK_H) \
    hard-reg-set.h $(CFGLOOP_H) $(EXPR_H) $(TM_H) $(OBSTACK_H) \
    intl.h $(DIAGNOSTIC_CORE_H) $(DF_H) $(HASHTAB_H)
-loop-invariant.o : loop-invariant.c $(CONFIG_H) $(SYSTEM_H)
coretypes.h dumpfile.h \
+loop-invariant.o : loop-invariant.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+   $(DUMPFILE_H) \
    $(RTL_H) $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(EXPR_H) $(RECOG_H) \
    $(TM_H) $(TM_P_H) $(FUNCTION_H) $(FLAGS_H) $(DF_H) $(TARGET_H) \
    $(OBSTACK_H) $(HASHTAB_H) $(EXCEPT_H) $(PARAMS_H) $(REGS_H) ira.h
@@ -3149,10 +3171,11 @@  loop-init.o : loop-init.c $(CONFIG_H) $(
    $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) \
    coretypes.h $(TM_H) $(OBSTACK_H) $(TREE_PASS_H) $(FLAGS_H) \
    $(REGS_H) $(DF_H)
-loop-unswitch.o : loop-unswitch.c $(CONFIG_H) $(SYSTEM_H) coretypes.h
dumpfile.h \
+loop-unswitch.o : loop-unswitch.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+   $(DUMPFILE_H) \
    $(RTL_H) $(TM_H) $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(PARAMS_H) \
    $(EXPR_H) $(TM_H) $(OBSTACK_H)
-loop-unroll.o: loop-unroll.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h \
+loop-unroll.o: loop-unroll.c $(CONFIG_H) $(SYSTEM_H) coretypes.h
$(DUMPFILE_H) \
    $(RTL_H) $(TM_H) $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(PARAMS_H) \
    $(EXPR_H) $(TM_H) $(HASHTAB_H) $(RECOG_H) \
    $(OBSTACK_H)
@@ -3183,7 +3206,7 @@  reload.o : reload.c $(CONFIG_H) $(SYSTEM
    $(FLAGS_H) $(EXPR_H) $(OPTABS_H) reload.h $(RECOG_H) \
    hard-reg-set.h insn-config.h $(REGS_H) $(FUNCTION_H) real.h \
    addresses.h $(TM_P_H) $(PARAMS_H) $(TARGET_H) $(DF_H) ira.h
$(DIAGNOSTIC_CORE_H)
-reload1.o : reload1.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h \
+reload1.o : reload1.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
    $(TM_H) $(RTL_ERROR_H) \
    $(EXPR_H) $(OPTABS_H) reload.h $(REGS_H) hard-reg-set.h insn-config.h \
    $(BASIC_BLOCK_H) $(RECOG_H) $(FUNCTION_H)  $(TM_P_H) \
@@ -3201,8 +3224,8 @@  postreload-gcse.o : postreload-gcse.c $(
    $(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H) $(FUNCTION_H) $(DIAGNOSTIC_CORE_H) \
    $(TM_P_H) $(EXCEPT_H) $(TREE_H) $(TARGET_H) $(HASHTAB_H) intl.h
$(OBSTACK_H) \
    $(PARAMS_H) $(TREE_PASS_H) $(DBGCNT_H)
-caller-save.o : caller-save.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h \
-   $(TM_H) $(RTL_H) \
+caller-save.o : caller-save.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+   $(DUMPFILE_H) $(TM_H) $(RTL_H) \
    $(FLAGS_H) $(REGS_H) hard-reg-set.h insn-config.h $(BASIC_BLOCK_H)
$(FUNCTION_H) \
    addresses.h $(RECOG_H) reload.h $(EXPR_H) $(DIAGNOSTIC_CORE_H)
$(TM_P_H) $(DF_H) \
    gt-caller-save.h $(GGC_H)
@@ -3215,7 +3238,8 @@  reorg.o : reorg.c $(CONFIG_H) $(SYSTEM_H
    $(INSN_ATTR_H) $(EXCEPT_H) $(RECOG_H) $(FUNCTION_H) $(FLAGS_H) output.h \
    $(EXPR_H) $(DIAGNOSTIC_CORE_H) $(PARAMS_H) $(TM_P_H) $(OBSTACK_H)
$(RESOURCE_H) \
    $(TARGET_H) $(TREE_PASS_H)
-alias.o : alias.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h
$(TM_H) $(RTL_H) \
+alias.o : alias.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
+   $(TM_H) $(RTL_H) \
    $(FLAGS_H) hard-reg-set.h $(BASIC_BLOCK_H) $(REGS_H) $(DIAGNOSTIC_CORE_H) \
    $(ALIAS_H) $(EMIT_RTL_H) $(GGC_H) $(FUNCTION_H) cselib.h $(TREE_H)
$(TM_P_H) \
    langhooks.h $(TARGET_H) gt-alias.h $(TIMEVAR_H) $(CGRAPH_H) \
@@ -3315,8 +3339,8 @@  modulo-sched.o : modulo-sched.c $(DDG_H)
    $(SCHED_INT_H) $(CFGLOOP_H) $(EXPR_H) $(PARAMS_H) \
    $(GCOV_IO_H) hard-reg-set.h $(TM_H) $(TREE_PASS_H) \
    $(DF_H) $(DBGCNT_H)
-haifa-sched.o : haifa-sched.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h \
-   $(TM_H) $(RTL_H) \
+haifa-sched.o : haifa-sched.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+   $(DUMPFILE_H) $(TM_H) $(RTL_H) \
    $(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h
$(FUNCTION_H) \
    $(INSN_ATTR_H) $(DIAGNOSTIC_CORE_H) $(RECOG_H) $(EXCEPT_H)
$(TM_P_H) $(TARGET_H) \
    $(PARAMS_H) $(DBGCNT_H) $(CFGLOOP_H) ira.h $(EMIT_RTL_H)
$(COMMON_TARGET_H) \
@@ -3334,8 +3358,8 @@  sched-ebb.o : sched-ebb.c $(CONFIG_H) $(
    $(RTL_H) $(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
    $(FUNCTION_H) $(INSN_ATTR_H) $(DIAGNOSTIC_CORE_H) $(RECOG_H)
$(EXCEPT_H) $(TM_P_H) \
    $(PARAMS_H) $(TARGET_H)
-sched-vis.o : sched-vis.c $(CONFIG_H) $(SYSTEM_H) coretypes.h
dumpfile.h $(TM_H) \
-   $(INSN_ATTR_H) $(RTL_H) $(TREE_H) $(BASIC_BLOCK_H) $(PRETTY_PRINT_H)
+sched-vis.o : sched-vis.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
+   $(TM_H) $(INSN_ATTR_H) $(RTL_H) $(TREE_H) $(BASIC_BLOCK_H) $(PRETTY_PRINT_H)
 sel-sched.o : sel-sched.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
    $(RTL_ERROR_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
    $(FUNCTION_H) $(INSN_ATTR_H)  $(RECOG_H) $(EXCEPT_H) $(PARAMS_H) \
@@ -3411,7 +3435,7 @@  pointer-set.o: pointer-set.c pointer-set
 hooks.o: hooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(HOOKS_H)
 pretty-print.o: $(CONFIG_H) $(SYSTEM_H) coretypes.h intl.h $(PRETTY_PRINT_H)
 errors.o : errors.c $(CONFIG_H) $(SYSTEM_H) errors.h
-dbgcnt.o: dbgcnt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h dumpfile.h \
+dbgcnt.o: dbgcnt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
     $(DIAGNOSTIC_CORE_H) $(DBGCNT_H)
 lower-subreg.o : lower-subreg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
    $(MACHMODE_H) $(TM_H) $(RTL_H) $(TM_P_H) $(FLAGS_H) \
@@ -3423,7 +3447,8 @@  target-globals.o : target-globals.c $(CO
    $(FLAGS_H) $(REGS_H) $(RTL_H) reload.h expmed.h $(EXPR_H) $(OPTABS_H) \
    $(LIBFUNCS_H) $(CFGLOOP_H) $(IRA_INT_H) builtins.h gcse.h bb-reorder.h \
    lower-subreg.h
-hw-doloop.o : hw-doloop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h
dumpfile.h $(TM_H) \
+hw-doloop.o : hw-doloop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DUMPFILE_H) \
+   $(TM_H) \
    $(RTL_H) $(FLAGS_H) $(EXPR_H) hard-reg-set.h $(BASIC_BLOCK_H) $(TM_P_H) \
    $(DF_H) $(CFGLOOP_H) $(RECOG_H) $(TARGET_H) \
    $(REGS_H) hw-doloop.h
Index: gcc/sbitmap.c
===================================================================
--- gcc/sbitmap.c	(revision 196604)
+++ gcc/sbitmap.c	(working copy)
@@ -655,6 +655,21 @@  dump_bitmap (FILE *file, const_sbitmap b
   fprintf (file, "\n");
 }

+DEBUG_FUNCTION void
+dump_raw (simple_bitmap_def &ref)
+{
+  dump_bitmap (stderr, &ref);
+}
+
+DEBUG_FUNCTION void
+dump_raw (simple_bitmap_def *ptr)
+{
+  if (ptr)
+    dump_raw (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
+
 void
 dump_bitmap_file (FILE *file, const_sbitmap bmap)
 {
@@ -684,6 +699,21 @@  debug_bitmap (const_sbitmap bmap)
   dump_bitmap_file (stderr, bmap);
 }

+DEBUG_FUNCTION void
+dump (simple_bitmap_def &ref)
+{
+  dump_bitmap_file (stderr, &ref);
+}
+
+DEBUG_FUNCTION void
+dump (simple_bitmap_def *ptr)
+{
+  if (ptr)
+    dump (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
+
 void
 dump_bitmap_vector (FILE *file, const char *title, const char *subtitle,
 		     sbitmap *bmaps, int n_maps)
Index: gcc/sbitmap.h
===================================================================
--- gcc/sbitmap.h	(revision 196604)
+++ gcc/sbitmap.h	(working copy)
@@ -223,7 +223,11 @@  inline void sbitmap_vector_free (sbitmap
 }

 extern void dump_bitmap (FILE *, const_sbitmap);
+extern void dump_raw (const simple_bitmap_def &ref);
+extern void dump_raw (const simple_bitmap_def *ptr);
 extern void dump_bitmap_file (FILE *, const_sbitmap);
+extern void dump (const simple_bitmap_def &ref);
+extern void dump (const simple_bitmap_def *ptr);
 extern void dump_bitmap_vector (FILE *, const char *, const char *, sbitmap *,
 				 int);
 extern sbitmap sbitmap_alloc (unsigned int);
Index: gcc/tree-ssa-live.c
===================================================================
--- gcc/tree-ssa-live.c	(revision 196604)
+++ gcc/tree-ssa-live.c	(working copy)
@@ -1228,6 +1228,24 @@  dump_var_map (FILE *f, var_map map)
 }


+/* Generic dump for the above.  */
+
+DEBUG_FUNCTION void
+dump (_var_map &ref)
+{
+  dump_var_map (stderr, &ref);
+}
+
+DEBUG_FUNCTION void
+dump (_var_map *ptr)
+{
+  if (ptr)
+    dump (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
+
+
 /* Output live range info LIVE to file F, controlled by FLAG.  */

 void
@@ -1267,6 +1285,25 @@  dump_live_info (FILE *f, tree_live_info_
     }
 }

+
+/* Generic dump for the above.  */
+
+DEBUG_FUNCTION void
+dump (tree_live_info_d &ref)
+{
+  dump_live_info (stderr, &ref, 0);
+}
+
+DEBUG_FUNCTION void
+dump (tree_live_info_d *ptr)
+{
+  if (ptr)
+    dump (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
+
+
 #ifdef ENABLE_CHECKING
 /* Verify that SSA_VAR is a non-virtual SSA_NAME.  */

Index: gcc/tree-ssa-live.h
===================================================================
--- gcc/tree-ssa-live.h	(revision 196604)
+++ gcc/tree-ssa-live.h	(working copy)
@@ -71,6 +71,8 @@  typedef struct _var_map
 extern var_map init_var_map (int);
 extern void delete_var_map (var_map);
 extern void dump_var_map (FILE *, var_map);
+extern void dump (_var_map &ref);
+extern void dump (_var_map *ptr);
 extern int var_union (var_map, tree, tree);
 extern void partition_view_normal (var_map, bool);
 extern void partition_view_bitmap (var_map, bitmap, bool);
@@ -247,6 +249,8 @@  extern void delete_tree_live_info (tree_
 #define LIVEDUMP_EXIT	0x02
 #define LIVEDUMP_ALL	(LIVEDUMP_ENTRY | LIVEDUMP_EXIT)
 extern void dump_live_info (FILE *, tree_live_info_p, int);
+extern void dump (tree_live_info_d &ref);
+extern void dump (tree_live_info_d *ptr);


 /*  Return TRUE if P is marked as a global in LIVE.  */
Index: gcc/lra-int.h
===================================================================
--- gcc/lra-int.h	(revision 196604)
+++ gcc/lra-int.h	(working copy)
@@ -23,6 +23,8 @@  along with GCC; see the file COPYING3.	I
 #include "recog.h"
 #include "insn-attr.h"
 #include "insn-codes.h"
+#include "insn-config.h"
+#include "regs.h"

 #define lra_assert(c) gcc_checking_assert (c)

@@ -350,6 +352,8 @@  extern lra_live_range_t lra_merge_live_r
 extern bool lra_intersected_live_ranges_p (lra_live_range_t,
 					   lra_live_range_t);
 extern void lra_print_live_range_list (FILE *, lra_live_range_t);
+extern void dump (lra_live_range &ref);
+extern void dump (lra_live_range *ptr);
 extern void lra_debug_live_range_list (lra_live_range_t);
 extern void lra_debug_pseudo_live_ranges (int);
 extern void lra_debug_live_ranges (void);
Index: gcc/bitmap.c
===================================================================
--- gcc/bitmap.c	(revision 196604)
+++ gcc/bitmap.c	(working copy)
@@ -2117,7 +2117,8 @@  debug_bitmap (const_bitmap head)
    it does not print anything but the bits.  */

 DEBUG_FUNCTION void
-bitmap_print (FILE *file, const_bitmap head, const char *prefix,
const char *suffix)
+bitmap_print (FILE *file, const_bitmap head, const char *prefix,
+	      const char *suffix)
 {
   const char *comma = "";
   unsigned i;
@@ -2199,4 +2200,20 @@  dump_bitmap_statistics (void)
   fprintf (stderr,
"---------------------------------------------------------------------------------\n");
 }

+DEBUG_FUNCTION void
+dump (const bitmap_head_def &ref)
+{
+  dump_bitmap (stderr, &ref);
+}
+
+DEBUG_FUNCTION void
+dump (const bitmap_head_def *ptr)
+{
+  if (ptr)
+    dump (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
+
+
 #include "gt-bitmap.h"
Index: gcc/bitmap.h
===================================================================
--- gcc/bitmap.h	(revision 196604)
+++ gcc/bitmap.h	(working copy)
@@ -293,6 +293,8 @@  inline void dump_bitmap (FILE *file, con
 {
   bitmap_print (file, map, "", "\n");
 }
+extern void dump (const bitmap_head_def &ref);
+extern void dump (const bitmap_head_def *ptr);

 extern unsigned bitmap_first_set_bit (const_bitmap);
 extern unsigned bitmap_last_set_bit (const_bitmap);
Index: gcc/basic-block.h
===================================================================
--- gcc/basic-block.h	(revision 196604)
+++ gcc/basic-block.h	(working copy)
@@ -437,6 +437,8 @@  extern basic_block create_basic_block_st
 extern void clear_bb_flags (void);
 extern void dump_bb_info (FILE *, basic_block, int, int, bool, bool);
 extern void dump_edge_info (FILE *, edge, int, int);
+extern void dump (edge_def &ref);
+extern void dump (edge_def *ptr);
 extern void brief_dump_cfg (FILE *, int);
 extern void clear_edges (void);
 extern void scale_bbs_frequencies_int (basic_block *, int, int, int);
Index: gcc/omega.c
===================================================================
--- gcc/omega.c	(revision 196604)
+++ gcc/omega.c	(working copy)
@@ -309,6 +309,23 @@  omega_print_vars (FILE *file, omega_pb p
   fprintf (file, "\n");
 }

+/* Dump problem PB.  */
+
+DEBUG_FUNCTION void
+dump (omega_pb_d &ref)
+{
+  omega_print_problem (stderr, &ref);
+}
+
+DEBUG_FUNCTION void
+dump (omega_pb_d *ptr)
+{
+  if (ptr)
+    dump (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
+
 /* Debug problem PB.  */

 DEBUG_FUNCTION void
Index: gcc/omega.h
===================================================================
--- gcc/omega.h	(revision 196604)
+++ gcc/omega.h	(working copy)
@@ -122,6 +122,8 @@  extern enum omega_result omega_simplify_
 extern enum omega_result omega_constrain_variable_sign (omega_pb,
 							enum omega_eqn_color,
 							int, int);
+extern void dump (omega_pb_d &ref);
+extern void dump (omega_pb_d *ptr);
 extern void debug_omega_problem (omega_pb);
 extern void omega_print_problem (FILE *, omega_pb);
 extern void omega_print_red_equations (FILE *, omega_pb);
Index: gcc/tree-dump.c
===================================================================
--- gcc/tree-dump.c	(revision 196604)
+++ gcc/tree-dump.c	(working copy)
@@ -28,6 +28,7 @@  along with GCC; see the file COPYING3.
 #include "tree-dump.h"
 #include "langhooks.h"
 #include "tree-iterator.h"
+#include "tree-pretty-print.h"

 static unsigned int queue (dump_info_p, const_tree, int);
 static void dump_index (dump_info_p, unsigned int);
Index: gcc/dumpfile.h
===================================================================
--- gcc/dumpfile.h	(revision 196604)
+++ gcc/dumpfile.h	(working copy)
@@ -125,7 +125,6 @@  extern FILE *dump_begin (int, int *);
 extern void dump_end (int, FILE *);
 extern int dump_start (int, int *);
 extern void dump_finish (int);
-extern void dump_node (const_tree, int, FILE *);
 extern int dump_switch_p (const char *);
 extern int opt_info_switch_p (const char *);
 extern const char *dump_flag_name (int);
@@ -142,6 +141,9 @@  extern unsigned int dump_register (const
                                    int, int);
 extern bool enable_rtl_dump_file (void);

+/* In tree-dump.c  */
+extern void dump_node (const_tree, int, FILE *);
+
 /* In combine.c  */
 extern void dump_combine_total_stats (FILE *);
 /* In cfghooks.c  */
Index: gcc/gimple-pretty-print.c
===================================================================
--- gcc/gimple-pretty-print.c	(revision 196604)
+++ gcc/gimple-pretty-print.c	(working copy)
@@ -99,6 +99,21 @@  print_gimple_stmt (FILE *file, gimple g,
   pp_newline_and_flush (&buffer);
 }

+DEBUG_FUNCTION void
+dump (gimple_statement_d &ref)
+{
+  print_gimple_stmt (stderr, &ref, 0, 0);
+}
+
+DEBUG_FUNCTION void
+dump (gimple_statement_d *ptr)
+{
+  if (ptr)
+    dump (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
+

 /* Print GIMPLE statement G to FILE using SPC indentation spaces and
    FLAGS as in pp_gimple_stmt_1.  Print only the right-hand side
Index: gcc/gimple-pretty-print.h
===================================================================
--- gcc/gimple-pretty-print.h	(revision 196604)
+++ gcc/gimple-pretty-print.h	(working copy)
@@ -29,6 +29,8 @@  extern void debug_gimple_stmt (gimple);
 extern void debug_gimple_seq (gimple_seq);
 extern void print_gimple_seq (FILE *, gimple_seq, int, int);
 extern void print_gimple_stmt (FILE *, gimple, int, int);
+extern void dump (gimple_statement_d &ref);
+extern void dump (gimple_statement_d *ptr);
 extern void print_gimple_expr (FILE *, gimple, int, int);
 extern void pp_gimple_stmt_1 (pretty_printer *, gimple, int, int);
 extern void gimple_dump_bb_for_graph (pretty_printer *, basic_block);
Index: gcc/cfghooks.c
===================================================================
--- gcc/cfghooks.c	(revision 196604)
+++ gcc/cfghooks.c	(working copy)
@@ -279,6 +279,22 @@  dump_bb (FILE *outf, basic_block bb, int
   fputc ('\n', outf);
 }

+DEBUG_FUNCTION void
+dump (basic_block_def &ref)
+{
+  dump_bb (stderr, &ref, 0, 0);
+}
+
+DEBUG_FUNCTION void
+dump (basic_block_def *ptr)
+{
+  if (ptr)
+    dump (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
+
+
 /* Dumps basic block BB to pretty-printer PP, for use as a label of
    a DOT graph record-node.  The implementation of this hook is
    expected to write the label to the stream that is attached to PP.
Index: gcc/ira-int.h
===================================================================
--- gcc/ira-int.h	(revision 196604)
+++ gcc/ira-int.h	(working copy)
@@ -33,7 +33,7 @@  along with GCC; see the file COPYING3.
 #define ira_assert(c) gcc_assert (c)
 #else
 /* Always define and include C, so that warnings for empty body in an
-  ‘if’ statement and unused variable do not occur.  */
+  'if' statement and unused variable do not occur.  */
 #define ira_assert(c) ((void)(0 && (c)))
 #endif

@@ -933,8 +933,13 @@  extern ira_loop_tree_node_t ira_curr_loo
 extern ira_allocno_t *ira_curr_regno_allocno_map;

 extern void ira_debug_copy (ira_copy_t);
+extern void dump (ira_allocno_copy &ref);
+extern void dump (ira_allocno_copy *ptr);
+
 extern void ira_debug_copies (void);
 extern void ira_debug_allocno_copies (ira_allocno_t);
+extern void dump (ira_allocno &ref);
+extern void dump (ira_allocno *ptr);

 extern void ira_traverse_loop_tree (bool, ira_loop_tree_node_t,
 				    void (*) (ira_loop_tree_node_t),
@@ -983,6 +988,8 @@  extern void ira_tune_allocno_costs (void

 extern void ira_rebuild_start_finish_chains (void);
 extern void ira_print_live_range_list (FILE *, live_range_t);
+extern void dump (live_range &ref);
+extern void dump (live_range *ptr);
 extern void ira_debug_live_range_list (live_range_t);
 extern void ira_debug_allocno_live_ranges (ira_allocno_t);
 extern void ira_debug_live_ranges (void);
Index: gcc/rtl.h
===================================================================
--- gcc/rtl.h	(revision 196604)
+++ gcc/rtl.h	(working copy)
@@ -2587,6 +2587,8 @@  extern void sel_sched_fix_param (const c

 /* In print-rtl.c */
 extern const char *print_rtx_head;
+extern void dump (const rtx_def &ref);
+extern void dump (const rtx_def *ptr);
 extern void debug_rtx (const_rtx);
 extern void debug_rtx_list (const_rtx, int);
 extern void debug_rtx_range (const_rtx, const_rtx);
Index: gcc/dwarf2out.c
===================================================================
--- gcc/dwarf2out.c	(revision 196604)
+++ gcc/dwarf2out.c	(working copy)
@@ -5351,6 +5351,22 @@  debug_dwarf_die (dw_die_ref die)
   print_die (die, stderr);
 }

+DEBUG_FUNCTION void
+dump (die_struct &ref)
+{
+  print_die (&ref, stderr);
+}
+
+DEBUG_FUNCTION void
+dump (die_struct *ptr)
+{
+  if (ptr)
+    dump (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
+
+
 /* Print all DWARF information collected for the compilation unit.
    This routine is a debugging aid only.  */

Index: gcc/dwarf2out.h
===================================================================
--- gcc/dwarf2out.h	(revision 196604)
+++ gcc/dwarf2out.h	(working copy)
@@ -257,6 +257,8 @@  extern void dwarf2out_emit_cfi (dw_cfi_r
 extern void debug_dwarf (void);
 struct die_struct;
 extern void debug_dwarf_die (struct die_struct *);
+extern void dump (die_struct &ref);
+extern void dump (die_struct *ptr);
 extern void dwarf2out_set_demangle_name_func (const char *(*) (const char *));
 #ifdef VMS_DEBUGGING_INFO
 extern void dwarf2out_vms_debug_main_pointer (void);
Index: gcc/lra-lives.c
===================================================================
--- gcc/lra-lives.c	(revision 196604)
+++ gcc/lra-lives.c	(working copy)
@@ -848,6 +848,21 @@  lra_print_live_range_list (FILE *f, lra_
   fprintf (f, "\n");
 }

+DEBUG_FUNCTION void
+dump (lra_live_range &ref)
+{
+  lra_print_live_range_list (stderr, &ref);
+}
+
+DEBUG_FUNCTION void
+dump (lra_live_range *ptr)
+{
+  if (ptr)
+    dump (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
+
 /* Print live ranges R to stderr.  */
 void
 lra_debug_live_range_list (lra_live_range_t r)
Index: gcc/ira-lives.c
===================================================================
--- gcc/ira-lives.c	(revision 196604)
+++ gcc/ira-lives.c	(working copy)
@@ -1522,6 +1522,21 @@  ira_print_live_range_list (FILE *f, live
   fprintf (f, "\n");
 }

+DEBUG_FUNCTION void
+dump (live_range &ref)
+{
+  ira_print_live_range_list (stderr, &ref);
+}
+
+DEBUG_FUNCTION void
+dump (live_range *ptr)
+{
+  if (ptr)
+    dump (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
+
 /* Print live ranges R to stderr.  */
 void
 ira_debug_live_range_list (live_range_t r)
Index: gcc/print-rtl.c
===================================================================
--- gcc/print-rtl.c	(revision 196604)
+++ gcc/print-rtl.c	(working copy)
@@ -662,6 +662,23 @@  debug_rtx (const_rtx x)
   fprintf (stderr, "\n");
 }

+/* Dump rtx REF.  */
+
+DEBUG_FUNCTION void
+dump (const rtx_def &ref)
+{
+  debug_rtx (&ref);
+}
+
+DEBUG_FUNCTION void
+dump (const rtx_def *ptr)
+{
+  if (ptr)
+    dump (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
+
 /* Count of rtx's to print with debug_rtx_list.
    This global exists because gdb user defined commands have no arguments.  */

Index: gcc/ira-build.c
===================================================================
--- gcc/ira-build.c	(revision 196604)
+++ gcc/ira-build.c	(working copy)
@@ -1321,6 +1321,21 @@  print_copy (FILE *f, ira_copy_t cp)
 	   ? "move" : cp->constraint_p ? "constraint" : "shuffle");
 }

+DEBUG_FUNCTION void
+dump (ira_allocno_copy &ref)
+{
+  print_copy (stderr, &ref);
+}
+
+DEBUG_FUNCTION void
+dump (ira_allocno_copy *ptr)
+{
+  if (ptr)
+    dump (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
+
 /* Print info about copy CP into stderr.  */
 void
 ira_debug_copy (ira_copy_t cp)
@@ -1374,6 +1389,22 @@  print_allocno_copies (FILE *f, ira_alloc
   fprintf (f, "\n");
 }

+DEBUG_FUNCTION void
+dump (ira_allocno &ref)
+{
+  print_allocno_copies (stderr, &ref);
+}
+
+DEBUG_FUNCTION void
+dump (ira_allocno *ptr)
+{
+  if (ptr)
+    dump (*ptr);
+  else
+    fprintf (stderr, "<nil>\n");
+}
+
+
 /* Print info about copies involving allocno A into stderr.  */
 void
 ira_debug_allocno_copies (ira_allocno_t a)