public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch] Introduce dumpfile.h, clean up tree-pass.h dependencies
@ 2012-07-13 13:39 Steven Bosscher
  2012-07-16  9:00 ` Richard Guenther
  0 siblings, 1 reply; 5+ messages in thread
From: Steven Bosscher @ 2012-07-13 13:39 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 8543 bytes --]

Hello,

The attached monster patch re-organizes a lot of includes to avoid
dependencies on tree-pass.h just for having dump_file available.

I've used the following "rules" to decide what needs to go where:

* tree-dump.h should be independent of the pass manager, i.e. not
include tree-pass.h.

* passes that do not need dumping of GENERIC do not need tree-dump.h either.

* Any file that defines an opt_pass may include tree-pass.h.

* If a file includes tree-pass.h, it does not need to include
dumpfile.h or timevar.h, because tree-pass.h provides these already
(the *opt_pass structs depend on them)

* If a file does not include tree-pass.h, but it needs dump_file, it
should include dumpfile.h. Likewise for timevar.h. This category of
files are the implementation files for supporting code, like alias.c
and cfg*.c.

With those rules in mind, my hackathon started and the result is
attached. I had to move a few functions around, but not very much. I
also uncovered a bug in one of the DF files, where it was trying to
use get_insns without including emit-rtl.h.  No DF file should emit
RTL, so I don't want to include emit-rtl.h there, so I removed that
dumping (which was only for debugging purposes anyway, and obviously
not tested in a while or I wouldn't have run into this problem to
begin with :-)

Bootstrapped&tested on powerpc64-unknown-linux-gnu and on
x86_64-unknown-linux-gnu. OK for trunk?

Ciao!
Steven


        * system.h (dump_file): Do not define.
        * tree-pass.h: Include dumpfile.h, which is a new file containing...
        (enum tree_dump_index, TDF_*, get_dump_file_name, dump_enabled_p,
        dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p,
        dump_flag_name, dump_file, dump_flags, dump_file_name,
        get_dump_file_info, struct dump_file_info): all of this, moved to...
        * dumpfile.h: Here, new file.
        * tree-dump.h: Include dumpfile.h, but not tree-pass.h.
        (dump_stmt): Remove prototype for C++ specific function.
        (dump_enumerated_decls): Move prototype from here...
        * tree-flow.h (dump_enumerated_decls): ... to here.
        (get_ref_base_and_extent) Move prototype from here ...
        * tree.h (get_ref_base_and_extent) ... to here.
        * tree-ssa-live.c: Do not inclde tree-pretty-print.h, because
        gimple-pretty-print.h is enough.  Do not include tree-dump.h,
        include timevar.h and dumpfile.h instead.
        (struct numbered_tree_d, compare_decls_by_uid,
        dump_enumerated_decls_push, dump_enumerated_decls): Move from here ...
        * tree-dfa.c:(struct numbered_tree_d, compare_decls_by_uid,
        dump_enumerated_decls_push, dump_enumerated_decls):... to here.
        Do not include timevar.h.
        (get_ref_base_and_extent): Move from here ...
        * tree.c (get_ref_base_and_extent): ... to here.
        Do not include timevar.h.
        * tree-cfg.c: Do not include langhooks.h, tree-pretty-print.h, and
        timevar.h.
        (dump_cfg_stats): Use current_function_name.
        (gimple_cfg2vcg): Likewise.
        (dump_function_to_file): Likewise.
        * df-scan.c: Do not include tree-pass.h and timevar.h.
        Include dumpfile.h.
        (df_entry_block_bitmap_verify, df_exit_block_bitmap_verify): Do not
        use print_current_pass.
        * df-problems.c: Include dumpfile.h.
        Always define REG_DEAD_DEBUGGING, avoid #ifdef code, because it
        leads to errors in the code not selected.
        (df_note_compute): Do not print_rtl_with_bb here.  Fix compilation
        bug if REG_DEAD_DEBUGGING is not 0, get_insns is not available here.
        * lcm.c: Include dumpfile.h.
        Remove obsolete include of insn-attr.h.
        * dojump.c (do_compare_rtx_and_jump): Remove failure printing for
        missing probability notes.
        * stmt.c: Include dumpfile.h.
        (emit_case_decision_tree): Re-enable printing expand details only
        if TDF_DETAILS.
        * alias.c, auto-inc-dec.c, bb-reorder.c, caller-save.c, cfg.c,
        cfgcleanup.c, cfgexpand.c, cfgloop.c, cfgloopmanip.c, cgraph.c,
        cgraphclones.c, cgraphunit.c, combine.c, combine-stack-adj.c,
        coverage.c, cprop.c, cse.c, cselib.c, dbgcnt.c, dce.c, df-core.c,
        dse.c, dwarf2out.c, emit-rtl.c, except.c, expr.c, final.c,
        function.c, fwprop.c, gcse.c, gimple-fold.c,
        gimple-pretty-print.c, gimple-ssa-strength-reduction.c,
        gimplify.c, graphite-blocking.c, graphite-clast-to-gimple.c,
        graphite-dependences.c, graphite-interchange.c,
        graphite-optimize-isl.c, graphite-poly.c,
        graphite-sese-to-poly.c, haifa-sched.c, hw-doloop.c, ifcvt.c,
        ipa.c, ipa-cp.c, ipa-inline-analysis.c, ipa-inline.c,
        ipa-inline-transform.c, ipa-prop.c, ipa-pure-const.c,
        ipa-reference.c, ipa-split.c, ipa-utils.c, ira.c, ira-emit.c,
        jump.c, loop-doloop.c, loop-init.c, loop-invariant.c, loop-iv.c,
        loop-unroll.c, loop-unswitch.c, lower-subreg.c,
        lto-section-out.c, lto-streamer-in.c, matrix-reorg.c, mcf.c,
        mode-switching.c, modulo-sched.c, omega.c, omp-low.c, passes.c,
        postreload.c, postreload-gcse.c, predict.c, print-rtl.c,
        print-tree.c, profile.c, recog.c, ree.c, regcprop.c, reginfo.c,
        regmove.c, regrename.c, reg-stack.c, reload1.c, reorg.c,
        sched-rgn.c, sched-vis.c, sel-sched.c, sel-sched-ir.c,
        store-motion.c, tracer.c, trans-mem.c, tree-affine.c,
        tree-call-cdce.c, tree-cfgcleanup.c, tree-chrec.c,
        tree-data-ref.c, tree-diagnostic.c, tree-dump.c,
        tree-eh.c, tree-flow-inline.h, tree-if-conv.c, tree-into-ssa.c,
        tree-mudflap.c, tree-nrv.c, tree-object-size.c,
        tree-optimize.c, tree-outof-ssa.c, tree-predcom.c,
        tree-pretty-print.c, tree-profile.c, tree-scalar-evolution.c,
        tree-sra.c, tree-ssa-address.c, tree-ssa-alias.c, tree-ssa.c,
        tree-ssa-ccp.c, tree-ssa-coalesce.c, tree-ssa-copy.c,
        tree-ssa-copyrename.c,, tree-ssa-dce.c, tree-ssa-dom.c,
        tree-ssa-dse.c, tree-ssa-forwprop.c, tree-ssa-ifcombine.c,
        tree-ssa-loop.c, tree-ssa-loop-ch.c, tree-ssa-loop-im.c,
        tree-ssa-loop-ivcanon.c, tree-ssa-loop-ivopts.c,
        tree-ssa-loop-manip.c, tree-ssa-loop-niter.c,
        tree-ssa-loop-prefetch.c, tree-ssa-loop-unswitch.c,
        tree-ssa-math-opts.c, tree-ssa-operands.c, tree-ssa-phiopt.c,
        tree-ssa-phiprop.c, tree-ssa-pre.c, tree-ssa-propagate.c,
        tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-ssa-sink.c,
        tree-ssa-structalias.c, tree-ssa-tail-merge.c, tree-ssa-ter.c,
        tree-ssa-threadedge.c, tree-ssa-threadupdate.c,
        tree-ssa-uncprop.c, tree-ssa-uninit.c,
        tree-switch-conversion.c, tree-tailcall.c,
        tree-vect-data-refs.c, tree-vect-loop.c,
        tree-vect-loop-manip.c, tree-vectorizer.c,
        tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c,
        tree-vrp.c, value-prof.c, var-tracking.c, web.c: Include tree-pass.h
        only if needed.  If tree-pass.h is included, do not include timevar.h
        and dumpfile.h.  If tree-pass.h is not included but dump_file, or
        dump_flags, or the TDF_* flags are used, include dumpfile.h.
        If gimple-pretty-print.h is included, don't include tree-pretty-print.h.
        Remove assorted unnecessary includes.
        * Makefile.in: Fix dependencies.

        * config/mn10300/mn10300.c, config/c6x/c6x.c, config/ia64/ia64.c,
        config/arm/arm.c, config/bfin/bfin.c, config/frv/frv.c,
        config/spu/spu.c, config/mep/mep.c, config/i386/i386.c:
        Include dumpfile.h.
        * config/rl78/rl78.c: Include dumpfile.h instead of tree-pass.h.

c-family/
        * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
        * c-ada-spec.c: Likewise.
        * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
        * Make-lang.in: Fix dependencies.

c/
        * c-decl.c: Include dumpfile.h instead of tree-dump.h.
        * Make-lang.in: Fix dependencies.

cp/
        * dump.c (dump_stmt): Moved here from c-dump.c.
        * optimize.c: Include dumpfile.h instead of tree-dump.h.
        * class.c: Likewise.
        * decl2.c: Likewise.
        * Make-lang.in: Fix dependencies.

fortran/
        * f95-lang.c: Include dumpfile.h instead of tree-dump.h.
        * Make-lang.in: Fix dependencies.

java/
        * java-gimplify.c Include dumpfile.h instead of tree-dump.h
        * Make-lang.in: Fix dependencies.

lto/
        * lto.c: Do not include timevar.h.

[-- Attachment #2: dumpfile_h.diff --]
[-- Type: application/octet-stream, Size: 144518 bytes --]


	* system.h (dump_file): Do not define.
	* tree-pass.h: Include dumpfile.h, which is a new file containing...
	(enum tree_dump_index, TDF_*, get_dump_file_name, dump_enabled_p,
	dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p,
	dump_flag_name, dump_file, dump_flags, dump_file_name,
	get_dump_file_info, struct dump_file_info): all of this, moved to...
	* dumpfile.h: Here, new file.
	* tree-dump.h: Include dumpfile.h, but not tree-pass.h.
	(dump_stmt): Remove prototype for C++ specific function.
	(dump_enumerated_decls): Move prototype from here...
	* tree-flow.h (dump_enumerated_decls): ... to here.
	(get_ref_base_and_extent) Move prototype from here ...
	* tree.h (get_ref_base_and_extent) ... to here.
	* tree-ssa-live.c: Do not inclde tree-pretty-print.h, because
	gimple-pretty-print.h is enough.  Do not include tree-dump.h,
	include timevar.h and dumpfile.h instead.
	(struct numbered_tree_d, compare_decls_by_uid,
	dump_enumerated_decls_push, dump_enumerated_decls): Move from here ...
	* tree-dfa.c:(struct numbered_tree_d, compare_decls_by_uid,
	dump_enumerated_decls_push, dump_enumerated_decls):... to here.
	Do not include timevar.h.
	(get_ref_base_and_extent): Move from here ...
	* tree.c (get_ref_base_and_extent): ... to here.
	Do not include timevar.h.
	* tree-cfg.c: Do not include langhooks.h, tree-pretty-print.h, and
	timevar.h.
	(dump_cfg_stats): Use current_function_name.
	(gimple_cfg2vcg): Likewise.
	(dump_function_to_file): Likewise.
	* df-scan.c: Do not include tree-pass.h and timevar.h.
	Include dumpfile.h.
	(df_entry_block_bitmap_verify, df_exit_block_bitmap_verify): Do not
	use print_current_pass.
	* df-problems.c: Include dumpfile.h.
	Always define REG_DEAD_DEBUGGING, avoid #ifdef code, because it
	leads to errors in the code not selected.
	(df_note_compute): Do not print_rtl_with_bb here.  Fix compilation
	bug if REG_DEAD_DEBUGGING is not 0, get_insns is not available here.
	* lcm.c: Include dumpfile.h.
	Remove obsolete include of insn-attr.h.
	* dojump.c (do_compare_rtx_and_jump): Remove failure printing for
	missing probability notes.
	* stmt.c: Include dumpfile.h.
	(emit_case_decision_tree): Re-enable printing expand details only
	if TDF_DETAILS.
	* alias.c, auto-inc-dec.c, bb-reorder.c, caller-save.c, cfg.c, 
	cfgcleanup.c, cfgexpand.c, cfgloop.c, cfgloopmanip.c, cgraph.c, 
	cgraphclones.c, cgraphunit.c, combine.c, combine-stack-adj.c, 
	coverage.c, cprop.c, cse.c, cselib.c, dbgcnt.c, dce.c, df-core.c, 
	dse.c, dwarf2out.c, emit-rtl.c, except.c, expr.c, final.c, 
	function.c, fwprop.c, gcse.c, gimple-fold.c, 
	gimple-pretty-print.c, gimple-ssa-strength-reduction.c, 
	gimplify.c, graphite-blocking.c, graphite-clast-to-gimple.c, 
	graphite-dependences.c, graphite-interchange.c, 
	graphite-optimize-isl.c, graphite-poly.c, 
	graphite-sese-to-poly.c, haifa-sched.c, hw-doloop.c, ifcvt.c, 
	ipa.c, ipa-cp.c, ipa-inline-analysis.c, ipa-inline.c, 
	ipa-inline-transform.c, ipa-prop.c, ipa-pure-const.c, 
	ipa-reference.c, ipa-split.c, ipa-utils.c, ira.c, ira-emit.c, 
	jump.c, loop-doloop.c, loop-init.c, loop-invariant.c, loop-iv.c, 
	loop-unroll.c, loop-unswitch.c, lower-subreg.c, 
	lto-section-out.c, lto-streamer-in.c, matrix-reorg.c, mcf.c, 
	mode-switching.c, modulo-sched.c, omega.c, omp-low.c, passes.c, 
	postreload.c, postreload-gcse.c, predict.c, print-rtl.c, 
	print-tree.c, profile.c, recog.c, ree.c, regcprop.c, reginfo.c, 
	regmove.c, regrename.c, reg-stack.c, reload1.c, reorg.c, 
	sched-rgn.c, sched-vis.c, sel-sched.c, sel-sched-ir.c, 
	store-motion.c, tracer.c, trans-mem.c, tree-affine.c, 
	tree-call-cdce.c, tree-cfgcleanup.c, tree-chrec.c, 
	tree-data-ref.c, tree-diagnostic.c, tree-dump.c,
	tree-eh.c, tree-flow-inline.h, tree-if-conv.c, tree-into-ssa.c, 
	tree-mudflap.c, tree-nrv.c, tree-object-size.c, 
	tree-optimize.c, tree-outof-ssa.c, tree-predcom.c, 
	tree-pretty-print.c, tree-profile.c, tree-scalar-evolution.c, 
	tree-sra.c, tree-ssa-address.c, tree-ssa-alias.c, tree-ssa.c, 
	tree-ssa-ccp.c, tree-ssa-coalesce.c, tree-ssa-copy.c, 
	tree-ssa-copyrename.c,, tree-ssa-dce.c, tree-ssa-dom.c, 
	tree-ssa-dse.c, tree-ssa-forwprop.c, tree-ssa-ifcombine.c, 
	tree-ssa-loop.c, tree-ssa-loop-ch.c, tree-ssa-loop-im.c, 
	tree-ssa-loop-ivcanon.c, tree-ssa-loop-ivopts.c, 
	tree-ssa-loop-manip.c, tree-ssa-loop-niter.c, 
	tree-ssa-loop-prefetch.c, tree-ssa-loop-unswitch.c, 
	tree-ssa-math-opts.c, tree-ssa-operands.c, tree-ssa-phiopt.c, 
	tree-ssa-phiprop.c, tree-ssa-pre.c, tree-ssa-propagate.c, 
	tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-ssa-sink.c, 
	tree-ssa-structalias.c, tree-ssa-tail-merge.c, tree-ssa-ter.c, 
	tree-ssa-threadedge.c, tree-ssa-threadupdate.c, 
	tree-ssa-uncprop.c, tree-ssa-uninit.c, 
	tree-switch-conversion.c, tree-tailcall.c, 
	tree-vect-data-refs.c, tree-vect-loop.c, 
	tree-vect-loop-manip.c, tree-vectorizer.c, 
	tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, 
	tree-vrp.c, value-prof.c, var-tracking.c, web.c: Include tree-pass.h
	only if needed.  If tree-pass.h is included, do not include timevar.h
	and dumpfile.h.  If tree-pass.h is not included but dump_file, or
	dump_flags, or the TDF_* flags are used, include dumpfile.h.
	If gimple-pretty-print.h is included, don't include tree-pretty-print.h.
	Remove assorted unnecessary includes.
	* Makefile.in: Fix dependencies.

	* config/mn10300/mn10300.c, config/c6x/c6x.c, config/ia64/ia64.c,
	config/arm/arm.c, config/bfin/bfin.c, config/frv/frv.c,
	config/spu/spu.c, config/mep/mep.c, config/i386/i386.c:
	Include dumpfile.h.
	* config/rl78/rl78.c: Include dumpfile.h instead of tree-pass.h.

c-family/
	* c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
	* c-ada-spec.c: Likewise.
	* c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
	* Make-lang.in: Fix dependencies.

c/
	* c-decl.c: Include dumpfile.h instead of tree-dump.h.
	* Make-lang.in: Fix dependencies.

cp/
	* dump.c (dump_stmt): Moved here from c-dump.c.
	* optimize.c: Include dumpfile.h instead of tree-dump.h.
	* class.c: Likewise.
	* decl2.c: Likewise.
	* Make-lang.in: Fix dependencies.

fortran/
	* f95-lang.c: Include dumpfile.h instead of tree-dump.h.
	* Make-lang.in: Fix dependencies.

java/
	* java-gimplify.c Include dumpfile.h instead of tree-dump.h
	* Make-lang.in: Fix dependencies.

lto/
	* lto.c: Do not include timevar.h.

Index: system.h
===================================================================
--- system.h	(revision 189457)
+++ system.h	(working copy)
@@ -663,14 +663,6 @@ extern int vsnprintf(char *, size_t, const char *,
 #define __builtin_expect(a, b) (a)
 #endif
 
-/* Default file in which to dump debug output.  Here for lack of a better
-   place to put it.  This used to be defined in output.h, but that results
-   in almost all files including output.h, even if they don't output anything
-   except, maybe, something to the dump file.  */
-#ifdef BUFSIZ
-extern FILE *dump_file;
-#endif
-
 /* Redefine abort to report an internal error w/o coredump, and
    reporting the location of the error in the source file.  */
 extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
Index: tree-pass.h
===================================================================
--- tree-pass.h	(revision 189457)
+++ tree-pass.h	(working copy)
@@ -24,87 +24,8 @@ along with GCC; see the file COPYING3.  If not see
 #define GCC_TREE_PASS_H 1
 
 #include "timevar.h"
+#include "dumpfile.h"
 
-/* Different tree dump places.  When you add new tree dump places,
-   extend the DUMP_FILES array in tree-dump.c.  */
-enum tree_dump_index
-{
-  TDI_none,			/* No dump */
-  TDI_cgraph,                   /* dump function call graph.  */
-  TDI_tu,			/* dump the whole translation unit.  */
-  TDI_class,			/* dump class hierarchy.  */
-  TDI_original,			/* dump each function before optimizing it */
-  TDI_generic,			/* dump each function after genericizing it */
-  TDI_nested,			/* dump each function after unnesting it */
-  TDI_vcg,			/* create a VCG graph file for each
-				   function's flowgraph.  */
-  TDI_ada,                      /* dump declarations in Ada syntax.  */
-  TDI_tree_all,                 /* enable all the GENERIC/GIMPLE dumps.  */
-  TDI_rtl_all,                  /* enable all the RTL dumps.  */
-  TDI_ipa_all,                  /* enable all the IPA dumps.  */
-
-  TDI_end
-};
-
-/* Bit masks to control dumping. Not all values are applicable to
-   all dumps. Add new ones at the end. When you define new
-   values, extend the DUMP_OPTIONS array in tree-dump.c */
-#define TDF_ADDRESS	(1 << 0)	/* dump node addresses */
-#define TDF_SLIM	(1 << 1)	/* don't go wild following links */
-#define TDF_RAW  	(1 << 2)	/* don't unparse the function */
-#define TDF_DETAILS	(1 << 3)	/* show more detailed info about
-					   each pass */
-#define TDF_STATS	(1 << 4)	/* dump various statistics about
-					   each pass */
-#define TDF_BLOCKS	(1 << 5)	/* display basic block boundaries */
-#define TDF_VOPS	(1 << 6)	/* display virtual operands */
-#define TDF_LINENO	(1 << 7)	/* display statement line numbers */
-#define TDF_UID		(1 << 8)	/* display decl UIDs */
-
-#define TDF_TREE	(1 << 9)	/* is a tree dump */
-#define TDF_RTL		(1 << 10)	/* is a RTL dump */
-#define TDF_IPA		(1 << 11)	/* is an IPA dump */
-#define TDF_STMTADDR	(1 << 12)	/* Address of stmt.  */
-
-#define TDF_GRAPH	(1 << 13)	/* a graph dump is being emitted */
-#define TDF_MEMSYMS	(1 << 14)	/* display memory symbols in expr.
-                                           Implies TDF_VOPS.  */
-
-#define TDF_DIAGNOSTIC	(1 << 15)	/* A dump to be put in a diagnostic
-					   message.  */
-#define TDF_VERBOSE     (1 << 16)       /* A dump that uses the full tree
-					   dumper to print stmts.  */
-#define TDF_RHS_ONLY	(1 << 17)	/* a flag to only print the RHS of
-					   a gimple stmt.  */
-#define TDF_ASMNAME	(1 << 18)	/* display asm names of decls  */
-#define TDF_EH		(1 << 19)	/* display EH region number
-					   holding this gimple statement.  */
-#define TDF_NOUID	(1 << 20)	/* omit UIDs from dumps.  */
-#define TDF_ALIAS	(1 << 21)	/* display alias information  */
-#define TDF_ENUMERATE_LOCALS (1 << 22)	/* Enumerate locals by uid.  */
-#define TDF_CSELIB	(1 << 23)	/* Dump cselib details.  */
-#define TDF_SCEV	(1 << 24)	/* Dump SCEV details.  */
-
-
-/* In tree-dump.c */
-
-extern char *get_dump_file_name (int);
-extern int dump_enabled_p (int);
-extern int dump_initialized_p (int);
-extern FILE *dump_begin (int, int *);
-extern void dump_end (int, FILE *);
-extern void dump_node (const_tree, int, FILE *);
-extern int dump_switch_p (const char *);
-extern const char *dump_flag_name (int);
-
-/* Global variables used to communicate with passes.  */
-extern FILE *dump_file;
-extern int dump_flags;
-extern const char *dump_file_name;
-
-/* Return the dump_file_info for the given phase.  */
-extern struct dump_file_info *get_dump_file_info (int);
-
 /* Optimization pass type.  */
 enum opt_pass_type
 {
@@ -216,17 +137,6 @@ struct simple_ipa_opt_pass
   struct opt_pass pass;
 };
 
-/* Define a tree dump switch.  */
-struct dump_file_info
-{
-  const char *suffix;           /* suffix to give output file.  */
-  const char *swtch;            /* command line switch */
-  const char *glob;             /* command line glob  */
-  int flags;                    /* user flags */
-  int state;                    /* state of play */
-  int num;                      /* dump file number */
-};
-
 /* Pass properties.  */
 #define PROP_gimple_any		(1 << 0)	/* entire gimple grammar */
 #define PROP_gimple_lcf		(1 << 1)	/* lowered control flow */
Index: dumpfile.h
===================================================================
--- dumpfile.h	(revision 0)
+++ dumpfile.h	(revision 0)
@@ -0,0 +1,117 @@
+/* Definitions for the shared dumpfile.
+   Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+   Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
+
+
+#ifndef GCC_DUMPFILE_H
+#define GCC_DUMPFILE_H 1
+
+/* Different tree dump places.  When you add new tree dump places,
+   extend the DUMP_FILES array in tree-dump.c.  */
+enum tree_dump_index
+{
+  TDI_none,			/* No dump */
+  TDI_cgraph,                   /* dump function call graph.  */
+  TDI_tu,			/* dump the whole translation unit.  */
+  TDI_class,			/* dump class hierarchy.  */
+  TDI_original,			/* dump each function before optimizing it */
+  TDI_generic,			/* dump each function after genericizing it */
+  TDI_nested,			/* dump each function after unnesting it */
+  TDI_vcg,			/* create a VCG graph file for each
+				   function's flowgraph.  */
+  TDI_ada,                      /* dump declarations in Ada syntax.  */
+  TDI_tree_all,                 /* enable all the GENERIC/GIMPLE dumps.  */
+  TDI_rtl_all,                  /* enable all the RTL dumps.  */
+  TDI_ipa_all,                  /* enable all the IPA dumps.  */
+
+  TDI_end
+};
+
+/* Bit masks to control dumping. Not all values are applicable to
+   all dumps. Add new ones at the end. When you define new
+   values, extend the DUMP_OPTIONS array in tree-dump.c */
+#define TDF_ADDRESS	(1 << 0)	/* dump node addresses */
+#define TDF_SLIM	(1 << 1)	/* don't go wild following links */
+#define TDF_RAW  	(1 << 2)	/* don't unparse the function */
+#define TDF_DETAILS	(1 << 3)	/* show more detailed info about
+					   each pass */
+#define TDF_STATS	(1 << 4)	/* dump various statistics about
+					   each pass */
+#define TDF_BLOCKS	(1 << 5)	/* display basic block boundaries */
+#define TDF_VOPS	(1 << 6)	/* display virtual operands */
+#define TDF_LINENO	(1 << 7)	/* display statement line numbers */
+#define TDF_UID		(1 << 8)	/* display decl UIDs */
+
+#define TDF_TREE	(1 << 9)	/* is a tree dump */
+#define TDF_RTL		(1 << 10)	/* is a RTL dump */
+#define TDF_IPA		(1 << 11)	/* is an IPA dump */
+#define TDF_STMTADDR	(1 << 12)	/* Address of stmt.  */
+
+#define TDF_GRAPH	(1 << 13)	/* a graph dump is being emitted */
+#define TDF_MEMSYMS	(1 << 14)	/* display memory symbols in expr.
+                                           Implies TDF_VOPS.  */
+
+#define TDF_DIAGNOSTIC	(1 << 15)	/* A dump to be put in a diagnostic
+					   message.  */
+#define TDF_VERBOSE     (1 << 16)       /* A dump that uses the full tree
+					   dumper to print stmts.  */
+#define TDF_RHS_ONLY	(1 << 17)	/* a flag to only print the RHS of
+					   a gimple stmt.  */
+#define TDF_ASMNAME	(1 << 18)	/* display asm names of decls  */
+#define TDF_EH		(1 << 19)	/* display EH region number
+					   holding this gimple statement.  */
+#define TDF_NOUID	(1 << 20)	/* omit UIDs from dumps.  */
+#define TDF_ALIAS	(1 << 21)	/* display alias information  */
+#define TDF_ENUMERATE_LOCALS (1 << 22)	/* Enumerate locals by uid.  */
+#define TDF_CSELIB	(1 << 23)	/* Dump cselib details.  */
+#define TDF_SCEV	(1 << 24)	/* Dump SCEV details.  */
+
+
+/* In tree-dump.c */
+
+extern char *get_dump_file_name (int);
+extern int dump_enabled_p (int);
+extern int dump_initialized_p (int);
+extern FILE *dump_begin (int, int *);
+extern void dump_end (int, FILE *);
+extern void dump_node (const_tree, int, FILE *);
+extern int dump_switch_p (const char *);
+extern const char *dump_flag_name (int);
+
+/* Global variables used to communicate with passes.  */
+extern FILE *dump_file;
+extern int dump_flags;
+extern const char *dump_file_name;
+
+/* Return the dump_file_info for the given phase.  */
+extern struct dump_file_info *get_dump_file_info (int);
+
+/* Define a tree dump switch.  */
+struct dump_file_info
+{
+  const char *suffix;           /* suffix to give output file.  */
+  const char *swtch;            /* command line switch */
+  const char *glob;             /* command line glob  */
+  int flags;                    /* user flags */
+  int state;                    /* state of play */
+  int num;                      /* dump file number */
+};
+
+
+#endif /* GCC_DUMPFILE_H */
Index: tree-dump.h
===================================================================
--- tree-dump.h	(revision 189457)
+++ tree-dump.h	(working copy)
@@ -23,7 +23,7 @@ along with GCC; see the file COPYING3.  If not see
 #define GCC_TREE_DUMP_H
 
 #include "splay-tree.h"
-#include "tree-pass.h"
+#include "dumpfile.h"
 
 typedef struct dump_info *dump_info_p;
 
@@ -86,12 +86,10 @@ extern void dump_pointer (dump_info_p, const char
 extern void dump_int (dump_info_p, const char *, int);
 extern void dump_string (dump_info_p, const char *);
 extern void dump_string_field (dump_info_p, const char *, const char *);
-extern void dump_stmt (dump_info_p, const_tree);
 extern void queue_and_dump_index (dump_info_p, const char *, const_tree, int);
 extern void queue_and_dump_type (dump_info_p, const_tree);
 extern void dump_function (int, tree);
 extern void dump_function_to_file (tree, FILE *, int);
-extern void dump_enumerated_decls (FILE *, int);
 extern void debug_function (tree, int);
 extern int dump_flag (dump_info_p, int, const_tree);
 
Index: tree-flow.h
===================================================================
--- tree-flow.h	(revision 189457)
+++ tree-flow.h	(working copy)
@@ -498,10 +498,9 @@ extern tree make_rename_temp (tree, const char *);
 extern void set_default_def (tree, tree);
 extern tree gimple_default_def (struct function *, tree);
 extern bool stmt_references_abnormal_ssa_name (gimple);
-extern tree get_ref_base_and_extent (tree, HOST_WIDE_INT *,
-				     HOST_WIDE_INT *, HOST_WIDE_INT *);
 extern tree get_addr_base_and_unit_offset (tree, HOST_WIDE_INT *);
 extern void find_referenced_vars_in (gimple);
+extern void dump_enumerated_decls (FILE *, int);
 
 /* In tree-phinodes.c  */
 extern void reserve_phi_args_for_new_edge (basic_block);
Index: tree.h
===================================================================
--- tree.h	(revision 189457)
+++ tree.h	(working copy)
@@ -5531,6 +5531,8 @@ extern location_t tree_nonartificial_location (tre
 extern tree block_ultimate_origin (const_tree);
 
 extern tree get_binfo_at_offset (tree, HOST_WIDE_INT, tree);
+extern tree get_ref_base_and_extent (tree, HOST_WIDE_INT *,
+				     HOST_WIDE_INT *, HOST_WIDE_INT *);
 
 /* In tree-nested.c */
 extern tree build_addr (tree, tree);
Index: tree-ssa-live.c
===================================================================
--- tree-ssa-live.c	(revision 189457)
+++ tree-ssa-live.c	(working copy)
@@ -24,11 +24,11 @@ along with GCC; see the file COPYING3.  If not see
 #include "coretypes.h"
 #include "tm.h"
 #include "tree.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
 #include "bitmap.h"
 #include "tree-flow.h"
-#include "tree-dump.h"
+#include "timevar.h"
+#include "dumpfile.h"
 #include "tree-ssa-live.h"
 #include "diagnostic-core.h"
 #include "debug.h"
@@ -1236,95 +1236,6 @@ dump_live_info (FILE *f, tree_live_info_p live, in
     }
 }
 
-struct GTY(()) numbered_tree_d
-{
-  tree t;
-  int num;
-};
-typedef struct numbered_tree_d numbered_tree;
-
-DEF_VEC_O (numbered_tree);
-DEF_VEC_ALLOC_O (numbered_tree, heap);
-
-/* Compare two declarations references by their DECL_UID / sequence number.
-   Called via qsort.  */
-
-static int
-compare_decls_by_uid (const void *pa, const void *pb)
-{
-  const numbered_tree *nt_a = ((const numbered_tree *)pa);
-  const numbered_tree *nt_b = ((const numbered_tree *)pb);
-
-  if (DECL_UID (nt_a->t) != DECL_UID (nt_b->t))
-    return  DECL_UID (nt_a->t) - DECL_UID (nt_b->t);
-  return nt_a->num - nt_b->num;
-}
-
-/* Called via walk_gimple_stmt / walk_gimple_op by dump_enumerated_decls.  */
-static tree
-dump_enumerated_decls_push (tree *tp, int *walk_subtrees, void *data)
-{
-  struct walk_stmt_info *wi = (struct walk_stmt_info *) data;
-  VEC (numbered_tree, heap) **list = (VEC (numbered_tree, heap) **) &wi->info;
-  numbered_tree nt;
-
-  if (!DECL_P (*tp))
-    return NULL_TREE;
-  nt.t = *tp;
-  nt.num = VEC_length (numbered_tree, *list);
-  VEC_safe_push (numbered_tree, heap, *list, &nt);
-  *walk_subtrees = 0;
-  return NULL_TREE;
-}
-
-/* Find all the declarations used by the current function, sort them by uid,
-   and emit the sorted list.  Each declaration is tagged with a sequence
-   number indicating when it was found during statement / tree walking,
-   so that TDF_NOUID comparisons of anonymous declarations are still
-   meaningful.  Where a declaration was encountered more than once, we
-   emit only the sequence number of the first encounter.
-   FILE is the dump file where to output the list and FLAGS is as in
-   print_generic_expr.  */
-void
-dump_enumerated_decls (FILE *file, int flags)
-{
-  basic_block bb;
-  struct walk_stmt_info wi;
-  VEC (numbered_tree, heap) *decl_list = VEC_alloc (numbered_tree, heap, 40);
-
-  memset (&wi, '\0', sizeof (wi));
-  wi.info = (void*) decl_list;
-  FOR_EACH_BB (bb)
-    {
-      gimple_stmt_iterator gsi;
-
-      for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
-	if (!is_gimple_debug (gsi_stmt (gsi)))
-	  walk_gimple_stmt (&gsi, NULL, dump_enumerated_decls_push, &wi);
-    }
-  decl_list = (VEC (numbered_tree, heap) *) wi.info;
-  VEC_qsort (numbered_tree, decl_list, compare_decls_by_uid);
-  if (VEC_length (numbered_tree, decl_list))
-    {
-      unsigned ix;
-      numbered_tree *ntp;
-      tree last = NULL_TREE;
-
-      fprintf (file, "Declarations used by %s, sorted by DECL_UID:\n",
-	       current_function_name ());
-      FOR_EACH_VEC_ELT (numbered_tree, decl_list, ix, ntp)
-	{
-	  if (ntp->t == last)
-	    continue;
-	  fprintf (file, "%d: ", ntp->num);
-	  print_generic_decl (file, ntp->t, flags);
-	  fprintf (file, "\n");
-	  last = ntp->t;
-	}
-    }
-  VEC_free (numbered_tree, heap, decl_list);
-}
-
 #ifdef ENABLE_CHECKING
 /* Verify that SSA_VAR is a non-virtual SSA_NAME.  */
 
Index: tree-dfa.c
===================================================================
--- tree-dfa.c	(revision 189457)
+++ tree-dfa.c	(working copy)
@@ -28,13 +28,11 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "tm_p.h"
 #include "basic-block.h"
-#include "timevar.h"
 #include "ggc.h"
 #include "langhooks.h"
 #include "flags.h"
 #include "function.h"
 #include "tree-pretty-print.h"
-#include "tree-dump.h"
 #include "gimple.h"
 #include "tree-flow.h"
 #include "tree-inline.h"
@@ -605,312 +603,6 @@ remove_referenced_var (tree var)
   htab_clear_slot (gimple_referenced_vars (cfun), loc);
 }
 
-
-/* If EXP is a handled component reference for a structure, return the
-   base variable.  The access range is delimited by bit positions *POFFSET and
-   *POFFSET + *PMAX_SIZE.  The access size is *PSIZE bits.  If either
-   *PSIZE or *PMAX_SIZE is -1, they could not be determined.  If *PSIZE
-   and *PMAX_SIZE are equal, the access is non-variable.  */
-
-tree
-get_ref_base_and_extent (tree exp, HOST_WIDE_INT *poffset,
-			 HOST_WIDE_INT *psize,
-			 HOST_WIDE_INT *pmax_size)
-{
-  HOST_WIDE_INT bitsize = -1;
-  HOST_WIDE_INT maxsize = -1;
-  tree size_tree = NULL_TREE;
-  double_int bit_offset = double_int_zero;
-  HOST_WIDE_INT hbit_offset;
-  bool seen_variable_array_ref = false;
-  tree base_type;
-
-  /* First get the final access size from just the outermost expression.  */
-  if (TREE_CODE (exp) == COMPONENT_REF)
-    size_tree = DECL_SIZE (TREE_OPERAND (exp, 1));
-  else if (TREE_CODE (exp) == BIT_FIELD_REF)
-    size_tree = TREE_OPERAND (exp, 1);
-  else if (!VOID_TYPE_P (TREE_TYPE (exp)))
-    {
-      enum machine_mode mode = TYPE_MODE (TREE_TYPE (exp));
-      if (mode == BLKmode)
-	size_tree = TYPE_SIZE (TREE_TYPE (exp));
-      else
-	bitsize = GET_MODE_BITSIZE (mode);
-    }
-  if (size_tree != NULL_TREE)
-    {
-      if (! host_integerp (size_tree, 1))
-	bitsize = -1;
-      else
-	bitsize = TREE_INT_CST_LOW (size_tree);
-    }
-
-  /* Initially, maxsize is the same as the accessed element size.
-     In the following it will only grow (or become -1).  */
-  maxsize = bitsize;
-
-  /* Compute cumulative bit-offset for nested component-refs and array-refs,
-     and find the ultimate containing object.  */
-  while (1)
-    {
-      base_type = TREE_TYPE (exp);
-
-      switch (TREE_CODE (exp))
-	{
-	case BIT_FIELD_REF:
-	  bit_offset
-	    = double_int_add (bit_offset,
-			      tree_to_double_int (TREE_OPERAND (exp, 2)));
-	  break;
-
-	case COMPONENT_REF:
-	  {
-	    tree field = TREE_OPERAND (exp, 1);
-	    tree this_offset = component_ref_field_offset (exp);
-
-	    if (this_offset && TREE_CODE (this_offset) == INTEGER_CST)
-	      {
-		double_int doffset = tree_to_double_int (this_offset);
-		doffset = double_int_lshift (doffset,
-					     BITS_PER_UNIT == 8
-					     ? 3 : exact_log2 (BITS_PER_UNIT),
-					     HOST_BITS_PER_DOUBLE_INT, true);
-		doffset = double_int_add (doffset,
-					  tree_to_double_int
-					  (DECL_FIELD_BIT_OFFSET (field)));
-		bit_offset = double_int_add (bit_offset, doffset);
-
-		/* If we had seen a variable array ref already and we just
-		   referenced the last field of a struct or a union member
-		   then we have to adjust maxsize by the padding at the end
-		   of our field.  */
-		if (seen_variable_array_ref && maxsize != -1)
-		  {
-		    tree stype = TREE_TYPE (TREE_OPERAND (exp, 0));
-		    tree next = DECL_CHAIN (field);
-		    while (next && TREE_CODE (next) != FIELD_DECL)
-		      next = DECL_CHAIN (next);
-		    if (!next
-			|| TREE_CODE (stype) != RECORD_TYPE)
-		      {
-			tree fsize = DECL_SIZE_UNIT (field);
-			tree ssize = TYPE_SIZE_UNIT (stype);
-			if (host_integerp (fsize, 0)
-			    && host_integerp (ssize, 0)
-			    && double_int_fits_in_shwi_p (doffset))
-			  maxsize += ((TREE_INT_CST_LOW (ssize)
-				       - TREE_INT_CST_LOW (fsize))
-				      * BITS_PER_UNIT
-					- double_int_to_shwi (doffset));
-			else
-			  maxsize = -1;
-		      }
-		  }
-	      }
-	    else
-	      {
-		tree csize = TYPE_SIZE (TREE_TYPE (TREE_OPERAND (exp, 0)));
-		/* We need to adjust maxsize to the whole structure bitsize.
-		   But we can subtract any constant offset seen so far,
-		   because that would get us out of the structure otherwise.  */
-		if (maxsize != -1
-		    && csize
-		    && host_integerp (csize, 1)
-		    && double_int_fits_in_shwi_p (bit_offset))
-		  maxsize = TREE_INT_CST_LOW (csize)
-			    - double_int_to_shwi (bit_offset);
-		else
-		  maxsize = -1;
-	      }
-	  }
-	  break;
-
-	case ARRAY_REF:
-	case ARRAY_RANGE_REF:
-	  {
-	    tree index = TREE_OPERAND (exp, 1);
-	    tree low_bound, unit_size;
-
-	    /* If the resulting bit-offset is constant, track it.  */
-	    if (TREE_CODE (index) == INTEGER_CST
-		&& (low_bound = array_ref_low_bound (exp),
- 		    TREE_CODE (low_bound) == INTEGER_CST)
-		&& (unit_size = array_ref_element_size (exp),
-		    TREE_CODE (unit_size) == INTEGER_CST))
-	      {
-		double_int doffset
-		  = double_int_sext
-		    (double_int_sub (TREE_INT_CST (index),
-				     TREE_INT_CST (low_bound)),
-		     TYPE_PRECISION (TREE_TYPE (index)));
-		doffset = double_int_mul (doffset,
-					  tree_to_double_int (unit_size));
-		doffset = double_int_lshift (doffset,
-					     BITS_PER_UNIT == 8
-					     ? 3 : exact_log2 (BITS_PER_UNIT),
-					     HOST_BITS_PER_DOUBLE_INT, true);
-		bit_offset = double_int_add (bit_offset, doffset);
-
-		/* An array ref with a constant index up in the structure
-		   hierarchy will constrain the size of any variable array ref
-		   lower in the access hierarchy.  */
-		seen_variable_array_ref = false;
-	      }
-	    else
-	      {
-		tree asize = TYPE_SIZE (TREE_TYPE (TREE_OPERAND (exp, 0)));
-		/* We need to adjust maxsize to the whole array bitsize.
-		   But we can subtract any constant offset seen so far,
-		   because that would get us outside of the array otherwise.  */
-		if (maxsize != -1
-		    && asize
-		    && host_integerp (asize, 1)
-		    && double_int_fits_in_shwi_p (bit_offset))
-		  maxsize = TREE_INT_CST_LOW (asize)
-			    - double_int_to_shwi (bit_offset);
-		else
-		  maxsize = -1;
-
-		/* Remember that we have seen an array ref with a variable
-		   index.  */
-		seen_variable_array_ref = true;
-	      }
-	  }
-	  break;
-
-	case REALPART_EXPR:
-	  break;
-
-	case IMAGPART_EXPR:
-	  bit_offset
-	    = double_int_add (bit_offset, uhwi_to_double_int (bitsize));
-	  break;
-
-	case VIEW_CONVERT_EXPR:
-	  break;
-
-	case MEM_REF:
-	  /* Hand back the decl for MEM[&decl, off].  */
-	  if (TREE_CODE (TREE_OPERAND (exp, 0)) == ADDR_EXPR)
-	    {
-	      if (integer_zerop (TREE_OPERAND (exp, 1)))
-		exp = TREE_OPERAND (TREE_OPERAND (exp, 0), 0);
-	      else
-		{
-		  double_int off = mem_ref_offset (exp);
-		  off = double_int_lshift (off,
-					   BITS_PER_UNIT == 8
-					   ? 3 : exact_log2 (BITS_PER_UNIT),
-					   HOST_BITS_PER_DOUBLE_INT, true);
-		  off = double_int_add (off, bit_offset);
-		  if (double_int_fits_in_shwi_p (off))
-		    {
-		      bit_offset = off;
-		      exp = TREE_OPERAND (TREE_OPERAND (exp, 0), 0);
-		    }
-		}
-	    }
-	  goto done;
-
-	case TARGET_MEM_REF:
-	  /* Hand back the decl for MEM[&decl, off].  */
-	  if (TREE_CODE (TMR_BASE (exp)) == ADDR_EXPR)
-	    {
-	      /* Via the variable index or index2 we can reach the
-		 whole object.  */
-	      if (TMR_INDEX (exp) || TMR_INDEX2 (exp))
-		{
-		  exp = TREE_OPERAND (TMR_BASE (exp), 0);
-		  bit_offset = double_int_zero;
-		  maxsize = -1;
-		  goto done;
-		}
-	      if (integer_zerop (TMR_OFFSET (exp)))
-		exp = TREE_OPERAND (TMR_BASE (exp), 0);
-	      else
-		{
-		  double_int off = mem_ref_offset (exp);
-		  off = double_int_lshift (off,
-					   BITS_PER_UNIT == 8
-					   ? 3 : exact_log2 (BITS_PER_UNIT),
-					   HOST_BITS_PER_DOUBLE_INT, true);
-		  off = double_int_add (off, bit_offset);
-		  if (double_int_fits_in_shwi_p (off))
-		    {
-		      bit_offset = off;
-		      exp = TREE_OPERAND (TMR_BASE (exp), 0);
-		    }
-		}
-	    }
-	  goto done;
-
-	default:
-	  goto done;
-	}
-
-      exp = TREE_OPERAND (exp, 0);
-    }
- done:
-
-  if (!double_int_fits_in_shwi_p (bit_offset))
-    {
-      *poffset = 0;
-      *psize = bitsize;
-      *pmax_size = -1;
-
-      return exp;
-    }
-
-  hbit_offset = double_int_to_shwi (bit_offset);
-
-  /* We need to deal with variable arrays ending structures such as
-       struct { int length; int a[1]; } x;           x.a[d]
-       struct { struct { int a; int b; } a[1]; } x;  x.a[d].a
-       struct { struct { int a[1]; } a[1]; } x;      x.a[0][d], x.a[d][0]
-       struct { int len; union { int a[1]; struct X x; } u; } x; x.u.a[d]
-     where we do not know maxsize for variable index accesses to
-     the array.  The simplest way to conservatively deal with this
-     is to punt in the case that offset + maxsize reaches the
-     base type boundary.  This needs to include possible trailing padding
-     that is there for alignment purposes.  */
-
-  if (seen_variable_array_ref
-      && maxsize != -1
-      && (!host_integerp (TYPE_SIZE (base_type), 1)
-	  || (hbit_offset + maxsize
-	      == (signed) TREE_INT_CST_LOW (TYPE_SIZE (base_type)))))
-    maxsize = -1;
-
-  /* In case of a decl or constant base object we can do better.  */
-
-  if (DECL_P (exp))
-    {
-      /* If maxsize is unknown adjust it according to the size of the
-         base decl.  */
-      if (maxsize == -1
-	  && host_integerp (DECL_SIZE (exp), 1))
-	maxsize = TREE_INT_CST_LOW (DECL_SIZE (exp)) - hbit_offset;
-    }
-  else if (CONSTANT_CLASS_P (exp))
-    {
-      /* If maxsize is unknown adjust it according to the size of the
-         base type constant.  */
-      if (maxsize == -1
-	  && host_integerp (TYPE_SIZE (TREE_TYPE (exp)), 1))
-	maxsize = TREE_INT_CST_LOW (TYPE_SIZE (TREE_TYPE (exp))) - hbit_offset;
-    }
-
-  /* ???  Due to negative offsets in ARRAY_REF we can end up with
-     negative bit_offset here.  We might want to store a zero offset
-     in this case.  */
-  *poffset = hbit_offset;
-  *psize = bitsize;
-  *pmax_size = maxsize;
-
-  return exp;
-}
-
 /* Returns the base object and a constant BITS_PER_UNIT offset in *POFFSET that
    denotes the starting address of the memory access EXP.
    Returns NULL_TREE if the offset is not constant or any component
@@ -939,3 +631,94 @@ stmt_references_abnormal_ssa_name (gimple stmt)
 
   return false;
 }
+
+/* Pair of tree and a sorting index, for dump_enumerated_decls.  */
+struct GTY(()) numbered_tree_d
+{
+  tree t;
+  int num;
+};
+typedef struct numbered_tree_d numbered_tree;
+
+DEF_VEC_O (numbered_tree);
+DEF_VEC_ALLOC_O (numbered_tree, heap);
+
+/* Compare two declarations references by their DECL_UID / sequence number.
+   Called via qsort.  */
+
+static int
+compare_decls_by_uid (const void *pa, const void *pb)
+{
+  const numbered_tree *nt_a = ((const numbered_tree *)pa);
+  const numbered_tree *nt_b = ((const numbered_tree *)pb);
+
+  if (DECL_UID (nt_a->t) != DECL_UID (nt_b->t))
+    return  DECL_UID (nt_a->t) - DECL_UID (nt_b->t);
+  return nt_a->num - nt_b->num;
+}
+
+/* Called via walk_gimple_stmt / walk_gimple_op by dump_enumerated_decls.  */
+static tree
+dump_enumerated_decls_push (tree *tp, int *walk_subtrees, void *data)
+{
+  struct walk_stmt_info *wi = (struct walk_stmt_info *) data;
+  VEC (numbered_tree, heap) **list = (VEC (numbered_tree, heap) **) &wi->info;
+  numbered_tree nt;
+
+  if (!DECL_P (*tp))
+    return NULL_TREE;
+  nt.t = *tp;
+  nt.num = VEC_length (numbered_tree, *list);
+  VEC_safe_push (numbered_tree, heap, *list, &nt);
+  *walk_subtrees = 0;
+  return NULL_TREE;
+}
+
+/* Find all the declarations used by the current function, sort them by uid,
+   and emit the sorted list.  Each declaration is tagged with a sequence
+   number indicating when it was found during statement / tree walking,
+   so that TDF_NOUID comparisons of anonymous declarations are still
+   meaningful.  Where a declaration was encountered more than once, we
+   emit only the sequence number of the first encounter.
+   FILE is the dump file where to output the list and FLAGS is as in
+   print_generic_expr.  */
+void
+dump_enumerated_decls (FILE *file, int flags)
+{
+  basic_block bb;
+  struct walk_stmt_info wi;
+  VEC (numbered_tree, heap) *decl_list = VEC_alloc (numbered_tree, heap, 40);
+
+  memset (&wi, '\0', sizeof (wi));
+  wi.info = (void*) decl_list;
+  FOR_EACH_BB (bb)
+    {
+      gimple_stmt_iterator gsi;
+
+      for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
+	if (!is_gimple_debug (gsi_stmt (gsi)))
+	  walk_gimple_stmt (&gsi, NULL, dump_enumerated_decls_push, &wi);
+    }
+  decl_list = (VEC (numbered_tree, heap) *) wi.info;
+  VEC_qsort (numbered_tree, decl_list, compare_decls_by_uid);
+  if (VEC_length (numbered_tree, decl_list))
+    {
+      unsigned ix;
+      numbered_tree *ntp;
+      tree last = NULL_TREE;
+
+      fprintf (file, "Declarations used by %s, sorted by DECL_UID:\n",
+	       current_function_name ());
+      FOR_EACH_VEC_ELT (numbered_tree, decl_list, ix, ntp)
+	{
+	  if (ntp->t == last)
+	    continue;
+	  fprintf (file, "%d: ", ntp->num);
+	  print_generic_decl (file, ntp->t, flags);
+	  fprintf (file, "\n");
+	  last = ntp->t;
+	}
+    }
+  VEC_free (numbered_tree, heap, decl_list);
+}
+
Index: tree.c
===================================================================
--- tree.c	(revision 189457)
+++ tree.c	(working copy)
@@ -58,7 +58,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-diagnostic.h"
 #include "tree-pretty-print.h"
 #include "cgraph.h"
-#include "timevar.h"
 #include "except.h"
 #include "debug.h"
 #include "intl.h"
@@ -11419,6 +11418,312 @@ get_binfo_at_offset (tree binfo, HOST_WIDE_INT off
     }
 }
 
+/* If EXP is a handled component reference for a structure, return the
+   base variable.  The access range is delimited by bit positions *POFFSET and
+   *POFFSET + *PMAX_SIZE.  The access size is *PSIZE bits.  If either
+   *PSIZE or *PMAX_SIZE is -1, they could not be determined.  If *PSIZE
+   and *PMAX_SIZE are equal, the access is non-variable.  */
+
+tree
+get_ref_base_and_extent (tree exp, HOST_WIDE_INT *poffset,
+			 HOST_WIDE_INT *psize,
+			 HOST_WIDE_INT *pmax_size)
+{
+  HOST_WIDE_INT bitsize = -1;
+  HOST_WIDE_INT maxsize = -1;
+  tree size_tree = NULL_TREE;
+  double_int bit_offset = double_int_zero;
+  HOST_WIDE_INT hbit_offset;
+  bool seen_variable_array_ref = false;
+  tree base_type;
+
+  /* First get the final access size from just the outermost expression.  */
+  if (TREE_CODE (exp) == COMPONENT_REF)
+    size_tree = DECL_SIZE (TREE_OPERAND (exp, 1));
+  else if (TREE_CODE (exp) == BIT_FIELD_REF)
+    size_tree = TREE_OPERAND (exp, 1);
+  else if (!VOID_TYPE_P (TREE_TYPE (exp)))
+    {
+      enum machine_mode mode = TYPE_MODE (TREE_TYPE (exp));
+      if (mode == BLKmode)
+	size_tree = TYPE_SIZE (TREE_TYPE (exp));
+      else
+	bitsize = GET_MODE_BITSIZE (mode);
+    }
+  if (size_tree != NULL_TREE)
+    {
+      if (! host_integerp (size_tree, 1))
+	bitsize = -1;
+      else
+	bitsize = TREE_INT_CST_LOW (size_tree);
+    }
+
+  /* Initially, maxsize is the same as the accessed element size.
+     In the following it will only grow (or become -1).  */
+  maxsize = bitsize;
+
+  /* Compute cumulative bit-offset for nested component-refs and array-refs,
+     and find the ultimate containing object.  */
+  while (1)
+    {
+      base_type = TREE_TYPE (exp);
+
+      switch (TREE_CODE (exp))
+	{
+	case BIT_FIELD_REF:
+	  bit_offset
+	    = double_int_add (bit_offset,
+			      tree_to_double_int (TREE_OPERAND (exp, 2)));
+	  break;
+
+	case COMPONENT_REF:
+	  {
+	    tree field = TREE_OPERAND (exp, 1);
+	    tree this_offset = component_ref_field_offset (exp);
+
+	    if (this_offset && TREE_CODE (this_offset) == INTEGER_CST)
+	      {
+		double_int doffset = tree_to_double_int (this_offset);
+		doffset = double_int_lshift (doffset,
+					     BITS_PER_UNIT == 8
+					     ? 3 : exact_log2 (BITS_PER_UNIT),
+					     HOST_BITS_PER_DOUBLE_INT, true);
+		doffset = double_int_add (doffset,
+					  tree_to_double_int
+					  (DECL_FIELD_BIT_OFFSET (field)));
+		bit_offset = double_int_add (bit_offset, doffset);
+
+		/* If we had seen a variable array ref already and we just
+		   referenced the last field of a struct or a union member
+		   then we have to adjust maxsize by the padding at the end
+		   of our field.  */
+		if (seen_variable_array_ref && maxsize != -1)
+		  {
+		    tree stype = TREE_TYPE (TREE_OPERAND (exp, 0));
+		    tree next = DECL_CHAIN (field);
+		    while (next && TREE_CODE (next) != FIELD_DECL)
+		      next = DECL_CHAIN (next);
+		    if (!next
+			|| TREE_CODE (stype) != RECORD_TYPE)
+		      {
+			tree fsize = DECL_SIZE_UNIT (field);
+			tree ssize = TYPE_SIZE_UNIT (stype);
+			if (host_integerp (fsize, 0)
+			    && host_integerp (ssize, 0)
+			    && double_int_fits_in_shwi_p (doffset))
+			  maxsize += ((TREE_INT_CST_LOW (ssize)
+				       - TREE_INT_CST_LOW (fsize))
+				      * BITS_PER_UNIT
+					- double_int_to_shwi (doffset));
+			else
+			  maxsize = -1;
+		      }
+		  }
+	      }
+	    else
+	      {
+		tree csize = TYPE_SIZE (TREE_TYPE (TREE_OPERAND (exp, 0)));
+		/* We need to adjust maxsize to the whole structure bitsize.
+		   But we can subtract any constant offset seen so far,
+		   because that would get us out of the structure otherwise.  */
+		if (maxsize != -1
+		    && csize
+		    && host_integerp (csize, 1)
+		    && double_int_fits_in_shwi_p (bit_offset))
+		  maxsize = TREE_INT_CST_LOW (csize)
+			    - double_int_to_shwi (bit_offset);
+		else
+		  maxsize = -1;
+	      }
+	  }
+	  break;
+
+	case ARRAY_REF:
+	case ARRAY_RANGE_REF:
+	  {
+	    tree index = TREE_OPERAND (exp, 1);
+	    tree low_bound, unit_size;
+
+	    /* If the resulting bit-offset is constant, track it.  */
+	    if (TREE_CODE (index) == INTEGER_CST
+		&& (low_bound = array_ref_low_bound (exp),
+ 		    TREE_CODE (low_bound) == INTEGER_CST)
+		&& (unit_size = array_ref_element_size (exp),
+		    TREE_CODE (unit_size) == INTEGER_CST))
+	      {
+		double_int doffset
+		  = double_int_sext
+		    (double_int_sub (TREE_INT_CST (index),
+				     TREE_INT_CST (low_bound)),
+		     TYPE_PRECISION (TREE_TYPE (index)));
+		doffset = double_int_mul (doffset,
+					  tree_to_double_int (unit_size));
+		doffset = double_int_lshift (doffset,
+					     BITS_PER_UNIT == 8
+					     ? 3 : exact_log2 (BITS_PER_UNIT),
+					     HOST_BITS_PER_DOUBLE_INT, true);
+		bit_offset = double_int_add (bit_offset, doffset);
+
+		/* An array ref with a constant index up in the structure
+		   hierarchy will constrain the size of any variable array ref
+		   lower in the access hierarchy.  */
+		seen_variable_array_ref = false;
+	      }
+	    else
+	      {
+		tree asize = TYPE_SIZE (TREE_TYPE (TREE_OPERAND (exp, 0)));
+		/* We need to adjust maxsize to the whole array bitsize.
+		   But we can subtract any constant offset seen so far,
+		   because that would get us outside of the array otherwise.  */
+		if (maxsize != -1
+		    && asize
+		    && host_integerp (asize, 1)
+		    && double_int_fits_in_shwi_p (bit_offset))
+		  maxsize = TREE_INT_CST_LOW (asize)
+			    - double_int_to_shwi (bit_offset);
+		else
+		  maxsize = -1;
+
+		/* Remember that we have seen an array ref with a variable
+		   index.  */
+		seen_variable_array_ref = true;
+	      }
+	  }
+	  break;
+
+	case REALPART_EXPR:
+	  break;
+
+	case IMAGPART_EXPR:
+	  bit_offset
+	    = double_int_add (bit_offset, uhwi_to_double_int (bitsize));
+	  break;
+
+	case VIEW_CONVERT_EXPR:
+	  break;
+
+	case MEM_REF:
+	  /* Hand back the decl for MEM[&decl, off].  */
+	  if (TREE_CODE (TREE_OPERAND (exp, 0)) == ADDR_EXPR)
+	    {
+	      if (integer_zerop (TREE_OPERAND (exp, 1)))
+		exp = TREE_OPERAND (TREE_OPERAND (exp, 0), 0);
+	      else
+		{
+		  double_int off = mem_ref_offset (exp);
+		  off = double_int_lshift (off,
+					   BITS_PER_UNIT == 8
+					   ? 3 : exact_log2 (BITS_PER_UNIT),
+					   HOST_BITS_PER_DOUBLE_INT, true);
+		  off = double_int_add (off, bit_offset);
+		  if (double_int_fits_in_shwi_p (off))
+		    {
+		      bit_offset = off;
+		      exp = TREE_OPERAND (TREE_OPERAND (exp, 0), 0);
+		    }
+		}
+	    }
+	  goto done;
+
+	case TARGET_MEM_REF:
+	  /* Hand back the decl for MEM[&decl, off].  */
+	  if (TREE_CODE (TMR_BASE (exp)) == ADDR_EXPR)
+	    {
+	      /* Via the variable index or index2 we can reach the
+		 whole object.  */
+	      if (TMR_INDEX (exp) || TMR_INDEX2 (exp))
+		{
+		  exp = TREE_OPERAND (TMR_BASE (exp), 0);
+		  bit_offset = double_int_zero;
+		  maxsize = -1;
+		  goto done;
+		}
+	      if (integer_zerop (TMR_OFFSET (exp)))
+		exp = TREE_OPERAND (TMR_BASE (exp), 0);
+	      else
+		{
+		  double_int off = mem_ref_offset (exp);
+		  off = double_int_lshift (off,
+					   BITS_PER_UNIT == 8
+					   ? 3 : exact_log2 (BITS_PER_UNIT),
+					   HOST_BITS_PER_DOUBLE_INT, true);
+		  off = double_int_add (off, bit_offset);
+		  if (double_int_fits_in_shwi_p (off))
+		    {
+		      bit_offset = off;
+		      exp = TREE_OPERAND (TMR_BASE (exp), 0);
+		    }
+		}
+	    }
+	  goto done;
+
+	default:
+	  goto done;
+	}
+
+      exp = TREE_OPERAND (exp, 0);
+    }
+ done:
+
+  if (!double_int_fits_in_shwi_p (bit_offset))
+    {
+      *poffset = 0;
+      *psize = bitsize;
+      *pmax_size = -1;
+
+      return exp;
+    }
+
+  hbit_offset = double_int_to_shwi (bit_offset);
+
+  /* We need to deal with variable arrays ending structures such as
+       struct { int length; int a[1]; } x;           x.a[d]
+       struct { struct { int a; int b; } a[1]; } x;  x.a[d].a
+       struct { struct { int a[1]; } a[1]; } x;      x.a[0][d], x.a[d][0]
+       struct { int len; union { int a[1]; struct X x; } u; } x; x.u.a[d]
+     where we do not know maxsize for variable index accesses to
+     the array.  The simplest way to conservatively deal with this
+     is to punt in the case that offset + maxsize reaches the
+     base type boundary.  This needs to include possible trailing padding
+     that is there for alignment purposes.  */
+
+  if (seen_variable_array_ref
+      && maxsize != -1
+      && (!host_integerp (TYPE_SIZE (base_type), 1)
+	  || (hbit_offset + maxsize
+	      == (signed) TREE_INT_CST_LOW (TYPE_SIZE (base_type)))))
+    maxsize = -1;
+
+  /* In case of a decl or constant base object we can do better.  */
+
+  if (DECL_P (exp))
+    {
+      /* If maxsize is unknown adjust it according to the size of the
+         base decl.  */
+      if (maxsize == -1
+	  && host_integerp (DECL_SIZE (exp), 1))
+	maxsize = TREE_INT_CST_LOW (DECL_SIZE (exp)) - hbit_offset;
+    }
+  else if (CONSTANT_CLASS_P (exp))
+    {
+      /* If maxsize is unknown adjust it according to the size of the
+         base type constant.  */
+      if (maxsize == -1
+	  && host_integerp (TYPE_SIZE (TREE_TYPE (exp)), 1))
+	maxsize = TREE_INT_CST_LOW (TYPE_SIZE (TREE_TYPE (exp))) - hbit_offset;
+    }
+
+  /* ???  Due to negative offsets in ARRAY_REF we can end up with
+     negative bit_offset here.  We might want to store a zero offset
+     in this case.  */
+  *poffset = hbit_offset;
+  *psize = bitsize;
+  *pmax_size = maxsize;
+
+  return exp;
+}
+
+
 /* Returns true if X is a typedef decl.  */
 
 bool
Index: tree-cfg.c
===================================================================
--- tree-cfg.c	(revision 189457)
+++ tree-cfg.c	(working copy)
@@ -29,11 +29,8 @@ along with GCC; see the file COPYING3.  If not see
 #include "flags.h"
 #include "function.h"
 #include "ggc.h"
-#include "langhooks.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
 #include "tree-flow.h"
-#include "timevar.h"
 #include "tree-dump.h"
 #include "tree-pass.h"
 #include "diagnostic-core.h"
@@ -2130,10 +2127,8 @@ dump_cfg_stats (FILE *file)
   const char * const fmt_str_1 = "%-30s%13d%11lu%c\n";
   const char * const fmt_str_2 = "%-30s%13ld%11lu%c\n";
   const char * const fmt_str_3 = "%-43s%11lu%c\n";
-  const char *funcname
-    = lang_hooks.decl_printable_name (current_function_decl, 2);
+  const char *funcname = current_function_name ();
 
-
   fprintf (file, "\nCFG Statistics for %s\n\n", funcname);
 
   fprintf (file, "---------------------------------------------------------\n");
@@ -2187,8 +2182,7 @@ gimple_cfg2vcg (FILE *file)
   edge e;
   edge_iterator ei;
   basic_block bb;
-  const char *funcname
-    = lang_hooks.decl_printable_name (current_function_decl, 2);
+  const char *funcname = current_function_name ();
 
   /* Write the file header.  */
   fprintf (file, "graph: { title: \"%s\"\n", funcname);
@@ -6641,7 +6635,7 @@ dump_function_to_file (tree fn, FILE *file, int fl
   tree chain;
   bool tmclone = TREE_CODE (fn) == FUNCTION_DECL && decl_is_tm_clone (fn);
 
-  fprintf (file, "%s %s(", lang_hooks.decl_printable_name (fn, 2),
+  fprintf (file, "%s %s(", current_function_name (),
 	   tmclone ? "[tm-clone] " : "");
 
   arg = DECL_ARGUMENTS (fn);
Index: df-scan.c
===================================================================
--- df-scan.c	(revision 189457)
+++ df-scan.c	(working copy)
@@ -38,12 +38,11 @@ along with GCC; see the file COPYING3.  If not see
 #include "basic-block.h"
 #include "sbitmap.h"
 #include "bitmap.h"
-#include "timevar.h"
+#include "dumpfile.h"
 #include "tree.h"
 #include "target.h"
 #include "target-def.h"
 #include "df.h"
-#include "tree-pass.h"
 #include "emit-rtl.h"  /* FIXME: Can go away once crtl is moved to rtl.h.  */
 
 DEF_VEC_P(df_ref);
@@ -4478,7 +4477,6 @@ df_entry_block_bitmap_verify (bool abort_if_fail)
 
   if (!is_eq && abort_if_fail)
     {
-      print_current_pass (stderr);
       fprintf (stderr, "entry_block_defs = ");
       df_print_regset (stderr, &entry_block_defs);
       fprintf (stderr, "df->entry_block_defs = ");
@@ -4508,7 +4506,6 @@ df_exit_block_bitmap_verify (bool abort_if_fail)
 
   if (!is_eq && abort_if_fail)
     {
-      print_current_pass (stderr);
       fprintf (stderr, "exit_block_uses = ");
       df_print_regset (stderr, &exit_block_uses);
       fprintf (stderr, "df->exit_block_uses = ");
Index: df-problems.c
===================================================================
--- df-problems.c	(revision 189457)
+++ df-problems.c	(working copy)
@@ -44,13 +44,12 @@ along with GCC; see the file COPYING3.  If not see
 #include "except.h"
 #include "dce.h"
 #include "vecprim.h"
+#include "dumpfile.h"
 
 /* Note that turning REG_DEAD_DEBUGGING on will cause
    gcc.c-torture/unsorted/dump-noaddr.c to fail because it prints
    addresses in the dumps.  */
-#if 0
-#define REG_DEAD_DEBUGGING
-#endif
+#define REG_DEAD_DEBUGGING 0
 
 #define DF_SPARSE_THRESHOLD 32
 
@@ -2712,7 +2711,7 @@ df_note_alloc (bitmap all_blocks ATTRIBUTE_UNUSED)
   df_note->optional_p = true;
 }
 
-#ifdef REG_DEAD_DEBUGGING
+/* This is only used if REG_DEAD_DEBUGGING is in effect.  */
 static void
 df_print_note (const char *prefix, rtx insn, rtx note)
 {
@@ -2723,7 +2722,6 @@ df_print_note (const char *prefix, rtx insn, rtx n
       fprintf (dump_file, "\n");
     }
 }
-#endif
 
 
 /* After reg-stack, the x86 floating point stack regs are difficult to
@@ -2772,9 +2770,8 @@ df_kill_notes (rtx insn, bitmap live)
 	  else
 	    {
 	      rtx next = XEXP (link, 1);
-#ifdef REG_DEAD_DEBUGGING
-	      df_print_note ("deleting: ", insn, link);
-#endif
+	      if (REG_DEAD_DEBUGGING)
+		df_print_note ("deleting: ", insn, link);
 	      free_EXPR_LIST_node (link);
 	      *pprev = link = next;
 	    }
@@ -2791,9 +2788,8 @@ df_kill_notes (rtx insn, bitmap live)
 	  else
 	    {
 	      rtx next = XEXP (link, 1);
-#ifdef REG_DEAD_DEBUGGING
-	      df_print_note ("deleting: ", insn, link);
-#endif
+	      if (REG_DEAD_DEBUGGING)
+		df_print_note ("deleting: ", insn, link);
 	      free_EXPR_LIST_node (link);
 	      *pprev = link = next;
 	    }
@@ -2825,9 +2821,8 @@ df_kill_notes (rtx insn, bitmap live)
 	    if (deleted)
 	      {
 		rtx next;
-#ifdef REG_DEAD_DEBUGGING
-		df_print_note ("deleting: ", insn, link);
-#endif
+		if (REG_DEAD_DEBUGGING)
+		  df_print_note ("deleting: ", insn, link);
 		next = XEXP (link, 1);
 		free_EXPR_LIST_node (link);
 		*pprev = link = next;
@@ -2900,11 +2895,9 @@ df_set_unused_notes_for_mw (rtx insn, struct df_mw
 {
   unsigned int r;
 
-#ifdef REG_DEAD_DEBUGGING
-  if (dump_file)
+  if (REG_DEAD_DEBUGGING && dump_file)
     fprintf (dump_file, "mw_set_unused looking at mws[%d..%d]\n",
 	     mws->start_regno, mws->end_regno);
-#endif
 
   if (df_whole_mw_reg_unused_p (mws, live, artificial_uses))
     {
@@ -2912,9 +2905,9 @@ df_set_unused_notes_for_mw (rtx insn, struct df_mw
       df_set_note (REG_UNUSED, insn, mws->mw_reg);
       dead_debug_insert_temp (debug, regno, insn, DEBUG_TEMP_AFTER_WITH_REG);
 
-#ifdef REG_DEAD_DEBUGGING
-      df_print_note ("adding 1: ", insn, REG_NOTES (insn));
-#endif
+      if (REG_DEAD_DEBUGGING)
+	df_print_note ("adding 1: ", insn, REG_NOTES (insn));
+
       bitmap_set_bit (do_not_gen, regno);
       /* Only do this if the value is totally dead.  */
     }
@@ -2926,9 +2919,8 @@ df_set_unused_notes_for_mw (rtx insn, struct df_mw
 	  {
 	    df_set_note (REG_UNUSED, insn, regno_reg_rtx[r]);
 	    dead_debug_insert_temp (debug, r, insn, DEBUG_TEMP_AFTER_WITH_REG);
-#ifdef REG_DEAD_DEBUGGING
-	    df_print_note ("adding 2: ", insn, REG_NOTES (insn));
-#endif
+	    if (REG_DEAD_DEBUGGING)
+	      df_print_note ("adding 2: ", insn, REG_NOTES (insn));
 	  }
 	bitmap_set_bit (do_not_gen, r);
       }
@@ -2978,8 +2970,7 @@ df_set_dead_notes_for_mw (rtx insn, struct df_mw_h
 
   *added_notes_p = false;
 
-#ifdef REG_DEAD_DEBUGGING
-  if (dump_file)
+  if (REG_DEAD_DEBUGGING && dump_file)
     {
       fprintf (dump_file, "mw_set_dead looking at mws[%d..%d]\n  do_not_gen =",
 	       mws->start_regno, mws->end_regno);
@@ -2989,7 +2980,6 @@ df_set_dead_notes_for_mw (rtx insn, struct df_mw_h
       fprintf (dump_file, "  artificial uses =");
       df_print_regset (dump_file, artificial_uses);
     }
-#endif
 
   if (df_whole_mw_reg_dead_p (mws, live, artificial_uses, do_not_gen))
     {
@@ -3000,9 +2990,8 @@ df_set_dead_notes_for_mw (rtx insn, struct df_mw_h
 	}
       /* Add a dead note for the entire multi word register.  */
       df_set_note (REG_DEAD, insn, mws->mw_reg);
-#ifdef REG_DEAD_DEBUGGING
-      df_print_note ("adding 1: ", insn, REG_NOTES (insn));
-#endif
+      if (REG_DEAD_DEBUGGING)
+	df_print_note ("adding 1: ", insn, REG_NOTES (insn));
     }
   else
     {
@@ -3017,9 +3006,8 @@ df_set_dead_notes_for_mw (rtx insn, struct df_mw_h
 		return;
 	      }
 	    df_set_note (REG_DEAD, insn, regno_reg_rtx[r]);
-#ifdef REG_DEAD_DEBUGGING
-	    df_print_note ("adding 2: ", insn, REG_NOTES (insn));
-#endif
+	    if (REG_DEAD_DEBUGGING)
+	      df_print_note ("adding 2: ", insn, REG_NOTES (insn));
 	  }
     }
   return;
@@ -3036,13 +3024,11 @@ df_create_unused_note (rtx insn, df_ref def,
 {
   unsigned int dregno = DF_REF_REGNO (def);
 
-#ifdef REG_DEAD_DEBUGGING
-  if (dump_file)
+  if (REG_DEAD_DEBUGGING && dump_file)
     {
       fprintf (dump_file, "  regular looking at def ");
       df_ref_debug (def, dump_file);
     }
-#endif
 
   if (!((DF_REF_FLAGS (def) & DF_REF_MW_HARDREG)
 	|| bitmap_bit_p (live, dregno)
@@ -3053,9 +3039,8 @@ df_create_unused_note (rtx insn, df_ref def,
                 ? *DF_REF_REAL_LOC (def): DF_REF_REG (def);
       df_set_note (REG_UNUSED, insn, reg);
       dead_debug_insert_temp (debug, dregno, insn, DEBUG_TEMP_AFTER_WITH_REG);
-#ifdef REG_DEAD_DEBUGGING
-      df_print_note ("adding 3: ", insn, REG_NOTES (insn));
-#endif
+      if (REG_DEAD_DEBUGGING)
+	df_print_note ("adding 3: ", insn, REG_NOTES (insn));
     }
 
   return;
@@ -3387,23 +3372,20 @@ df_note_bb_compute (unsigned int bb_index,
   bitmap_copy (live, df_get_live_out (bb));
   bitmap_clear (artificial_uses);
 
-#ifdef REG_DEAD_DEBUGGING
-  if (dump_file)
+  if (REG_DEAD_DEBUGGING && dump_file)
     {
       fprintf (dump_file, "live at bottom ");
       df_print_regset (dump_file, live);
     }
-#endif
 
   /* Process the artificial defs and uses at the bottom of the block
      to begin processing.  */
   for (def_rec = df_get_artificial_defs (bb_index); *def_rec; def_rec++)
     {
       df_ref def = *def_rec;
-#ifdef REG_DEAD_DEBUGGING
-      if (dump_file)
+
+      if (REG_DEAD_DEBUGGING && dump_file)
 	fprintf (dump_file, "artificial def %d\n", DF_REF_REGNO (def));
-#endif
 
       if ((DF_REF_FLAGS (def) & DF_REF_AT_TOP) == 0)
 	bitmap_clear_bit (live, DF_REF_REGNO (def));
@@ -3423,13 +3405,11 @@ df_note_bb_compute (unsigned int bb_index,
 	}
     }
 
-#ifdef REG_DEAD_DEBUGGING
-  if (dump_file)
+  if (REG_DEAD_DEBUGGING && dump_file)
     {
       fprintf (dump_file, "live before artificials out ");
       df_print_regset (dump_file, live);
     }
-#endif
 
   FOR_BB_INSNS_REVERSE (bb, insn)
     {
@@ -3448,13 +3428,12 @@ df_note_bb_compute (unsigned int bb_index,
       /* Process the defs.  */
       if (CALL_P (insn))
 	{
-#ifdef REG_DEAD_DEBUGGING
-	  if (dump_file)
+	  if (REG_DEAD_DEBUGGING && dump_file)
 	    {
 	      fprintf (dump_file, "processing call %d\n  live =", INSN_UID (insn));
 	      df_print_regset (dump_file, live);
 	    }
-#endif
+
 	  /* We only care about real sets for calls.  Clobbers cannot
 	     be depended on to really die.  */
 	  mws_rec = DF_INSN_UID_MWS (uid);
@@ -3541,13 +3520,12 @@ df_note_bb_compute (unsigned int bb_index,
 	  df_ref use = *use_rec;
 	  unsigned int uregno = DF_REF_REGNO (use);
 
-#ifdef REG_DEAD_DEBUGGING
-	  if (dump_file && !debug_insn)
+	  if (REG_DEAD_DEBUGGING && dump_file && !debug_insn)
 	    {
 	      fprintf (dump_file, "  regular looking at use ");
 	      df_ref_debug (use, dump_file);
 	    }
-#endif
+
 	  if (!bitmap_bit_p (live, uregno))
 	    {
 	      if (debug_insn)
@@ -3578,9 +3556,8 @@ df_note_bb_compute (unsigned int bb_index,
                             ? *DF_REF_REAL_LOC (use) : DF_REF_REG (use);
 		  df_set_note (REG_DEAD, insn, reg);
 
-#ifdef REG_DEAD_DEBUGGING
-		  df_print_note ("adding 4: ", insn, REG_NOTES (insn));
-#endif
+		  if (REG_DEAD_DEBUGGING)
+		    df_print_note ("adding 4: ", insn, REG_NOTES (insn));
 		}
 	      /* This register is now live.  */
 	      bitmap_set_bit (live, uregno);
@@ -3612,11 +3589,6 @@ df_note_compute (bitmap all_blocks)
   bitmap_initialize (&do_not_gen, &df_bitmap_obstack);
   bitmap_initialize (&artificial_uses, &df_bitmap_obstack);
 
-#ifdef REG_DEAD_DEBUGGING
-  if (dump_file)
-    print_rtl_with_bb (dump_file, get_insns());
-#endif
-
   EXECUTE_IF_SET_IN_BITMAP (all_blocks, 0, bb_index, bi)
   {
     df_note_bb_compute (bb_index, &live, &do_not_gen, &artificial_uses);
Index: lcm.c
===================================================================
--- lcm.c	(revision 189457)
+++ lcm.c	(working copy)
@@ -63,11 +63,8 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm_p.h"
 #include "function.h"
 #include "sbitmap.h"
+#include "dumpfile.h"
 
-/* We want target macros for the mode switching code to be able to refer
-   to instruction attribute values.  */
-#include "insn-attr.h"
-
 /* Edge based LCM routines.  */
 static void compute_antinout_edge (sbitmap *, sbitmap *, sbitmap *, sbitmap *);
 static void compute_earliest (struct edge_list *, int, sbitmap *, sbitmap *,
Index: dojump.c
===================================================================
--- dojump.c	(revision 189457)
+++ dojump.c	(working copy)
@@ -1083,16 +1083,11 @@ do_compare_rtx_and_jump (rtx op0, rtx op1, enum rt
 	       last = NEXT_INSN (last))
 	    if (JUMP_P (last))
 	      break;
-	  if (!last
-	      || !JUMP_P (last)
-	      || NEXT_INSN (last)
-	      || !any_condjump_p (last))
+	  if (last
+	      && JUMP_P (last)
+	      && ! NEXT_INSN (last)
+	      && any_condjump_p (last))
 	    {
-	      if (dump_file)
-		fprintf (dump_file, "Failed to add probability note\n");
-	    }
-	  else
-	    {
 	      gcc_assert (!find_reg_note (last, REG_BR_PROB, 0));
 	      add_reg_note (last, REG_BR_PROB, GEN_INT (prob));
 	    }
Index: stmt.c
===================================================================
--- stmt.c	(revision 189457)
+++ stmt.c	(working copy)
@@ -54,6 +54,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "pretty-print.h"
 #include "bitmap.h"
 #include "params.h"
+#include "dumpfile.h"
 
 \f
 /* Functions and data structures for expanding case statements.  */
@@ -1867,9 +1868,7 @@ emit_case_decision_tree (tree index_expr, tree ind
 
   balance_case_nodes (&case_list, NULL);
 
-  /* Don't want to include tree-pass.h here.  This code will be moved
-     to a GIMPLE pass for GCC 4.9 anyway, so for now always dump.  */
-  if (dump_file && 1/*(dump_flags & TDF_DETAILS)*/)
+  if (dump_file && (dump_flags & TDF_DETAILS))
     {
       int indent_step = ceil_log2 (TYPE_PRECISION (index_type)) + 2;
       fprintf (dump_file, ";; Expanding GIMPLE switch as decision tree:\n");
Index: tree-cfgcleanup.c
===================================================================
--- tree-cfgcleanup.c	(revision 189457)
+++ tree-cfgcleanup.c	(working copy)
@@ -31,8 +31,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "ggc.h"
 #include "langhooks.h"
 #include "tree-flow.h"
-#include "timevar.h"
-#include "tree-dump.h"
 #include "tree-pass.h"
 #include "except.h"
 #include "cfgloop.h"
Index: tree-object-size.c
===================================================================
--- tree-object-size.c	(revision 189457)
+++ tree-object-size.c	(working copy)
@@ -25,7 +25,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm.h"
 #include "tree.h"
 #include "diagnostic-core.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
 #include "tree-flow.h"
 #include "tree-pass.h"
Index: tree-ssa-copyrename.c
===================================================================
--- tree-ssa-copyrename.c	(revision 189457)
+++ tree-ssa-copyrename.c	(working copy)
@@ -33,9 +33,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-flow.h"
 #include "gimple.h"
 #include "tree-inline.h"
-#include "timevar.h"
 #include "hashtab.h"
-#include "tree-dump.h"
 #include "tree-ssa-live.h"
 #include "tree-pass.h"
 #include "langhooks.h"
Index: tree-ssa-loop-prefetch.c
===================================================================
--- tree-ssa-loop-prefetch.c	(revision 189457)
+++ tree-ssa-loop-prefetch.c	(working copy)
@@ -27,8 +27,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "basic-block.h"
 #include "tree-pretty-print.h"
 #include "tree-flow.h"
-#include "tree-dump.h"
-#include "timevar.h"
 #include "cfgloop.h"
 #include "tree-pass.h"
 #include "insn-config.h"
Index: tree-ssa-operands.c
===================================================================
--- tree-ssa-operands.c	(revision 189457)
+++ tree-ssa-operands.c	(working copy)
@@ -25,11 +25,11 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "flags.h"
 #include "function.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
 #include "tree-flow.h"
 #include "tree-inline.h"
-#include "tree-pass.h"
+#include "timevar.h"
+#include "dumpfile.h"
 #include "ggc.h"
 #include "timevar.h"
 #include "langhooks.h"
Index: gimplify.c
===================================================================
--- gimplify.c	(revision 189457)
+++ gimplify.c	(working copy)
@@ -44,9 +44,9 @@ along with GCC; see the file COPYING3.  If not see
 #include "splay-tree.h"
 #include "vec.h"
 #include "gimple.h"
-#include "tree-pass.h"
 
-#include "langhooks-def.h"	/* FIXME: for lhd_set_decl_assembler_name.  */
+#include "langhooks-def.h"	/* FIXME: for lhd_set_decl_assembler_name */
+#include "tree-pass.h"		/* FIXME: only for PROP_gimple_any */
 
 enum gimplify_omp_var_data
 {
Index: tree-ssa-sink.c
===================================================================
--- tree-ssa-sink.c	(revision 189457)
+++ tree-ssa-sink.c	(working copy)
@@ -29,16 +29,12 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-inline.h"
 #include "tree-flow.h"
 #include "gimple.h"
-#include "tree-dump.h"
-#include "timevar.h"
-#include "fibheap.h"
 #include "hashtab.h"
 #include "tree-iterator.h"
 #include "alloc-pool.h"
 #include "tree-pass.h"
 #include "flags.h"
 #include "bitmap.h"
-#include "langhooks.h"
 #include "cfgloop.h"
 #include "params.h"
 
Index: predict.c
===================================================================
--- predict.c	(revision 189457)
+++ predict.c	(working copy)
@@ -53,9 +53,8 @@ along with GCC; see the file COPYING3.  If not see
 #include "cfgloop.h"
 #include "tree-flow.h"
 #include "ggc.h"
-#include "tree-dump.h"
+#include "dumpfile.h"
 #include "tree-pass.h"
-#include "timevar.h"
 #include "tree-scalar-evolution.h"
 #include "cfgloop.h"
 #include "pointer-set.h"
Index: tree-ssa-dse.c
===================================================================
--- tree-ssa-dse.c	(revision 189457)
+++ tree-ssa-dse.c	(working copy)
@@ -26,11 +26,9 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "tm_p.h"
 #include "basic-block.h"
-#include "timevar.h"
 #include "gimple-pretty-print.h"
 #include "tree-flow.h"
 #include "tree-pass.h"
-#include "tree-dump.h"
 #include "domwalk.h"
 #include "flags.h"
 #include "langhooks.h"
Index: tree-vect-loop.c
===================================================================
--- tree-vect-loop.c	(revision 189457)
+++ tree-vect-loop.c	(working copy)
@@ -27,10 +27,9 @@ along with GCC; see the file COPYING3.  If not see
 #include "ggc.h"
 #include "tree.h"
 #include "basic-block.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
 #include "tree-flow.h"
-#include "tree-dump.h"
+#include "tree-pass.h"
 #include "cfgloop.h"
 #include "expr.h"
 #include "recog.h"
Index: auto-inc-dec.c
===================================================================
--- auto-inc-dec.c	(revision 189457)
+++ auto-inc-dec.c	(working copy)
@@ -35,7 +35,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "diagnostic-core.h"
 #include "recog.h"
 #include "expr.h"
-#include "timevar.h"
 #include "tree-pass.h"
 #include "df.h"
 #include "dbgcnt.h"
Index: tree-eh.c
===================================================================
--- tree-eh.c	(revision 189457)
+++ tree-eh.c	(working copy)
@@ -28,11 +28,8 @@ along with GCC; see the file COPYING3.  If not see
 #include "except.h"
 #include "pointer-set.h"
 #include "tree-flow.h"
-#include "tree-dump.h"
 #include "tree-inline.h"
-#include "tree-iterator.h"
 #include "tree-pass.h"
-#include "timevar.h"
 #include "langhooks.h"
 #include "ggc.h"
 #include "diagnostic-core.h"
Index: coverage.c
===================================================================
--- coverage.c	(revision 189457)
+++ coverage.c	(working copy)
@@ -46,7 +46,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "hashtab.h"
 #include "tree-iterator.h"
 #include "cgraph.h"
-#include "tree-pass.h"
+#include "dumpfile.h"
 #include "diagnostic-core.h"
 #include "intl.h"
 #include "filenames.h"
Index: emit-rtl.c
===================================================================
--- emit-rtl.c	(revision 189457)
+++ emit-rtl.c	(working copy)
@@ -56,7 +56,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "ggc.h"
 #include "debug.h"
 #include "langhooks.h"
-#include "tree-pass.h"
 #include "df.h"
 #include "params.h"
 #include "target.h"
Index: regmove.c
===================================================================
--- regmove.c	(revision 189457)
+++ regmove.c	(working copy)
@@ -41,7 +41,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "except.h"
 #include "diagnostic-core.h"
 #include "reload.h"
-#include "timevar.h"
 #include "tree-pass.h"
 #include "df.h"
 #include "ira.h"
Index: tree-pretty-print.c
===================================================================
--- tree-pretty-print.c	(revision 189457)
+++ tree-pretty-print.c	(working copy)
@@ -30,7 +30,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "langhooks.h"
 #include "tree-iterator.h"
 #include "tree-chrec.h"
-#include "tree-pass.h"
+#include "dumpfile.h"
 #include "value-prof.h"
 #include "predict.h"
 
Index: tree-ssa-reassoc.c
===================================================================
--- tree-ssa-reassoc.c	(revision 189457)
+++ tree-ssa-reassoc.c	(working copy)
@@ -25,13 +25,10 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm.h"
 #include "tree.h"
 #include "basic-block.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
 #include "tree-inline.h"
 #include "tree-flow.h"
 #include "gimple.h"
-#include "tree-dump.h"
-#include "timevar.h"
 #include "tree-iterator.h"
 #include "tree-pass.h"
 #include "alloc-pool.h"
Index: tree-sra.c
===================================================================
--- tree-sra.c	(revision 189457)
+++ tree-sra.c	(working copy)
@@ -80,11 +80,9 @@ along with GCC; see the file COPYING3.  If not see
 #include "gimple.h"
 #include "cgraph.h"
 #include "tree-flow.h"
+#include "tree-pass.h"
 #include "ipa-prop.h"
-#include "tree-pretty-print.h"
 #include "statistics.h"
-#include "tree-dump.h"
-#include "timevar.h"
 #include "params.h"
 #include "target.h"
 #include "flags.h"
Index: tree-ssa-ccp.c
===================================================================
--- tree-ssa-ccp.c	(revision 189457)
+++ tree-ssa-ccp.c	(working copy)
@@ -119,10 +119,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm_p.h"
 #include "basic-block.h"
 #include "function.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
-#include "timevar.h"
-#include "tree-dump.h"
 #include "tree-flow.h"
 #include "tree-pass.h"
 #include "tree-ssa-propagate.h"
Index: final.c
===================================================================
--- final.c	(revision 189457)
+++ final.c	(working copy)
@@ -74,7 +74,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "expr.h"
 #include "tree-pass.h"
 #include "tree-flow.h"
-#include "timevar.h"
 #include "cgraph.h"
 #include "coverage.h"
 #include "df.h"
Index: tree-ssa-loop.c
===================================================================
--- tree-ssa-loop.c	(revision 189457)
+++ tree-ssa-loop.c	(working copy)
@@ -26,9 +26,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm_p.h"
 #include "basic-block.h"
 #include "tree-flow.h"
-#include "tree-dump.h"
 #include "tree-pass.h"
-#include "timevar.h"
 #include "cfgloop.h"
 #include "flags.h"
 #include "tree-inline.h"
Index: tree-vect-stmts.c
===================================================================
--- tree-vect-stmts.c	(revision 189457)
+++ tree-vect-stmts.c	(working copy)
@@ -28,19 +28,19 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "target.h"
 #include "basic-block.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
 #include "tree-flow.h"
-#include "tree-dump.h"
 #include "cfgloop.h"
 #include "expr.h"
-#include "recog.h"
+#include "recog.h"		/* FIXME: for insn_data */
 #include "optabs.h"
 #include "diagnostic-core.h"
 #include "tree-vectorizer.h"
+#include "dumpfile.h"
+
+/* For lang_hooks.types.type_for_mode.  */
 #include "langhooks.h"
 
-
 /* Return a variable of type ELEM_TYPE[NELEMS].  */
 
 static tree
Index: cgraphclones.c
===================================================================
--- cgraphclones.c	(revision 189457)
+++ cgraphclones.c	(working copy)
@@ -82,15 +82,12 @@ along with GCC; see the file COPYING3.  If not see
 #include "target.h"
 #include "cgraph.h"
 #include "diagnostic.h"
-#include "timevar.h"
 #include "params.h"
-#include "fibheap.h"
 #include "intl.h"
 #include "function.h"
 #include "ipa-prop.h"
 #include "gimple.h"
 #include "tree-iterator.h"
-#include "tree-pass.h"
 #include "tree-dump.h"
 #include "gimple-pretty-print.h"
 #include "coverage.h"
Index: ree.c
===================================================================
--- ree.c	(revision 189457)
+++ ree.c	(working copy)
@@ -233,12 +233,10 @@ along with GCC; see the file COPYING3.  If not see
 #include "recog.h"
 #include "diagnostic-core.h"
 #include "target.h"
-#include "timevar.h"
 #include "optabs.h"
 #include "insn-codes.h"
 #include "rtlhooks-def.h"
 #include "params.h"
-#include "timevar.h"
 #include "tree-pass.h"
 #include "df.h"
 #include "cgraph.h"
Index: reg-stack.c
===================================================================
--- reg-stack.c	(revision 189457)
+++ reg-stack.c	(working copy)
@@ -167,7 +167,6 @@
 #include "basic-block.h"
 #include "reload.h"
 #include "ggc.h"
-#include "timevar.h"
 #include "tree-pass.h"
 #include "target.h"
 #include "df.h"
Index: tree-switch-conversion.c
===================================================================
--- tree-switch-conversion.c	(revision 189457)
+++ tree-switch-conversion.c	(working copy)
@@ -37,8 +37,9 @@ Software Foundation, 51 Franklin Street, Fifth Flo
 #include "tree-ssa-operands.h"
 #include "tree-pass.h"
 #include "gimple-pretty-print.h"
-#include "tree-dump.h"
-#include "timevar.h"
+
+/* ??? For lang_hooks.types.type_for_mode, but is there a word_mode
+   type in the GIMPLE type system that is language-independent?  */
 #include "langhooks.h"
 
 /* Need to include expr.h and optabs.h for lshift_cheap_p.  */
Index: modulo-sched.c
===================================================================
--- modulo-sched.c	(revision 189457)
+++ modulo-sched.c	(working copy)
@@ -42,7 +42,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "params.h"
 #include "gcov-io.h"
 #include "ddg.h"
-#include "timevar.h"
 #include "tree-pass.h"
 #include "dbgcnt.h"
 #include "df.h"
Index: graphite-optimize-isl.c
===================================================================
--- graphite-optimize-isl.c	(revision 189457)
+++ graphite-optimize-isl.c	(working copy)
@@ -33,7 +33,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "tree-flow.h"
-#include "tree-dump.h"
+#include "dumpfile.h"
 #include "cfgloop.h"
 #include "tree-chrec.h"
 #include "tree-data-ref.h"
Index: ipa-prop.c
===================================================================
--- ipa-prop.c	(revision 189457)
+++ ipa-prop.c	(working copy)
@@ -32,10 +32,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-inline.h"
 #include "gimple.h"
 #include "flags.h"
-#include "timevar.h"
-#include "flags.h"
 #include "diagnostic.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
 #include "lto-streamer.h"
 #include "data-streamer.h"
Index: profile.c
===================================================================
--- profile.c	(revision 189457)
+++ profile.c	(working copy)
@@ -64,9 +64,8 @@ along with GCC; see the file COPYING3.  If not see
 #include "value-prof.h"
 #include "tree.h"
 #include "tree-flow.h"
-#include "timevar.h"
 #include "cfgloop.h"
-#include "tree-pass.h"
+#include "dumpfile.h"
 
 #include "profile.h"
 
Index: sched-rgn.c
===================================================================
--- sched-rgn.c	(revision 189457)
+++ sched-rgn.c	(working copy)
@@ -64,7 +64,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "sched-int.h"
 #include "sel-sched.h"
 #include "target.h"
-#include "timevar.h"
 #include "tree-pass.h"
 #include "dbgcnt.h"
 
Index: reorg.c
===================================================================
--- reorg.c	(revision 189457)
+++ reorg.c	(working copy)
@@ -132,7 +132,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "resource.h"
 #include "except.h"
 #include "params.h"
-#include "timevar.h"
 #include "target.h"
 #include "tree-pass.h"
 
Index: sched-vis.c
===================================================================
--- sched-vis.c	(revision 189457)
+++ sched-vis.c	(working copy)
@@ -32,7 +32,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "basic-block.h"
 #include "insn-attr.h"
 #include "sched-int.h"
-#include "tree-pass.h"
+#include "dumpfile.h"	/* for the TDF_* flags */
 
 static char *safe_concat (char *, char *, const char *);
 
Index: omega.c
===================================================================
--- omega.c	(revision 189457)
+++ omega.c	(working copy)
@@ -36,7 +36,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "coretypes.h"
 #include "tree.h"
 #include "diagnostic-core.h"
-#include "tree-pass.h"
+#include "dumpfile.h"
 #include "omega.h"
 
 /* When set to true, keep substitution variables.  When set to false,
Index: dce.c
===================================================================
--- dce.c	(revision 189457)
+++ dce.c	(working copy)
@@ -32,7 +32,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "df.h"
 #include "cselib.h"
 #include "dce.h"
-#include "timevar.h"
 #include "tree-pass.h"
 #include "dbgcnt.h"
 #include "tm_p.h"
Index: tree-ssa-dom.c
===================================================================
--- tree-ssa-dom.c	(revision 189457)
+++ tree-ssa-dom.c	(working copy)
@@ -29,10 +29,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "basic-block.h"
 #include "cfgloop.h"
 #include "function.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
-#include "timevar.h"
-#include "tree-dump.h"
 #include "tree-flow.h"
 #include "domwalk.h"
 #include "tree-pass.h"
Index: loop-invariant.c
===================================================================
--- loop-invariant.c	(revision 189457)
+++ loop-invariant.c	(working copy)
@@ -55,6 +55,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "params.h"
 #include "regs.h"
 #include "ira.h"
+#include "dumpfile.h"
 
 /* The data stored for the loop.  */
 
Index: tree-ssa.c
===================================================================
--- tree-ssa.c	(revision 189457)
+++ tree-ssa.c	(working copy)
@@ -30,16 +30,13 @@ along with GCC; see the file COPYING3.  If not see
 #include "langhooks.h"
 #include "basic-block.h"
 #include "function.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
 #include "bitmap.h"
 #include "pointer-set.h"
 #include "tree-flow.h"
 #include "gimple.h"
 #include "tree-inline.h"
-#include "timevar.h"
 #include "hashtab.h"
-#include "tree-dump.h"
 #include "tree-pass.h"
 #include "diagnostic-core.h"
 #include "cfgloop.h"
Index: gimple-pretty-print.c
===================================================================
--- gimple-pretty-print.c	(revision 189457)
+++ gimple-pretty-print.c	(working copy)
@@ -26,11 +26,10 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm.h"
 #include "tree.h"
 #include "diagnostic.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
 #include "hashtab.h"
 #include "tree-flow.h"
-#include "tree-pass.h"
+#include "dumpfile.h"	/* for dump_flags */
 #include "gimple.h"
 #include "value-prof.h"
 #include "trans-mem.h"
Index: tree-ssa-loop-im.c
===================================================================
--- tree-ssa-loop-im.c	(revision 189457)
+++ tree-ssa-loop-im.c	(working copy)
@@ -25,11 +25,8 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "tm_p.h"
 #include "basic-block.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
 #include "tree-flow.h"
-#include "tree-dump.h"
-#include "timevar.h"
 #include "cfgloop.h"
 #include "domwalk.h"
 #include "params.h"
Index: dbgcnt.c
===================================================================
--- dbgcnt.c	(revision 189457)
+++ dbgcnt.c	(working copy)
@@ -25,6 +25,7 @@ See dbgcnt.def for usage information.  */
 #include "diagnostic-core.h"
 #include "tm.h"
 #include "rtl.h"
+#include "dumpfile.h"
 
 #include "dbgcnt.h"
 
Index: graphite-sese-to-poly.c
===================================================================
--- graphite-sese-to-poly.c	(revision 189457)
+++ graphite-sese-to-poly.c	(working copy)
@@ -34,7 +34,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "tree-flow.h"
-#include "tree-dump.h"
+#include "dumpfile.h"
 #include "cfgloop.h"
 #include "tree-chrec.h"
 #include "tree-data-ref.h"
Index: tree-data-ref.c
===================================================================
--- tree-data-ref.c	(revision 189457)
+++ tree-data-ref.c	(working copy)
@@ -82,7 +82,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "cfgloop.h"
 #include "tree-data-ref.h"
 #include "tree-scalar-evolution.h"
-#include "tree-pass.h"
+#include "dumpfile.h"
 #include "langhooks.h"
 #include "tree-affine.h"
 #include "params.h"
Index: graphite-blocking.c
===================================================================
--- graphite-blocking.c	(revision 189457)
+++ graphite-blocking.c	(working copy)
@@ -35,7 +35,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "tree-flow.h"
-#include "tree-dump.h"
+#include "dumpfile.h"
 #include "cfgloop.h"
 #include "tree-chrec.h"
 #include "tree-data-ref.h"
Index: tree-ssa-math-opts.c
===================================================================
--- tree-ssa-math-opts.c	(revision 189457)
+++ tree-ssa-math-opts.c	(working copy)
@@ -92,7 +92,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "flags.h"
 #include "tree.h"
 #include "tree-flow.h"
-#include "timevar.h"
 #include "tree-pass.h"
 #include "alloc-pool.h"
 #include "basic-block.h"
Index: tree-ssa-propagate.c
===================================================================
--- tree-ssa-propagate.c	(revision 189457)
+++ tree-ssa-propagate.c	(working copy)
@@ -29,10 +29,8 @@
 #include "basic-block.h"
 #include "function.h"
 #include "gimple-pretty-print.h"
-#include "timevar.h"
-#include "tree-dump.h"
+#include "dumpfile.h"
 #include "tree-flow.h"
-#include "tree-pass.h"
 #include "tree-ssa-propagate.h"
 #include "langhooks.h"
 #include "vec.h"
Index: postreload.c
===================================================================
--- postreload.c	(revision 189457)
+++ postreload.c	(working copy)
@@ -43,7 +43,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "except.h"
 #include "tree.h"
 #include "target.h"
-#include "timevar.h"
 #include "tree-pass.h"
 #include "df.h"
 #include "dbgcnt.h"
Index: value-prof.c
===================================================================
--- value-prof.c	(revision 189457)
+++ value-prof.c	(working copy)
@@ -36,14 +36,13 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-flow.h"
 #include "tree-flow-inline.h"
 #include "diagnostic.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
 #include "coverage.h"
 #include "tree.h"
 #include "gcov-io.h"
 #include "cgraph.h"
 #include "timevar.h"
-#include "tree-pass.h"
+#include "dumpfile.h"
 #include "pointer-set.h"
 #include "profile.h"
 
Index: haifa-sched.c
===================================================================
--- haifa-sched.c	(revision 189457)
+++ haifa-sched.c	(working copy)
@@ -149,6 +149,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "ira.h"
 #include "emit-rtl.h"  /* FIXME: Can go away once crtl is moved to rtl.h.  */
 #include "hashtab.h"
+#include "dumpfile.h"
 
 #ifdef INSN_SCHEDULING
 
Index: regrename.c
===================================================================
--- regrename.c	(revision 189457)
+++ regrename.c	(working copy)
@@ -35,7 +35,6 @@
 #include "recog.h"
 #include "flags.h"
 #include "obstack.h"
-#include "timevar.h"
 #include "tree-pass.h"
 #include "df.h"
 #include "target.h"
Index: sel-sched-ir.c
===================================================================
--- sel-sched-ir.c	(revision 189457)
+++ sel-sched-ir.c	(working copy)
@@ -35,8 +35,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "recog.h"
 #include "params.h"
 #include "target.h"
-#include "timevar.h"
-#include "tree-pass.h"
 #include "sched-int.h"
 #include "ggc.h"
 #include "tree.h"
Index: matrix-reorg.c
===================================================================
--- matrix-reorg.c	(revision 189457)
+++ matrix-reorg.c	(working copy)
@@ -126,7 +126,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "target.h"
 #include "cgraph.h"
 #include "diagnostic-core.h"
-#include "timevar.h"
 #include "params.h"
 #include "fibheap.h"
 #include "intl.h"
Index: loop-iv.c
===================================================================
--- loop-iv.c	(revision 189457)
+++ loop-iv.c	(working copy)
@@ -62,6 +62,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "diagnostic-core.h"
 #include "df.h"
 #include "hashtab.h"
+#include "dumpfile.h"
 
 /* Possible return values of iv_get_reaching_def.  */
 
Index: caller-save.c
===================================================================
--- caller-save.c	(revision 189457)
+++ caller-save.c	(working copy)
@@ -38,6 +38,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm_p.h"
 #include "addresses.h"
 #include "ggc.h"
+#include "dumpfile.h"
 
 #define MOVE_MAX_WORDS (MOVE_MAX / UNITS_PER_WORD)
 
Index: tree-vect-data-refs.c
===================================================================
--- tree-vect-data-refs.c	(revision 189457)
+++ tree-vect-data-refs.c	(working copy)
@@ -29,10 +29,9 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm_p.h"
 #include "target.h"
 #include "basic-block.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
 #include "tree-flow.h"
-#include "tree-dump.h"
+#include "dumpfile.h"
 #include "cfgloop.h"
 #include "tree-chrec.h"
 #include "tree-scalar-evolution.h"
Index: tree-dump.c
===================================================================
--- tree-dump.c	(revision 189457)
+++ tree-dump.c	(working copy)
@@ -29,7 +29,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "diagnostic-core.h"
 #include "toplev.h"
 #include "tree-dump.h"
-#include "tree-pass.h"
 #include "langhooks.h"
 #include "tree-iterator.h"
 
Index: lto-section-out.c
===================================================================
--- lto-section-out.c	(revision 189457)
+++ lto-section-out.c	(working copy)
@@ -30,7 +30,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "hashtab.h"
 #include "basic-block.h"
 #include "tree-flow.h"
-#include "tree-pass.h"
 #include "cgraph.h"
 #include "function.h"
 #include "ggc.h"
Index: ipa-inline-analysis.c
===================================================================
--- ipa-inline-analysis.c	(revision 189457)
+++ ipa-inline-analysis.c	(working copy)
@@ -76,7 +76,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "cgraph.h"
 #include "diagnostic.h"
 #include "gimple-pretty-print.h"
-#include "timevar.h"
 #include "params.h"
 #include "tree-pass.h"
 #include "coverage.h"
Index: ifcvt.c
===================================================================
--- ifcvt.c	(revision 189457)
+++ ifcvt.c	(working copy)
@@ -40,7 +40,6 @@
 #include "tm_p.h"
 #include "cfgloop.h"
 #include "target.h"
-#include "timevar.h"
 #include "tree-pass.h"
 #include "df.h"
 #include "vec.h"
Index: tree-outof-ssa.c
===================================================================
--- tree-outof-ssa.c	(revision 189457)
+++ tree-outof-ssa.c	(working copy)
@@ -26,13 +26,10 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "ggc.h"
 #include "basic-block.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
 #include "bitmap.h"
 #include "tree-flow.h"
-#include "timevar.h"
-#include "tree-dump.h"
-#include "tree-pass.h"
+#include "dumpfile.h"
 #include "diagnostic-core.h"
 #include "ssaexpand.h"
 
Index: graphite-dependences.c
===================================================================
--- graphite-dependences.c	(revision 189457)
+++ graphite-dependences.c	(working copy)
@@ -34,7 +34,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "tree-flow.h"
-#include "tree-dump.h"
+#include "dumpfile.h"
 #include "cfgloop.h"
 #include "tree-chrec.h"
 #include "tree-data-ref.h"
Index: tree-ssa-loop-ch.c
===================================================================
--- tree-ssa-loop-ch.c	(revision 189457)
+++ tree-ssa-loop-ch.c	(working copy)
@@ -26,9 +26,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm_p.h"
 #include "basic-block.h"
 #include "tree-flow.h"
-#include "tree-dump.h"
 #include "tree-pass.h"
-#include "timevar.h"
 #include "cfgloop.h"
 #include "tree-inline.h"
 #include "flags.h"
Index: tree-ssa-loop-unswitch.c
===================================================================
--- tree-ssa-loop-unswitch.c	(revision 189457)
+++ tree-ssa-loop-unswitch.c	(working copy)
@@ -25,8 +25,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm_p.h"
 #include "basic-block.h"
 #include "tree-flow.h"
-#include "tree-dump.h"
-#include "timevar.h"
 #include "cfgloop.h"
 #include "params.h"
 #include "tree-pass.h"
Index: tree-ssa-ifcombine.c
===================================================================
--- tree-ssa-ifcombine.c	(revision 189457)
+++ tree-ssa-ifcombine.c	(working copy)
@@ -24,11 +24,9 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm.h"
 #include "tree.h"
 #include "basic-block.h"
-#include "timevar.h"
 #include "tree-pretty-print.h"
 #include "tree-flow.h"
 #include "tree-pass.h"
-#include "tree-dump.h"
 
 /* This pass combines COND_EXPRs to simplify control flow.  It
    currently recognizes bit tests and comparisons in chains that
Index: tree-ssa-copy.c
===================================================================
--- tree-ssa-copy.c	(revision 189457)
+++ tree-ssa-copy.c	(working copy)
@@ -27,10 +27,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm_p.h"
 #include "basic-block.h"
 #include "function.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
-#include "timevar.h"
-#include "tree-dump.h"
 #include "tree-flow.h"
 #include "tree-pass.h"
 #include "tree-ssa-propagate.h"
Index: tree-if-conv.c
===================================================================
--- tree-if-conv.c	(revision 189457)
+++ tree-if-conv.c	(working copy)
@@ -87,12 +87,9 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm.h"
 #include "tree.h"
 #include "flags.h"
-#include "timevar.h"
 #include "basic-block.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
 #include "tree-flow.h"
-#include "tree-dump.h"
 #include "cfgloop.h"
 #include "tree-chrec.h"
 #include "tree-data-ref.h"
Index: recog.c
===================================================================
--- recog.c	(revision 189457)
+++ recog.c	(working copy)
@@ -38,7 +38,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "basic-block.h"
 #include "reload.h"
 #include "target.h"
-#include "timevar.h"
 #include "tree-pass.h"
 #include "df.h"
 
Index: mcf.c
===================================================================
--- mcf.c	(revision 189457)
+++ mcf.c	(working copy)
@@ -49,6 +49,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "basic-block.h"
 #include "gcov-io.h"
 #include "profile.h"
+#include "dumpfile.h"
 
 /* CAP_INFINITY: Constant to represent infinite capacity.  */
 #define CAP_INFINITY INTTYPE_MAXIMUM (HOST_WIDEST_INT)
Index: tree-chrec.c
===================================================================
--- tree-chrec.c	(revision 189457)
+++ tree-chrec.c	(working copy)
@@ -31,7 +31,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "cfgloop.h"
 #include "tree-flow.h"
 #include "tree-chrec.h"
-#include "tree-pass.h"
+#include "dumpfile.h"
 #include "params.h"
 #include "tree-scalar-evolution.h"
 
Index: tree-ssa-uninit.c
===================================================================
--- tree-ssa-uninit.c	(revision 189457)
+++ tree-ssa-uninit.c	(working copy)
@@ -26,7 +26,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "flags.h"
 #include "tm_p.h"
-#include "langhooks.h"
 #include "basic-block.h"
 #include "function.h"
 #include "gimple-pretty-print.h"
@@ -35,12 +34,9 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-flow.h"
 #include "gimple.h"
 #include "tree-inline.h"
-#include "timevar.h"
 #include "hashtab.h"
-#include "tree-dump.h"
 #include "tree-pass.h"
 #include "diagnostic-core.h"
-#include "timevar.h"
 
 /* This implements the pass that does predicate aware warning on uses of
    possibly uninitialized variables. The pass first collects the set of
Index: except.c
===================================================================
--- except.c	(revision 189457)
+++ except.c	(working copy)
@@ -141,7 +141,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "diagnostic.h"
 #include "tree-pretty-print.h"
 #include "tree-pass.h"
-#include "timevar.h"
 #include "tree-flow.h"
 #include "cfgloop.h"
 
Index: cselib.c
===================================================================
--- cselib.c	(revision 189457)
+++ cselib.c	(working copy)
@@ -37,7 +37,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "diagnostic-core.h"
 #include "ggc.h"
 #include "hashtab.h"
-#include "tree-pass.h"
+#include "dumpfile.h"
 #include "cselib.h"
 #include "params.h"
 #include "alloc-pool.h"
Index: cgraphunit.c
===================================================================
--- cgraphunit.c	(revision 189457)
+++ cgraphunit.c	(working copy)
@@ -176,7 +176,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "target.h"
 #include "cgraph.h"
 #include "diagnostic.h"
-#include "timevar.h"
 #include "params.h"
 #include "fibheap.h"
 #include "intl.h"
Index: combine.c
===================================================================
--- combine.c	(revision 189457)
+++ combine.c	(working copy)
@@ -98,7 +98,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "insn-codes.h"
 #include "rtlhooks-def.h"
 #include "params.h"
-#include "timevar.h"
 #include "tree-pass.h"
 #include "df.h"
 #include "cgraph.h"
Index: regcprop.c
===================================================================
--- regcprop.c	(revision 189457)
+++ regcprop.c	(working copy)
@@ -35,7 +35,6 @@
 #include "flags.h"
 #include "diagnostic-core.h"
 #include "obstack.h"
-#include "timevar.h"
 #include "tree-pass.h"
 #include "df.h"
 
Index: graphite-poly.c
===================================================================
--- graphite-poly.c	(revision 189457)
+++ graphite-poly.c	(working copy)
@@ -36,7 +36,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "coretypes.h"
 #include "diagnostic-core.h"
 #include "tree-flow.h"
-#include "tree-dump.h"
+#include "dumpfile.h"
 #include "gimple-pretty-print.h"
 #include "cfgloop.h"
 #include "tree-chrec.h"
Index: cfgloop.c
===================================================================
--- cfgloop.c	(revision 189457)
+++ cfgloop.c	(working copy)
@@ -23,8 +23,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "coretypes.h"
 #include "tm.h"
 #include "rtl.h"
-#include "hard-reg-set.h"
-#include "obstack.h"
 #include "function.h"
 #include "basic-block.h"
 #include "cfgloop.h"
@@ -34,6 +32,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-flow.h"
 #include "pointer-set.h"
 #include "ggc.h"
+#include "dumpfile.h"
 
 static void flow_loops_cfg_dump (FILE *);
 \f
Index: tree-vrp.c
===================================================================
--- tree-vrp.c	(revision 189457)
+++ tree-vrp.c	(working copy)
@@ -30,8 +30,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-flow.h"
 #include "tree-pass.h"
 #include "tree-dump.h"
-#include "timevar.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
 #include "diagnostic-core.h"
 #include "intl.h"
Index: tree-ssa-uncprop.c
===================================================================
--- tree-ssa-uncprop.c	(revision 189457)
+++ tree-ssa-uncprop.c	(working copy)
@@ -27,13 +27,10 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm_p.h"
 #include "basic-block.h"
 #include "function.h"
-#include "timevar.h"
-#include "tree-dump.h"
 #include "tree-flow.h"
 #include "domwalk.h"
 #include "tree-pass.h"
 #include "tree-ssa-propagate.h"
-#include "langhooks.h"
 
 /* The basic structure describing an equivalency created by traversing
    an edge.  Traversing the edge effectively means that we can assume
Index: lower-subreg.c
===================================================================
--- lower-subreg.c	(revision 189457)
+++ lower-subreg.c	(working copy)
@@ -27,7 +27,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm.h"
 #include "rtl.h"
 #include "tm_p.h"
-#include "timevar.h"
 #include "flags.h"
 #include "insn-config.h"
 #include "obstack.h"
Index: tree-ssa-structalias.c
===================================================================
--- tree-ssa-structalias.c	(revision 189457)
+++ tree-ssa-structalias.c	(working copy)
@@ -37,7 +37,6 @@
 #include "function.h"
 #include "cgraph.h"
 #include "tree-pass.h"
-#include "timevar.h"
 #include "alloc-pool.h"
 #include "splay-tree.h"
 #include "params.h"
Index: alias.c
===================================================================
--- alias.c	(revision 189457)
+++ alias.c	(working copy)
@@ -39,9 +39,9 @@ along with GCC; see the file COPYING3.  If not see
 #include "ggc.h"
 #include "langhooks.h"
 #include "timevar.h"
+#include "dumpfile.h"
 #include "target.h"
 #include "cgraph.h"
-#include "tree-pass.h"
 #include "df.h"
 #include "tree-ssa-alias.h"
 #include "pointer-set.h"
Index: reginfo.c
===================================================================
--- reginfo.c	(revision 189457)
+++ reginfo.c	(working copy)
@@ -45,7 +45,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "reload.h"
 #include "diagnostic-core.h"
 #include "output.h"
-#include "timevar.h"
 #include "hashtab.h"
 #include "target.h"
 #include "tree-pass.h"
Index: postreload-gcse.c
===================================================================
--- postreload-gcse.c	(revision 189457)
+++ postreload-gcse.c	(working copy)
@@ -41,7 +41,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "hashtab.h"
 #include "params.h"
 #include "target.h"
-#include "timevar.h"
 #include "tree-pass.h"
 #include "dbgcnt.h"
 
Index: tree-ssa-threadupdate.c
===================================================================
--- tree-ssa-threadupdate.c	(revision 189457)
+++ tree-ssa-threadupdate.c	(working copy)
@@ -28,8 +28,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "basic-block.h"
 #include "function.h"
 #include "tree-flow.h"
-#include "tree-dump.h"
-#include "tree-pass.h"
+#include "dumpfile.h"
 #include "cfgloop.h"
 
 /* Given a block B, update the CFG and SSA graph to reflect redirecting
Index: tree-optimize.c
===================================================================
--- tree-optimize.c	(revision 189457)
+++ tree-optimize.c	(working copy)
@@ -28,8 +28,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "basic-block.h"
 #include "flags.h"
 #include "tree-flow.h"
-#include "tree-dump.h"
-#include "timevar.h"
 #include "function.h"
 #include "langhooks.h"
 #include "diagnostic-core.h"
Index: store-motion.c
===================================================================
--- store-motion.c	(revision 189457)
+++ store-motion.c	(working copy)
@@ -39,7 +39,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "except.h"
 #include "ggc.h"
 #include "intl.h"
-#include "timevar.h"
 #include "tree-pass.h"
 #include "hashtab.h"
 #include "df.h"
Index: cfg.c
===================================================================
--- cfg.c	(revision 189457)
+++ cfg.c	(working copy)
@@ -58,6 +58,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "basic-block.h"
 #include "df.h"
 #include "cfgloop.h" /* FIXME: For struct loop.  */
+#include "dumpfile.h"
 
 \f
 #define RDIV(X,Y) (((X) + (Y) / 2) / (Y))
Index: tree-ssa-pre.c
===================================================================
--- tree-ssa-pre.c	(revision 189457)
+++ tree-ssa-pre.c	(working copy)
@@ -26,13 +26,10 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm.h"
 #include "tree.h"
 #include "basic-block.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
 #include "tree-inline.h"
 #include "tree-flow.h"
 #include "gimple.h"
-#include "tree-dump.h"
-#include "timevar.h"
 #include "fibheap.h"
 #include "hashtab.h"
 #include "tree-iterator.h"
Index: jump.c
===================================================================
--- jump.c	(revision 189457)
+++ jump.c	(working copy)
@@ -54,7 +54,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "diagnostic-core.h"
 #include "reload.h"
 #include "predict.h"
-#include "timevar.h"
 #include "tree-pass.h"
 #include "target.h"
 
Index: expr.c
===================================================================
--- expr.c	(revision 189457)
+++ expr.c	(working copy)
@@ -45,7 +45,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "intl.h"
 #include "tm_p.h"
 #include "tree-iterator.h"
-#include "tree-pass.h"
 #include "tree-flow.h"
 #include "target.h"
 #include "common/common-target.h"
Index: tree-predcom.c
===================================================================
--- tree-predcom.c	(revision 189457)
+++ tree-predcom.c	(working copy)
@@ -198,7 +198,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-scalar-evolution.h"
 #include "tree-chrec.h"
 #include "params.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
 #include "tree-pass.h"
 #include "tree-affine.h"
Index: tree-mudflap.c
===================================================================
--- tree-mudflap.c	(revision 189457)
+++ tree-mudflap.c	(working copy)
@@ -35,7 +35,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-iterator.h"
 #include "tree-flow.h"
 #include "tree-mudflap.h"
-#include "tree-dump.h"
 #include "tree-pass.h"
 #include "hashtab.h"
 #include "diagnostic.h"
Index: ipa-inline.c
===================================================================
--- ipa-inline.c	(revision 189457)
+++ ipa-inline.c	(working copy)
@@ -101,7 +101,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "cgraph.h"
 #include "diagnostic.h"
 #include "gimple-pretty-print.h"
-#include "timevar.h"
 #include "params.h"
 #include "fibheap.h"
 #include "intl.h"
Index: tree-ssa-dce.c
===================================================================
--- tree-ssa-dce.c	(revision 189457)
+++ tree-ssa-dce.c	(working copy)
@@ -49,14 +49,11 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm.h"
 
 #include "tree.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
 #include "basic-block.h"
 #include "tree-flow.h"
 #include "gimple.h"
-#include "tree-dump.h"
 #include "tree-pass.h"
-#include "timevar.h"
 #include "flags.h"
 #include "cfgloop.h"
 #include "tree-scalar-evolution.h"
Index: tree-diagnostic.c
===================================================================
--- tree-diagnostic.c	(revision 189457)
+++ tree-diagnostic.c	(working copy)
@@ -27,7 +27,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "diagnostic.h"
 #include "tree-pretty-print.h"
 #include "tree-diagnostic.h"
-#include "tree-pass.h" /* TDF_DIAGNOSTIC */
+#include "dumpfile.h" /* TDF_DIAGNOSTIC */
 #include "langhooks.h"
 #include "langhooks-def.h"
 #include "vec.h"
Index: loop-unroll.c
===================================================================
--- loop-unroll.c	(revision 189457)
+++ loop-unroll.c	(working copy)
@@ -32,6 +32,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "hashtab.h"
 #include "recog.h"
 #include "target.h"
+#include "dumpfile.h"
 
 /* This pass performs loop unrolling and peeling.  We only perform these
    optimizations on innermost loops (with single exception) because
Index: tree-affine.c
===================================================================
--- tree-affine.c	(revision 189457)
+++ tree-affine.c	(working copy)
@@ -22,11 +22,11 @@ along with GCC; see the file COPYING3.  If not see
 #include "coretypes.h"
 #include "tree.h"
 #include "tree-pretty-print.h"
-#include "tree-dump.h"
 #include "pointer-set.h"
 #include "tree-affine.h"
 #include "gimple.h"
 #include "flags.h"
+#include "dumpfile.h"
 
 /* Extends CST as appropriate for the affine combinations COMB.  */
 
Index: graphite-interchange.c
===================================================================
--- graphite-interchange.c	(revision 189457)
+++ graphite-interchange.c	(working copy)
@@ -36,7 +36,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "tree-flow.h"
-#include "tree-dump.h"
+#include "dumpfile.h"
 #include "cfgloop.h"
 #include "tree-chrec.h"
 #include "tree-data-ref.h"
Index: cse.c
===================================================================
--- cse.c	(revision 189457)
+++ cse.c	(working copy)
@@ -36,7 +36,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "diagnostic-core.h"
 #include "toplev.h"
 #include "ggc.h"
-#include "timevar.h"
 #include "except.h"
 #include "target.h"
 #include "params.h"
Index: tree-ssa-ter.c
===================================================================
--- tree-ssa-ter.c	(revision 189457)
+++ tree-ssa-ter.c	(working copy)
@@ -25,11 +25,10 @@ along with GCC; see the file COPYING3.  If not see
 #include "coretypes.h"
 #include "tm.h"
 #include "tree.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
 #include "bitmap.h"
 #include "tree-flow.h"
-#include "tree-dump.h"
+#include "dumpfile.h"
 #include "tree-ssa-live.h"
 #include "flags.h"
 
Index: web.c
===================================================================
--- web.c	(revision 189457)
+++ web.c	(working copy)
@@ -49,7 +49,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "function.h"
 #include "insn-config.h"
 #include "recog.h"
-#include "timevar.h"
 #include "tree-pass.h"
 
 
Index: tree-scalar-evolution.c
===================================================================
--- tree-scalar-evolution.c	(revision 189457)
+++ tree-scalar-evolution.c	(working copy)
@@ -262,7 +262,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "cfgloop.h"
 #include "tree-chrec.h"
 #include "tree-scalar-evolution.h"
-#include "tree-pass.h"
+#include "dumpfile.h"
 #include "params.h"
 
 static tree analyze_scalar_evolution_1 (struct loop *, tree, tree);
Index: reload1.c
===================================================================
--- reload1.c	(revision 189457)
+++ reload1.c	(working copy)
@@ -46,6 +46,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "ira.h"
 #include "target.h"
 #include "emit-rtl.h"
+#include "dumpfile.h"
 
 /* This file contains the reload pass of the compiler, which is
    run after register allocation has been done.  It checks that
Index: tree-vect-slp.c
===================================================================
--- tree-vect-slp.c	(revision 189457)
+++ tree-vect-slp.c	(working copy)
@@ -28,13 +28,12 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "target.h"
 #include "basic-block.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
 #include "tree-flow.h"
-#include "tree-dump.h"
+#include "tree-pass.h"
 #include "cfgloop.h"
 #include "expr.h"
-#include "recog.h"
+#include "recog.h"		/* FIXME: for insn_data */
 #include "optabs.h"
 #include "tree-vectorizer.h"
 #include "langhooks.h"
Index: loop-doloop.c
===================================================================
--- loop-doloop.c	(revision 189457)
+++ loop-doloop.c	(working copy)
@@ -33,6 +33,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "cfgloop.h"
 #include "params.h"
 #include "target.h"
+#include "dumpfile.h"
 
 /* This module is used to modify loops with a determinable number of
    iterations to use special low-overhead looping instructions.
Index: gcse.c
===================================================================
--- gcse.c	(revision 189457)
+++ gcse.c	(working copy)
@@ -158,7 +158,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "cselib.h"
 #include "intl.h"
 #include "obstack.h"
-#include "timevar.h"
 #include "tree-pass.h"
 #include "hashtab.h"
 #include "df.h"
Index: tree-vect-patterns.c
===================================================================
--- tree-vect-patterns.c	(revision 189457)
+++ tree-vect-patterns.c	(working copy)
@@ -29,15 +29,15 @@ along with GCC; see the file COPYING3.  If not see
 #include "basic-block.h"
 #include "gimple-pretty-print.h"
 #include "tree-flow.h"
-#include "tree-dump.h"
 #include "cfgloop.h"
 #include "expr.h"
 #include "optabs.h"
 #include "params.h"
 #include "tree-data-ref.h"
 #include "tree-vectorizer.h"
-#include "recog.h"
+#include "recog.h"		/* FIXME: for insn_data */
 #include "diagnostic-core.h"
+#include "dumpfile.h"
 
 /* Pattern recognition functions  */
 static gimple vect_recog_widen_sum_pattern (VEC (gimple, heap) **, tree *,
Index: gimple-fold.c
===================================================================
--- gimple-fold.c	(revision 189457)
+++ gimple-fold.c	(working copy)
@@ -25,9 +25,8 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "flags.h"
 #include "function.h"
-#include "tree-dump.h"
+#include "dumpfile.h"
 #include "tree-flow.h"
-#include "tree-pass.h"
 #include "tree-ssa-propagate.h"
 #include "target.h"
 #include "gimple-fold.h"
Index: gimple-ssa-strength-reduction.c
===================================================================
--- gimple-ssa-strength-reduction.c	(revision 189457)
+++ gimple-ssa-strength-reduction.c	(working copy)
@@ -49,9 +49,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "gimple.h"
 #include "basic-block.h"
 #include "tree-pass.h"
-#include "timevar.h"
 #include "cfgloop.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
 #include "tree-flow.h"
 #include "domwalk.h"
Index: var-tracking.c
===================================================================
--- var-tracking.c	(revision 189457)
+++ var-tracking.c	(working copy)
@@ -104,7 +104,6 @@
 #include "hashtab.h"
 #include "regs.h"
 #include "expr.h"
-#include "timevar.h"
 #include "tree-pass.h"
 #include "tree-flow.h"
 #include "cselib.h"
Index: tree-profile.c
===================================================================
--- tree-profile.c	(revision 189457)
+++ tree-profile.c	(working copy)
@@ -37,9 +37,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "coverage.h"
 #include "tree.h"
 #include "tree-flow.h"
-#include "tree-dump.h"
 #include "tree-pass.h"
-#include "timevar.h"
 #include "value-prof.h"
 #include "cgraph.h"
 #include "profile.h"
Index: passes.c
===================================================================
--- passes.c	(revision 189457)
+++ passes.c	(working copy)
@@ -49,7 +49,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "ggc.h"
 #include "graph.h"
 #include "regs.h"
-#include "timevar.h"
 #include "diagnostic-core.h"
 #include "params.h"
 #include "reload.h"
Index: tree-ssa-coalesce.c
===================================================================
--- tree-ssa-coalesce.c	(revision 189457)
+++ tree-ssa-coalesce.c	(working copy)
@@ -27,9 +27,9 @@ along with GCC; see the file COPYING3.  If not see
 #include "flags.h"
 #include "tree-pretty-print.h"
 #include "bitmap.h"
+#include "dumpfile.h"
 #include "tree-flow.h"
 #include "hashtab.h"
-#include "tree-dump.h"
 #include "tree-ssa-live.h"
 #include "diagnostic-core.h"
 
Index: graphite-clast-to-gimple.c
===================================================================
--- graphite-clast-to-gimple.c	(revision 189457)
+++ graphite-clast-to-gimple.c	(working copy)
@@ -36,7 +36,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "coretypes.h"
 #include "diagnostic-core.h"
 #include "tree-flow.h"
-#include "tree-dump.h"
+#include "dumpfile.h"
 #include "cfgloop.h"
 #include "tree-chrec.h"
 #include "tree-data-ref.h"
Index: tree-ssa-address.c
===================================================================
--- tree-ssa-address.c	(revision 189457)
+++ tree-ssa-address.c	(working copy)
@@ -30,9 +30,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "basic-block.h"
 #include "tree-pretty-print.h"
 #include "tree-flow.h"
-#include "tree-dump.h"
-#include "tree-pass.h"
-#include "timevar.h"
+#include "dumpfile.h"
 #include "flags.h"
 #include "tree-inline.h"
 #include "tree-affine.h"
Index: ipa-utils.c
===================================================================
--- ipa-utils.c	(revision 189457)
+++ ipa-utils.c	(working copy)
@@ -25,7 +25,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "tree-flow.h"
 #include "tree-inline.h"
-#include "tree-pass.h"
+#include "dumpfile.h"
 #include "langhooks.h"
 #include "pointer-set.h"
 #include "splay-tree.h"
@@ -35,7 +35,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "gimple.h"
 #include "cgraph.h"
 #include "flags.h"
-#include "timevar.h"
 #include "diagnostic.h"
 #include "langhooks.h"
 
Index: sel-sched.c
===================================================================
--- sel-sched.c	(revision 189457)
+++ sel-sched.c	(working copy)
@@ -35,8 +35,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "params.h"
 #include "target.h"
 #include "output.h"
-#include "timevar.h"
-#include "tree-pass.h"
 #include "sched-int.h"
 #include "ggc.h"
 #include "tree.h"
Index: loop-init.c
===================================================================
--- loop-init.c	(revision 189457)
+++ loop-init.c	(working copy)
@@ -28,7 +28,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "basic-block.h"
 #include "cfgloop.h"
 #include "tree-pass.h"
-#include "timevar.h"
 #include "flags.h"
 #include "df.h"
 #include "ggc.h"
Index: loop-unswitch.c
===================================================================
--- loop-unswitch.c	(revision 189457)
+++ loop-unswitch.c	(working copy)
@@ -29,6 +29,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "cfgloop.h"
 #include "params.h"
 #include "expr.h"
+#include "dumpfile.h"
 
 /* This pass moves constant conditions out of loops, duplicating the loop
    in progress, i.e. this code:
Index: tree-into-ssa.c
===================================================================
--- tree-into-ssa.c	(revision 189457)
+++ tree-into-ssa.c	(working copy)
@@ -29,15 +29,12 @@ along with GCC; see the file COPYING3.  If not see
 #include "langhooks.h"
 #include "basic-block.h"
 #include "function.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
 #include "bitmap.h"
 #include "tree-flow.h"
 #include "gimple.h"
 #include "tree-inline.h"
-#include "timevar.h"
 #include "hashtab.h"
-#include "tree-dump.h"
 #include "tree-pass.h"
 #include "cfgloop.h"
 #include "domwalk.h"
Index: dse.c
===================================================================
--- dse.c	(revision 189457)
+++ dse.c	(working copy)
@@ -37,7 +37,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "flags.h"
 #include "df.h"
 #include "cselib.h"
-#include "timevar.h"
 #include "tree-pass.h"
 #include "alloc-pool.h"
 #include "alias.h"
Index: tree-ssa-threadedge.c
===================================================================
--- tree-ssa-threadedge.c	(revision 189457)
+++ tree-ssa-threadedge.c	(working copy)
@@ -30,9 +30,8 @@ along with GCC; see the file COPYING3.  If not see
 #include "cfgloop.h"
 #include "function.h"
 #include "timevar.h"
-#include "tree-dump.h"
+#include "dumpfile.h"
 #include "tree-flow.h"
-#include "tree-pass.h"
 #include "tree-ssa-propagate.h"
 #include "langhooks.h"
 #include "params.h"
Index: dwarf2out.c
===================================================================
--- dwarf2out.c	(revision 189457)
+++ dwarf2out.c	(working copy)
@@ -91,8 +91,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "cgraph.h"
 #include "input.h"
 #include "gimple.h"
-#include "tree-pass.h"
-#include "tree-flow.h"
+#include "dumpfile.h"
 #include "opts.h"
 
 static void dwarf2out_source_line (unsigned int, const char *, int, bool);
Index: cprop.c
===================================================================
--- cprop.c	(revision 189457)
+++ cprop.c	(working copy)
@@ -41,7 +41,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "cselib.h"
 #include "intl.h"
 #include "obstack.h"
-#include "timevar.h"
 #include "tree-pass.h"
 #include "hashtab.h"
 #include "df.h"
Index: tree-ssa-forwprop.c
===================================================================
--- tree-ssa-forwprop.c	(revision 189457)
+++ tree-ssa-forwprop.c	(working copy)
@@ -25,11 +25,9 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "tm_p.h"
 #include "basic-block.h"
-#include "timevar.h"
 #include "gimple-pretty-print.h"
 #include "tree-flow.h"
 #include "tree-pass.h"
-#include "tree-dump.h"
 #include "langhooks.h"
 #include "flags.h"
 #include "gimple.h"
Index: tree-ssa-tail-merge.c
===================================================================
--- tree-ssa-tail-merge.c	(revision 189457)
+++ tree-ssa-tail-merge.c	(working copy)
@@ -190,16 +190,18 @@ along with GCC; see the file COPYING3.  If not see
 #include "flags.h"
 #include "function.h"
 #include "tree-flow.h"
-#include "timevar.h"
 #include "bitmap.h"
 #include "tree-ssa-alias.h"
 #include "params.h"
-#include "tree-pretty-print.h"
 #include "hashtab.h"
 #include "gimple-pretty-print.h"
 #include "tree-ssa-sccvn.h"
 #include "tree-dump.h"
 
+/* ??? This currently runs as part of tree-ssa-pre.  Why is this not
+   a stand-alone GIMPLE pass?  */
+#include "tree-pass.h"
+
 /* Describes a group of bbs with the same successors.  The successor bbs are
    cached in succs, and the successor edge flags are cached in succ_flags.
    If a bb has the EDGE_TRUE/VALSE_VALUE flags swapped compared to succ_flags,
Index: fwprop.c
===================================================================
--- fwprop.c	(revision 189457)
+++ fwprop.c	(working copy)
@@ -26,7 +26,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "diagnostic-core.h"
 
 #include "sparseset.h"
-#include "timevar.h"
 #include "rtl.h"
 #include "tm_p.h"
 #include "insn-config.h"
Index: tree-flow-inline.h
===================================================================
--- tree-flow-inline.h	(revision 189457)
+++ tree-flow-inline.h	(working copy)
@@ -1271,6 +1271,9 @@ make_ssa_name (tree var, gimple stmt)
    is not BITS_PER_UNIT-aligned.
    VALUEIZE if non-NULL is used to valueize SSA names.  It should return
    its argument or a constant if the argument is known to be constant.  */
+/* ??? This is a static inline here to avoid the overhead of the indirect calls
+   to VALUEIZE.  But is this overhead really that significant?  And should we
+   perhaps just rely on WHOPR to specialize the function?  */
 
 static inline tree
 get_addr_base_and_unit_offset_1 (tree exp, HOST_WIDE_INT *poffset,
Index: tree-ssa-sccvn.c
===================================================================
--- tree-ssa-sccvn.c	(revision 189457)
+++ tree-ssa-sccvn.c	(working copy)
@@ -25,21 +25,15 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm.h"
 #include "tree.h"
 #include "basic-block.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
 #include "tree-inline.h"
 #include "tree-flow.h"
 #include "gimple.h"
-#include "tree-dump.h"
-#include "timevar.h"
-#include "fibheap.h"
+#include "dumpfile.h"
 #include "hashtab.h"
-#include "tree-iterator.h"
 #include "alloc-pool.h"
-#include "tree-pass.h"
 #include "flags.h"
 #include "bitmap.h"
-#include "langhooks.h"
 #include "cfgloop.h"
 #include "params.h"
 #include "tree-ssa-propagate.h"
Index: cfgcleanup.c
===================================================================
--- cfgcleanup.c	(revision 189457)
+++ cfgcleanup.c	(working copy)
@@ -38,7 +38,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "rtl.h"
 #include "hard-reg-set.h"
 #include "regs.h"
-#include "timevar.h"
 #include "insn-config.h"
 #include "flags.h"
 #include "recog.h"
Index: tree-ssa-loop-niter.c
===================================================================
--- tree-ssa-loop-niter.c	(revision 189457)
+++ tree-ssa-loop-niter.c	(working copy)
@@ -25,13 +25,11 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "tm_p.h"
 #include "basic-block.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
 #include "intl.h"
 #include "tree-flow.h"
-#include "tree-dump.h"
+#include "dumpfile.h"
 #include "cfgloop.h"
-#include "tree-pass.h"
 #include "ggc.h"
 #include "tree-chrec.h"
 #include "tree-scalar-evolution.h"
Index: ipa.c
===================================================================
--- ipa.c	(revision 189457)
+++ ipa.c	(working copy)
@@ -24,7 +24,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm.h"
 #include "cgraph.h"
 #include "tree-pass.h"
-#include "timevar.h"
 #include "gimple.h"
 #include "ggc.h"
 #include "flags.h"
Index: tree-tailcall.c
===================================================================
--- tree-tailcall.c	(revision 189457)
+++ tree-tailcall.c	(working copy)
@@ -27,7 +27,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "basic-block.h"
 #include "function.h"
 #include "tree-flow.h"
-#include "tree-dump.h"
 #include "gimple-pretty-print.h"
 #include "except.h"
 #include "tree-pass.h"
Index: print-rtl.c
===================================================================
--- print-rtl.c	(revision 189457)
+++ print-rtl.c	(working copy)
@@ -42,7 +42,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "diagnostic.h"
 #include "tree-pretty-print.h"
 #include "cselib.h"
-#include "tree-pass.h"
+#include "dumpfile.h"	/* for dump_flags */
 #include "dwarf2out.h"
 #endif
 
Index: ipa-inline-transform.c
===================================================================
--- ipa-inline-transform.c	(revision 189457)
+++ ipa-inline-transform.c	(working copy)
@@ -36,7 +36,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "langhooks.h"
 #include "cgraph.h"
-#include "timevar.h"
 #include "intl.h"
 #include "coverage.h"
 #include "ggc.h"
Index: ipa-split.c
===================================================================
--- ipa-split.c	(revision 189457)
+++ ipa-split.c	(working copy)
@@ -85,7 +85,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-flow.h"
 #include "tree-pass.h"
 #include "flags.h"
-#include "timevar.h"
 #include "diagnostic.h"
 #include "tree-dump.h"
 #include "tree-inline.h"
Index: tree-nrv.c
===================================================================
--- tree-nrv.c	(revision 189457)
+++ tree-nrv.c	(working copy)
@@ -27,8 +27,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "basic-block.h"
 #include "tree-pretty-print.h"
 #include "tree-flow.h"
-#include "timevar.h"
-#include "tree-dump.h"
 #include "tree-pass.h"
 #include "langhooks.h"
 #include "flags.h"	/* For "optimize" in gate_pass_return_slot.
Index: hw-doloop.c
===================================================================
--- hw-doloop.c	(revision 189457)
+++ hw-doloop.c	(working copy)
@@ -34,6 +34,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "recog.h"
 #include "target.h"
 #include "hw-doloop.h"
+#include "dumpfile.h"
 
 #ifdef HAVE_doloop_end
 
Index: tracer.c
===================================================================
--- tracer.c	(revision 189457)
+++ tracer.c	(working copy)
@@ -44,7 +44,6 @@
 #include "basic-block.h"
 #include "fibheap.h"
 #include "flags.h"
-#include "timevar.h"
 #include "params.h"
 #include "coverage.h"
 #include "tree-pass.h"
Index: mode-switching.c
===================================================================
--- mode-switching.c	(revision 189457)
+++ mode-switching.c	(working copy)
@@ -33,7 +33,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm_p.h"
 #include "function.h"
 #include "tree-pass.h"
-#include "timevar.h"
 #include "df.h"
 #include "emit-rtl.h"
 
Index: lto-streamer-in.c
===================================================================
--- lto-streamer-in.c	(revision 189457)
+++ lto-streamer-in.c	(working copy)
@@ -42,7 +42,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "except.h"
 #include "debug.h"
 #include "vec.h"
-#include "timevar.h"
 #include "ipa-utils.h"
 #include "data-streamer.h"
 #include "gimple-streamer.h"
Index: print-tree.c
===================================================================
--- print-tree.c	(revision 189457)
+++ print-tree.c	(working copy)
@@ -31,7 +31,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "diagnostic.h"
 #include "gimple-pretty-print.h"
 #include "tree-flow.h"
-#include "tree-pass.h"
+#include "dumpfile.h"
 
 /* Define the hash table of nodes already seen.
    Such nodes are not repeated; brief cross-references are used.  */
Index: omp-low.c
===================================================================
--- omp-low.c	(revision 189457)
+++ omp-low.c	(working copy)
@@ -34,7 +34,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "langhooks.h"
 #include "diagnostic-core.h"
 #include "tree-flow.h"
-#include "timevar.h"
 #include "flags.h"
 #include "function.h"
 #include "expr.h"
Index: tree-ssa-loop-manip.c
===================================================================
--- tree-ssa-loop-manip.c	(revision 189457)
+++ tree-ssa-loop-manip.c	(working copy)
@@ -26,10 +26,9 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm_p.h"
 #include "basic-block.h"
 #include "tree-flow.h"
-#include "tree-dump.h"
-#include "timevar.h"
+#include "dumpfile.h"
 #include "cfgloop.h"
-#include "tree-pass.h"
+#include "tree-pass.h"	/* ??? for TODO_update_ssa but this isn't a pass.  */
 #include "tree-scalar-evolution.h"
 #include "params.h"
 #include "tree-inline.h"
Index: tree-call-cdce.c
===================================================================
--- tree-call-cdce.c	(revision 189457)
+++ tree-call-cdce.c	(working copy)
@@ -28,9 +28,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "gimple-pretty-print.h"
 #include "tree-flow.h"
 #include "gimple.h"
-#include "tree-dump.h"
 #include "tree-pass.h"
-#include "timevar.h"
 #include "flags.h"
 \f
 
Index: cgraph.c
===================================================================
--- cgraph.c	(revision 189457)
+++ cgraph.c	(working copy)
@@ -41,7 +41,8 @@ along with GCC; see the file COPYING3.  If not see
 #include "cgraph.h"
 #include "intl.h"
 #include "gimple.h"
-#include "tree-dump.h"
+#include "timevar.h"
+#include "dumpfile.h"
 #include "tree-flow.h"
 #include "value-prof.h"
 #include "except.h"
@@ -53,6 +54,9 @@ along with GCC; see the file COPYING3.  If not see
 #include "cfgloop.h"
 #include "gimple-pretty-print.h"
 
+/* FIXME: Only for PROP_loops, but cgraph shouldn't have to know about this.  */
+#include "tree-pass.h"
+
 static void cgraph_node_remove_callers (struct cgraph_node *node);
 static inline void cgraph_edge_remove_caller (struct cgraph_edge *e);
 static inline void cgraph_edge_remove_callee (struct cgraph_edge *e);
Index: ipa-pure-const.c
===================================================================
--- ipa-pure-const.c	(revision 189457)
+++ ipa-pure-const.c	(working copy)
@@ -47,7 +47,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "gimple.h"
 #include "cgraph.h"
 #include "flags.h"
-#include "timevar.h"
 #include "diagnostic.h"
 #include "gimple-pretty-print.h"
 #include "langhooks.h"
Index: tree-vect-loop-manip.c
===================================================================
--- tree-vect-loop-manip.c	(revision 189457)
+++ tree-vect-loop-manip.c	(working copy)
@@ -27,10 +27,9 @@ along with GCC; see the file COPYING3.  If not see
 #include "ggc.h"
 #include "tree.h"
 #include "basic-block.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
 #include "tree-flow.h"
-#include "tree-dump.h"
+#include "tree-pass.h"
 #include "cfgloop.h"
 #include "diagnostic-core.h"
 #include "tree-scalar-evolution.h"
Index: tree-ssa-loop-ivcanon.c
===================================================================
--- tree-ssa-loop-ivcanon.c	(revision 189457)
+++ tree-ssa-loop-ivcanon.c	(working copy)
@@ -40,10 +40,8 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "tm_p.h"
 #include "basic-block.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
 #include "tree-flow.h"
-#include "tree-dump.h"
 #include "cfgloop.h"
 #include "tree-pass.h"
 #include "tree-chrec.h"
Index: tree-vectorizer.c
===================================================================
--- tree-vectorizer.c	(revision 189457)
+++ tree-vectorizer.c	(working copy)
@@ -63,11 +63,9 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "tree-pretty-print.h"
 #include "tree-flow.h"
-#include "tree-dump.h"
 #include "cfgloop.h"
 #include "tree-vectorizer.h"
 #include "tree-pass.h"
-#include "timevar.h"
 
 /* vect_dump will be set to stderr or dump_file if exist.  */
 FILE *vect_dump;
Index: trans-mem.c
===================================================================
--- trans-mem.c	(revision 189457)
+++ trans-mem.c	(working copy)
@@ -32,7 +32,6 @@
 #include "params.h"
 #include "target.h"
 #include "langhooks.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
 #include "cfgloop.h"
 
Index: tree-ssa-alias.c
===================================================================
--- tree-ssa-alias.c	(revision 189457)
+++ tree-ssa-alias.c	(working copy)
@@ -27,18 +27,16 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm_p.h"
 #include "target.h"
 #include "basic-block.h"
-#include "timevar.h"
+#include "timevar.h"	/* for TV_ALIAS_STMT_WALK */
 #include "ggc.h"
 #include "langhooks.h"
 #include "flags.h"
 #include "function.h"
 #include "tree-pretty-print.h"
-#include "tree-dump.h"
+#include "dumpfile.h"
 #include "gimple.h"
 #include "tree-flow.h"
 #include "tree-inline.h"
-#include "tree-pass.h"
-#include "convert.h"
 #include "params.h"
 #include "vec.h"
 #include "bitmap.h"
Index: tree-ssa-loop-ivopts.c
===================================================================
--- tree-ssa-loop-ivopts.c	(revision 189457)
+++ tree-ssa-loop-ivopts.c	(working copy)
@@ -69,11 +69,8 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "tm_p.h"
 #include "basic-block.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
 #include "tree-flow.h"
-#include "tree-dump.h"
-#include "timevar.h"
 #include "cfgloop.h"
 #include "tree-pass.h"
 #include "ggc.h"
Index: ipa-reference.c
===================================================================
--- ipa-reference.c	(revision 189457)
+++ ipa-reference.c	(working copy)
@@ -54,7 +54,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "gimple.h"
 #include "cgraph.h"
 #include "flags.h"
-#include "timevar.h"
 #include "diagnostic.h"
 #include "langhooks.h"
 #include "data-streamer.h"
Index: ipa-cp.c
===================================================================
--- ipa-cp.c	(revision 189457)
+++ ipa-cp.c	(working copy)
@@ -112,10 +112,9 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-flow.h"
 #include "tree-pass.h"
 #include "flags.h"
-#include "timevar.h"
 #include "diagnostic.h"
 #include "tree-pretty-print.h"
-#include "tree-dump.h"
+#include "dumpfile.h"
 #include "tree-inline.h"
 #include "fibheap.h"
 #include "params.h"
Index: cfgloopmanip.c
===================================================================
--- cfgloopmanip.c	(revision 189457)
+++ cfgloopmanip.c	(working copy)
@@ -23,11 +23,10 @@ along with GCC; see the file COPYING3.  If not see
 #include "coretypes.h"
 #include "tm.h"
 #include "rtl.h"
-#include "hard-reg-set.h"
-#include "obstack.h"
 #include "basic-block.h"
 #include "cfgloop.h"
 #include "tree-flow.h"
+#include "dumpfile.h"
 
 static void copy_loops_to (struct loop **, int,
 			   struct loop *);
Index: df-core.c
===================================================================
--- df-core.c	(revision 189457)
+++ df-core.c	(working copy)
@@ -391,7 +391,6 @@ are write-only operations.
 #include "basic-block.h"
 #include "sbitmap.h"
 #include "bitmap.h"
-#include "timevar.h"
 #include "df.h"
 #include "tree-pass.h"
 #include "params.h"
Index: cfgexpand.c
===================================================================
--- cfgexpand.c	(revision 189457)
+++ cfgexpand.c	(working copy)
@@ -30,13 +30,11 @@ along with GCC; see the file COPYING3.  If not see
 #include "expr.h"
 #include "langhooks.h"
 #include "tree-flow.h"
-#include "timevar.h"
-#include "tree-dump.h"
+#include "dumpfile.h"
 #include "tree-pass.h"
 #include "except.h"
 #include "flags.h"
 #include "diagnostic.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
 #include "toplev.h"
 #include "debug.h"
Index: bb-reorder.c
===================================================================
--- bb-reorder.c	(revision 189457)
+++ bb-reorder.c	(working copy)
@@ -72,7 +72,6 @@
 #include "rtl.h"
 #include "regs.h"
 #include "flags.h"
-#include "timevar.h"
 #include "output.h"
 #include "fibheap.h"
 #include "target.h"
Index: tree-ssa-phiopt.c
===================================================================
--- tree-ssa-phiopt.c	(revision 189457)
+++ tree-ssa-phiopt.c	(working copy)
@@ -27,16 +27,13 @@ along with GCC; see the file COPYING3.  If not see
 #include "flags.h"
 #include "tm_p.h"
 #include "basic-block.h"
-#include "timevar.h"
 #include "tree-flow.h"
 #include "tree-pass.h"
-#include "tree-dump.h"
 #include "langhooks.h"
 #include "pointer-set.h"
 #include "domwalk.h"
 #include "cfgloop.h"
 #include "tree-data-ref.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
 #include "insn-config.h"
 #include "expr.h"
Index: function.c
===================================================================
--- function.c	(revision 189457)
+++ function.c	(working copy)
@@ -61,7 +61,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-pass.h"
 #include "predict.h"
 #include "df.h"
-#include "timevar.h"
 #include "vecprim.h"
 #include "params.h"
 #include "bb-reorder.h"
Index: ira-emit.c
===================================================================
--- ira-emit.c	(revision 189457)
+++ ira-emit.c	(working copy)
@@ -82,8 +82,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "expr.h"
 #include "recog.h"
 #include "params.h"
-#include "timevar.h"
-#include "tree-pass.h"
 #include "reload.h"
 #include "df.h"
 #include "ira-int.h"
Index: ira.c
===================================================================
--- ira.c	(revision 189457)
+++ ira.c	(working copy)
@@ -374,7 +374,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "expr.h"
 #include "recog.h"
 #include "params.h"
-#include "timevar.h"
 #include "tree-pass.h"
 #include "output.h"
 #include "except.h"
Index: combine-stack-adj.c
===================================================================
--- combine-stack-adj.c	(revision 189457)
+++ combine-stack-adj.c	(working copy)
@@ -57,7 +57,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "df.h"
 #include "except.h"
 #include "reload.h"
-#include "timevar.h"
 #include "tree-pass.h"
 
 \f
Index: tree-ssa-phiprop.c
===================================================================
--- tree-ssa-phiprop.c	(revision 189457)
+++ tree-ssa-phiprop.c	(working copy)
@@ -25,12 +25,9 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "tm_p.h"
 #include "basic-block.h"
-#include "timevar.h"
-#include "tree-pretty-print.h"
 #include "gimple-pretty-print.h"
 #include "tree-flow.h"
 #include "tree-pass.h"
-#include "tree-dump.h"
 #include "langhooks.h"
 #include "flags.h"
 
Index: config/epiphany/epiphany.c
===================================================================
--- config/epiphany/epiphany.c	(revision 189457)
+++ config/epiphany/epiphany.c	(working copy)
@@ -45,7 +45,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "insn-codes.h"
 #include "ggc.h"
 #include "tm-constrs.h"
-#include "tree-pass.h"
+#include "tree-pass.h"	/* for current_pass */
 
 /* Which cpu we're compiling for.  */
 int epiphany_cpu_type;
Index: config/mn10300/mn10300.c
===================================================================
--- config/mn10300/mn10300.c	(revision 189457)
+++ config/mn10300/mn10300.c	(working copy)
@@ -46,6 +46,7 @@
 #include "df.h"
 #include "opts.h"
 #include "cfgloop.h"
+#include "dumpfile.h"
 
 /* This is used in the am33_2.0-linux-gnu port, in which global symbol
    names are not prefixed by underscores, to tell whether to prefix a
Index: config/c6x/c6x.c
===================================================================
--- config/c6x/c6x.c	(revision 189457)
+++ config/c6x/c6x.c	(working copy)
@@ -51,6 +51,7 @@
 #include "opts.h"
 #include "hw-doloop.h"
 #include "regrename.h"
+#include "dumpfile.h"
 
 /* Table of supported architecture variants.  */
 typedef struct
Index: config/ia64/ia64.c
===================================================================
--- config/ia64/ia64.c	(revision 189457)
+++ config/ia64/ia64.c	(working copy)
@@ -61,6 +61,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "sel-sched.h"
 #include "reload.h"
 #include "opts.h"
+#include "dumpfile.h"
 
 /* This is used for communication between ASM_OUTPUT_LABEL and
    ASM_OUTPUT_LABELREF.  */
Index: config/arm/arm.c
===================================================================
--- config/arm/arm.c	(revision 189457)
+++ config/arm/arm.c	(working copy)
@@ -55,6 +55,7 @@
 #include "libfuncs.h"
 #include "params.h"
 #include "opts.h"
+#include "dumpfile.h"
 
 /* Forward definitions of types.  */
 typedef struct minipool_node    Mnode;
Index: config/rl78/rl78.c
===================================================================
--- config/rl78/rl78.c	(revision 189457)
+++ config/rl78/rl78.c	(working copy)
@@ -47,7 +47,7 @@
 #include "target-def.h"
 #include "langhooks.h"
 #include "rl78-protos.h"
-#include "tree-pass.h"
+#include "dumpfile.h"
 \f
 static inline bool is_interrupt_func (const_tree decl);
 static inline bool is_brk_interrupt_func (const_tree decl);
Index: config/bfin/bfin.c
===================================================================
--- config/bfin/bfin.c	(revision 189457)
+++ config/bfin/bfin.c	(working copy)
@@ -56,6 +56,7 @@
 #include "sel-sched.h"
 #include "hw-doloop.h"
 #include "opts.h"
+#include "dumpfile.h"
 
 /* A C structure for machine-specific, per-function data.
    This is added to the cfun structure.  */
Index: config/frv/frv.c
===================================================================
--- config/frv/frv.c	(revision 189457)
+++ config/frv/frv.c	(working copy)
@@ -48,6 +48,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "targhooks.h"
 #include "langhooks.h"
 #include "df.h"
+#include "dumpfile.h"
 
 #ifndef FRV_INLINE
 #define FRV_INLINE inline
Index: config/spu/spu.c
===================================================================
--- config/spu/spu.c	(revision 189457)
+++ config/spu/spu.c	(working copy)
@@ -52,6 +52,7 @@
 #include "sbitmap.h"
 #include "timevar.h"
 #include "df.h"
+#include "dumpfile.h"
 
 /* Builtin types, data and prototypes. */
 
Index: config/mep/mep.c
===================================================================
--- config/mep/mep.c	(revision 189457)
+++ config/mep/mep.c	(working copy)
@@ -51,6 +51,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "df.h"
 #include "gimple.h"
 #include "opts.h"
+#include "dumpfile.h"
 
 /* Structure of this file:
 
Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c	(revision 189457)
+++ config/i386/i386.c	(working copy)
@@ -61,6 +61,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "fibheap.h"
 #include "opts.h"
 #include "diagnostic.h"
+#include "dumpfile.h"
 
 enum upper_128bits_state
 {
Index: config/avr/avr-log.c
===================================================================
--- config/avr/avr-log.c	(revision 189457)
+++ config/avr/avr-log.c	(working copy)
@@ -28,7 +28,7 @@
 #include "input.h"
 #include "function.h"
 #include "tm_p.h"
-#include "tree-pass.h"
+#include "tree-pass.h"	/* for current_pass */
 
 /* This file supplies some functions for AVR back-end developers
    with a printf-like interface.  The functions are called through
Index: c-family/c-gimplify.c
===================================================================
--- c-family/c-gimplify.c	(revision 189457)
+++ c-family/c-gimplify.c	(working copy)
@@ -36,7 +36,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "langhooks.h"
 #include "langhooks-def.h"
 #include "flags.h"
-#include "tree-dump.h"
+#include "dumpfile.h"
 #include "c-pretty-print.h"
 #include "cgraph.h"
 
Index: c-family/c-ada-spec.c
===================================================================
--- c-family/c-ada-spec.c	(revision 189457)
+++ c-family/c-ada-spec.c	(working copy)
@@ -24,7 +24,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "coretypes.h"
 #include "tm.h"
 #include "tree.h"
-#include "tree-pass.h"	/* For TDI_ada and friends.  */
+#include "dumpfile.h"
 #include "c-ada-spec.h"
 #include "cpplib.h"
 #include "c-pragma.h"
Index: c-family/c-dump.c
===================================================================
--- c-family/c-dump.c	(revision 189457)
+++ c-family/c-dump.c	(working copy)
@@ -26,15 +26,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-dump.h"
 #include "c-common.h"
 
-/* Dump information common to statements from STMT.  */
-
-void
-dump_stmt (dump_info_p di, const_tree t)
-{
-  if (EXPR_HAS_LOCATION (t))
-    dump_int (di, "line", EXPR_LINENO (t));
-}
-
 /* Dump any C-specific tree codes and attributes of common codes.  */
 
 bool
Index: c/c-decl.c
===================================================================
--- c/c-decl.c	(revision 189457)
+++ c/c-decl.c	(working copy)
@@ -51,7 +51,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "langhooks.h"
 #include "tree-iterator.h"
 #include "diagnostic-core.h"
-#include "tree-dump.h"
+#include "dumpfile.h"
 #include "cgraph.h"
 #include "hashtab.h"
 #include "langhooks-def.h"
Index: cp/dump.c
===================================================================
--- cp/dump.c	(revision 189457)
+++ cp/dump.c	(working copy)
@@ -202,6 +202,15 @@ dump_op (dump_info_p di, tree t)
   }
 }
 
+/* Dump information common to statements from STMT.  */
+
+static void
+dump_stmt (dump_info_p di, const_tree t)
+{
+  if (EXPR_HAS_LOCATION (t))
+    dump_int (di, "line", EXPR_LINENO (t));
+}
+
 bool
 cp_dump_tree (void* dump_info, tree t)
 {
Index: cp/optimize.c
===================================================================
--- cp/optimize.c	(revision 189457)
+++ cp/optimize.c	(working copy)
@@ -34,7 +34,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "flags.h"
 #include "langhooks.h"
 #include "diagnostic-core.h"
-#include "tree-dump.h"
+#include "dumpfile.h"
 #include "gimple.h"
 #include "tree-iterator.h"
 #include "cgraph.h"
Index: cp/class.c
===================================================================
--- cp/class.c	(revision 189457)
+++ cp/class.c	(working copy)
@@ -35,7 +35,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "target.h"
 #include "convert.h"
 #include "cgraph.h"
-#include "tree-dump.h"
+#include "dumpfile.h"
 #include "splay-tree.h"
 #include "pointer-set.h"
 
Index: cp/decl2.c
===================================================================
--- cp/decl2.c	(revision 189457)
+++ cp/decl2.c	(working copy)
@@ -45,7 +45,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "cgraph.h"
 #include "tree-inline.h"
 #include "c-family/c-pragma.h"
-#include "tree-dump.h"
+#include "dumpfile.h"
 #include "intl.h"
 #include "gimple.h"
 #include "pointer-set.h"
Index: fortran/f95-lang.c
===================================================================
--- fortran/f95-lang.c	(revision 189457)
+++ fortran/f95-lang.c	(working copy)
@@ -42,7 +42,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "target.h"
 #include "debug.h"
 #include "diagnostic.h"
-#include "tree-dump.h"
+#include "dumpfile.h"
 #include "cgraph.h"
 #include "gfortran.h"
 #include "cpp.h"
Index: java/java-gimplify.c
===================================================================
--- java/java-gimplify.c	(revision 189457)
+++ java/java-gimplify.c	(working copy)
@@ -27,7 +27,7 @@ The Free Software Foundation is independent of Sun
 #include "coretypes.h"
 #include "tree.h"
 #include "java-tree.h"
-#include "tree-dump.h"
+#include "dumpfile.h"
 #include "gimple.h"
 
 static tree java_gimplify_block (tree);
Index: lto/lto.c
===================================================================
--- lto/lto.c	(revision 189457)
+++ lto/lto.c	(working copy)
@@ -38,7 +38,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "ipa-prop.h"
 #include "common.h"
 #include "debug.h"
-#include "timevar.h"
 #include "gimple.h"
 #include "lto.h"
 #include "lto-tree.h"

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] Introduce dumpfile.h, clean up tree-pass.h dependencies
  2012-07-13 13:39 [patch] Introduce dumpfile.h, clean up tree-pass.h dependencies Steven Bosscher
@ 2012-07-16  9:00 ` Richard Guenther
  2012-07-16  9:12   ` Steven Bosscher
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Guenther @ 2012-07-16  9:00 UTC (permalink / raw)
  To: Steven Bosscher; +Cc: GCC Patches

On Fri, Jul 13, 2012 at 3:38 PM, Steven Bosscher <stevenb.gcc@gmail.com> wrote:
> Hello,
>
> The attached monster patch re-organizes a lot of includes to avoid
> dependencies on tree-pass.h just for having dump_file available.
>
> I've used the following "rules" to decide what needs to go where:
>
> * tree-dump.h should be independent of the pass manager, i.e. not
> include tree-pass.h.
>
> * passes that do not need dumping of GENERIC do not need tree-dump.h either.
>
> * Any file that defines an opt_pass may include tree-pass.h.
>
> * If a file includes tree-pass.h, it does not need to include
> dumpfile.h or timevar.h, because tree-pass.h provides these already
> (the *opt_pass structs depend on them)
>
> * If a file does not include tree-pass.h, but it needs dump_file, it
> should include dumpfile.h. Likewise for timevar.h. This category of
> files are the implementation files for supporting code, like alias.c
> and cfg*.c.
>
> With those rules in mind, my hackathon started and the result is
> attached. I had to move a few functions around, but not very much. I
> also uncovered a bug in one of the DF files, where it was trying to
> use get_insns without including emit-rtl.h.  No DF file should emit
> RTL, so I don't want to include emit-rtl.h there, so I removed that
> dumping (which was only for debugging purposes anyway, and obviously
> not tested in a while or I wouldn't have run into this problem to
> begin with :-)
>
> Bootstrapped&tested on powerpc64-unknown-linux-gnu and on
> x86_64-unknown-linux-gnu. OK for trunk?

You moved get_ref_base_and_extent to tree.c - any reason for that?
It is similar to get_inner_reference which is in expr.c and similar to
get_addr_base_and_unit_offset which is still in tree-dfa.c.  I'd prefer
to have it stay where it is for this patch.

Thus, ok with that change.

Thanks,
Richard.

> Ciao!
> Steven
>
>
>         * system.h (dump_file): Do not define.
>         * tree-pass.h: Include dumpfile.h, which is a new file containing...
>         (enum tree_dump_index, TDF_*, get_dump_file_name, dump_enabled_p,
>         dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p,
>         dump_flag_name, dump_file, dump_flags, dump_file_name,
>         get_dump_file_info, struct dump_file_info): all of this, moved to...
>         * dumpfile.h: Here, new file.
>         * tree-dump.h: Include dumpfile.h, but not tree-pass.h.
>         (dump_stmt): Remove prototype for C++ specific function.
>         (dump_enumerated_decls): Move prototype from here...
>         * tree-flow.h (dump_enumerated_decls): ... to here.
>         (get_ref_base_and_extent) Move prototype from here ...
>         * tree.h (get_ref_base_and_extent) ... to here.
>         * tree-ssa-live.c: Do not inclde tree-pretty-print.h, because
>         gimple-pretty-print.h is enough.  Do not include tree-dump.h,
>         include timevar.h and dumpfile.h instead.
>         (struct numbered_tree_d, compare_decls_by_uid,
>         dump_enumerated_decls_push, dump_enumerated_decls): Move from here ...
>         * tree-dfa.c:(struct numbered_tree_d, compare_decls_by_uid,
>         dump_enumerated_decls_push, dump_enumerated_decls):... to here.
>         Do not include timevar.h.
>         (get_ref_base_and_extent): Move from here ...
>         * tree.c (get_ref_base_and_extent): ... to here.
>         Do not include timevar.h.
>         * tree-cfg.c: Do not include langhooks.h, tree-pretty-print.h, and
>         timevar.h.
>         (dump_cfg_stats): Use current_function_name.
>         (gimple_cfg2vcg): Likewise.
>         (dump_function_to_file): Likewise.
>         * df-scan.c: Do not include tree-pass.h and timevar.h.
>         Include dumpfile.h.
>         (df_entry_block_bitmap_verify, df_exit_block_bitmap_verify): Do not
>         use print_current_pass.
>         * df-problems.c: Include dumpfile.h.
>         Always define REG_DEAD_DEBUGGING, avoid #ifdef code, because it
>         leads to errors in the code not selected.
>         (df_note_compute): Do not print_rtl_with_bb here.  Fix compilation
>         bug if REG_DEAD_DEBUGGING is not 0, get_insns is not available here.
>         * lcm.c: Include dumpfile.h.
>         Remove obsolete include of insn-attr.h.
>         * dojump.c (do_compare_rtx_and_jump): Remove failure printing for
>         missing probability notes.
>         * stmt.c: Include dumpfile.h.
>         (emit_case_decision_tree): Re-enable printing expand details only
>         if TDF_DETAILS.
>         * alias.c, auto-inc-dec.c, bb-reorder.c, caller-save.c, cfg.c,
>         cfgcleanup.c, cfgexpand.c, cfgloop.c, cfgloopmanip.c, cgraph.c,
>         cgraphclones.c, cgraphunit.c, combine.c, combine-stack-adj.c,
>         coverage.c, cprop.c, cse.c, cselib.c, dbgcnt.c, dce.c, df-core.c,
>         dse.c, dwarf2out.c, emit-rtl.c, except.c, expr.c, final.c,
>         function.c, fwprop.c, gcse.c, gimple-fold.c,
>         gimple-pretty-print.c, gimple-ssa-strength-reduction.c,
>         gimplify.c, graphite-blocking.c, graphite-clast-to-gimple.c,
>         graphite-dependences.c, graphite-interchange.c,
>         graphite-optimize-isl.c, graphite-poly.c,
>         graphite-sese-to-poly.c, haifa-sched.c, hw-doloop.c, ifcvt.c,
>         ipa.c, ipa-cp.c, ipa-inline-analysis.c, ipa-inline.c,
>         ipa-inline-transform.c, ipa-prop.c, ipa-pure-const.c,
>         ipa-reference.c, ipa-split.c, ipa-utils.c, ira.c, ira-emit.c,
>         jump.c, loop-doloop.c, loop-init.c, loop-invariant.c, loop-iv.c,
>         loop-unroll.c, loop-unswitch.c, lower-subreg.c,
>         lto-section-out.c, lto-streamer-in.c, matrix-reorg.c, mcf.c,
>         mode-switching.c, modulo-sched.c, omega.c, omp-low.c, passes.c,
>         postreload.c, postreload-gcse.c, predict.c, print-rtl.c,
>         print-tree.c, profile.c, recog.c, ree.c, regcprop.c, reginfo.c,
>         regmove.c, regrename.c, reg-stack.c, reload1.c, reorg.c,
>         sched-rgn.c, sched-vis.c, sel-sched.c, sel-sched-ir.c,
>         store-motion.c, tracer.c, trans-mem.c, tree-affine.c,
>         tree-call-cdce.c, tree-cfgcleanup.c, tree-chrec.c,
>         tree-data-ref.c, tree-diagnostic.c, tree-dump.c,
>         tree-eh.c, tree-flow-inline.h, tree-if-conv.c, tree-into-ssa.c,
>         tree-mudflap.c, tree-nrv.c, tree-object-size.c,
>         tree-optimize.c, tree-outof-ssa.c, tree-predcom.c,
>         tree-pretty-print.c, tree-profile.c, tree-scalar-evolution.c,
>         tree-sra.c, tree-ssa-address.c, tree-ssa-alias.c, tree-ssa.c,
>         tree-ssa-ccp.c, tree-ssa-coalesce.c, tree-ssa-copy.c,
>         tree-ssa-copyrename.c,, tree-ssa-dce.c, tree-ssa-dom.c,
>         tree-ssa-dse.c, tree-ssa-forwprop.c, tree-ssa-ifcombine.c,
>         tree-ssa-loop.c, tree-ssa-loop-ch.c, tree-ssa-loop-im.c,
>         tree-ssa-loop-ivcanon.c, tree-ssa-loop-ivopts.c,
>         tree-ssa-loop-manip.c, tree-ssa-loop-niter.c,
>         tree-ssa-loop-prefetch.c, tree-ssa-loop-unswitch.c,
>         tree-ssa-math-opts.c, tree-ssa-operands.c, tree-ssa-phiopt.c,
>         tree-ssa-phiprop.c, tree-ssa-pre.c, tree-ssa-propagate.c,
>         tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-ssa-sink.c,
>         tree-ssa-structalias.c, tree-ssa-tail-merge.c, tree-ssa-ter.c,
>         tree-ssa-threadedge.c, tree-ssa-threadupdate.c,
>         tree-ssa-uncprop.c, tree-ssa-uninit.c,
>         tree-switch-conversion.c, tree-tailcall.c,
>         tree-vect-data-refs.c, tree-vect-loop.c,
>         tree-vect-loop-manip.c, tree-vectorizer.c,
>         tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c,
>         tree-vrp.c, value-prof.c, var-tracking.c, web.c: Include tree-pass.h
>         only if needed.  If tree-pass.h is included, do not include timevar.h
>         and dumpfile.h.  If tree-pass.h is not included but dump_file, or
>         dump_flags, or the TDF_* flags are used, include dumpfile.h.
>         If gimple-pretty-print.h is included, don't include tree-pretty-print.h.
>         Remove assorted unnecessary includes.
>         * Makefile.in: Fix dependencies.
>
>         * config/mn10300/mn10300.c, config/c6x/c6x.c, config/ia64/ia64.c,
>         config/arm/arm.c, config/bfin/bfin.c, config/frv/frv.c,
>         config/spu/spu.c, config/mep/mep.c, config/i386/i386.c:
>         Include dumpfile.h.
>         * config/rl78/rl78.c: Include dumpfile.h instead of tree-pass.h.
>
> c-family/
>         * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
>         * c-ada-spec.c: Likewise.
>         * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
>         * Make-lang.in: Fix dependencies.
>
> c/
>         * c-decl.c: Include dumpfile.h instead of tree-dump.h.
>         * Make-lang.in: Fix dependencies.
>
> cp/
>         * dump.c (dump_stmt): Moved here from c-dump.c.
>         * optimize.c: Include dumpfile.h instead of tree-dump.h.
>         * class.c: Likewise.
>         * decl2.c: Likewise.
>         * Make-lang.in: Fix dependencies.
>
> fortran/
>         * f95-lang.c: Include dumpfile.h instead of tree-dump.h.
>         * Make-lang.in: Fix dependencies.
>
> java/
>         * java-gimplify.c Include dumpfile.h instead of tree-dump.h
>         * Make-lang.in: Fix dependencies.
>
> lto/
>         * lto.c: Do not include timevar.h.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] Introduce dumpfile.h, clean up tree-pass.h dependencies
  2012-07-16  9:00 ` Richard Guenther
@ 2012-07-16  9:12   ` Steven Bosscher
  2012-07-16 11:49     ` Richard Guenther
  0 siblings, 1 reply; 5+ messages in thread
From: Steven Bosscher @ 2012-07-16  9:12 UTC (permalink / raw)
  To: Richard Guenther; +Cc: GCC Patches

On Mon, Jul 16, 2012 at 11:00 AM, Richard Guenther
<richard.guenther@gmail.com> wrote:
> On Fri, Jul 13, 2012 at 3:38 PM, Steven Bosscher <stevenb.gcc@gmail.com> wrote:
>> Hello,
>>
>> The attached monster patch re-organizes a lot of includes to avoid
>> dependencies on tree-pass.h just for having dump_file available.
>>
>> I've used the following "rules" to decide what needs to go where:
>>
>> * tree-dump.h should be independent of the pass manager, i.e. not
>> include tree-pass.h.
>>
>> * passes that do not need dumping of GENERIC do not need tree-dump.h either.
>>
>> * Any file that defines an opt_pass may include tree-pass.h.
>>
>> * If a file includes tree-pass.h, it does not need to include
>> dumpfile.h or timevar.h, because tree-pass.h provides these already
>> (the *opt_pass structs depend on them)
>>
>> * If a file does not include tree-pass.h, but it needs dump_file, it
>> should include dumpfile.h. Likewise for timevar.h. This category of
>> files are the implementation files for supporting code, like alias.c
>> and cfg*.c.
>>
>> With those rules in mind, my hackathon started and the result is
>> attached. I had to move a few functions around, but not very much. I
>> also uncovered a bug in one of the DF files, where it was trying to
>> use get_insns without including emit-rtl.h.  No DF file should emit
>> RTL, so I don't want to include emit-rtl.h there, so I removed that
>> dumping (which was only for debugging purposes anyway, and obviously
>> not tested in a while or I wouldn't have run into this problem to
>> begin with :-)
>>
>> Bootstrapped&tested on powerpc64-unknown-linux-gnu and on
>> x86_64-unknown-linux-gnu. OK for trunk?
>
> You moved get_ref_base_and_extent to tree.c - any reason for that?

Yes, tree.c uses it (build_simple_mem_ref_loc) and I don't want tree.c
to depend on tree-dfa.c. Longer-term I'd like to split tree.c and
tree.h, and this function and the two others you mention below could
go into e.g. tree-anal.c.

> It is similar to get_inner_reference which is in expr.c and similar to
> get_addr_base_and_unit_offset which is still in tree-dfa.c.  I'd prefer
> to have it stay where it is for this patch.

OK.

Ciao!
Steven

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] Introduce dumpfile.h, clean up tree-pass.h dependencies
  2012-07-16  9:12   ` Steven Bosscher
@ 2012-07-16 11:49     ` Richard Guenther
  2012-07-16 11:57       ` Steven Bosscher
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Guenther @ 2012-07-16 11:49 UTC (permalink / raw)
  To: Steven Bosscher; +Cc: GCC Patches

On Mon, Jul 16, 2012 at 11:12 AM, Steven Bosscher <stevenb.gcc@gmail.com> wrote:
> On Mon, Jul 16, 2012 at 11:00 AM, Richard Guenther
> <richard.guenther@gmail.com> wrote:
>> On Fri, Jul 13, 2012 at 3:38 PM, Steven Bosscher <stevenb.gcc@gmail.com> wrote:
>>> Hello,
>>>
>>> The attached monster patch re-organizes a lot of includes to avoid
>>> dependencies on tree-pass.h just for having dump_file available.
>>>
>>> I've used the following "rules" to decide what needs to go where:
>>>
>>> * tree-dump.h should be independent of the pass manager, i.e. not
>>> include tree-pass.h.
>>>
>>> * passes that do not need dumping of GENERIC do not need tree-dump.h either.
>>>
>>> * Any file that defines an opt_pass may include tree-pass.h.
>>>
>>> * If a file includes tree-pass.h, it does not need to include
>>> dumpfile.h or timevar.h, because tree-pass.h provides these already
>>> (the *opt_pass structs depend on them)
>>>
>>> * If a file does not include tree-pass.h, but it needs dump_file, it
>>> should include dumpfile.h. Likewise for timevar.h. This category of
>>> files are the implementation files for supporting code, like alias.c
>>> and cfg*.c.
>>>
>>> With those rules in mind, my hackathon started and the result is
>>> attached. I had to move a few functions around, but not very much. I
>>> also uncovered a bug in one of the DF files, where it was trying to
>>> use get_insns without including emit-rtl.h.  No DF file should emit
>>> RTL, so I don't want to include emit-rtl.h there, so I removed that
>>> dumping (which was only for debugging purposes anyway, and obviously
>>> not tested in a while or I wouldn't have run into this problem to
>>> begin with :-)
>>>
>>> Bootstrapped&tested on powerpc64-unknown-linux-gnu and on
>>> x86_64-unknown-linux-gnu. OK for trunk?
>>
>> You moved get_ref_base_and_extent to tree.c - any reason for that?
>
> Yes, tree.c uses it (build_simple_mem_ref_loc) and I don't want tree.c
> to depend on tree-dfa.c. Longer-term I'd like to split tree.c and
> tree.h, and this function and the two others you mention below could
> go into e.g. tree-anal.c.
>
>> It is similar to get_inner_reference which is in expr.c and similar to
>> get_addr_base_and_unit_offset which is still in tree-dfa.c.  I'd prefer
>> to have it stay where it is for this patch.
>
> OK.

Seems to break build with graphite for me:

/space/rguenther/src/svn/trunk/gcc/graphite-dependences.c: In function
'graphite_legal_transform':
/space/rguenther/src/svn/trunk/gcc/graphite-dependences.c:534:
warning: implicit declaration of function 'timevar_push'
/space/rguenther/src/svn/trunk/gcc/graphite-dependences.c:534: error:
'TV_GRAPHITE_DATA_DEPS' undeclared (first use in this function)
...
/space/rguenther/src/svn/trunk/gcc/graphite-clast-to-gimple.c: In
function 'translate_clast_user':
/space/rguenther/src/svn/trunk/gcc/graphite-clast-to-gimple.c:1102:
error: 'TODO_update_ssa' undeclared (first use in this function)
...
/space/rguenther/src/svn/trunk/gcc/graphite-clast-to-gimple.c:1644:
error: 'TV_GRAPHITE_CODE_GEN' undeclared (first use in this function)
...

/space/rguenther/src/svn/trunk/gcc/graphite-sese-to-poly.c:2341:
error: 'TODO_update_ssa' undeclared (first use in this function)
...

> Ciao!
> Steven

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] Introduce dumpfile.h, clean up tree-pass.h dependencies
  2012-07-16 11:49     ` Richard Guenther
@ 2012-07-16 11:57       ` Steven Bosscher
  0 siblings, 0 replies; 5+ messages in thread
From: Steven Bosscher @ 2012-07-16 11:57 UTC (permalink / raw)
  To: Richard Guenther; +Cc: GCC Patches

On Mon, Jul 16, 2012 at 1:49 PM, Richard Guenther
<richard.guenther@gmail.com> wrote:
> On Mon, Jul 16, 2012 at 11:12 AM, Steven Bosscher <stevenb.gcc@gmail.com> wrote:
>> On Mon, Jul 16, 2012 at 11:00 AM, Richard Guenther
>> <richard.guenther@gmail.com> wrote:
>>> On Fri, Jul 13, 2012 at 3:38 PM, Steven Bosscher <stevenb.gcc@gmail.com> wrote:
>>>> Hello,
>>>>
>>>> The attached monster patch re-organizes a lot of includes to avoid
>>>> dependencies on tree-pass.h just for having dump_file available.
>>>>
>>>> I've used the following "rules" to decide what needs to go where:
>>>>
>>>> * tree-dump.h should be independent of the pass manager, i.e. not
>>>> include tree-pass.h.
>>>>
>>>> * passes that do not need dumping of GENERIC do not need tree-dump.h either.
>>>>
>>>> * Any file that defines an opt_pass may include tree-pass.h.
>>>>
>>>> * If a file includes tree-pass.h, it does not need to include
>>>> dumpfile.h or timevar.h, because tree-pass.h provides these already
>>>> (the *opt_pass structs depend on them)
>>>>
>>>> * If a file does not include tree-pass.h, but it needs dump_file, it
>>>> should include dumpfile.h. Likewise for timevar.h. This category of
>>>> files are the implementation files for supporting code, like alias.c
>>>> and cfg*.c.
>>>>
>>>> With those rules in mind, my hackathon started and the result is
>>>> attached. I had to move a few functions around, but not very much. I
>>>> also uncovered a bug in one of the DF files, where it was trying to
>>>> use get_insns without including emit-rtl.h.  No DF file should emit
>>>> RTL, so I don't want to include emit-rtl.h there, so I removed that
>>>> dumping (which was only for debugging purposes anyway, and obviously
>>>> not tested in a while or I wouldn't have run into this problem to
>>>> begin with :-)
>>>>
>>>> Bootstrapped&tested on powerpc64-unknown-linux-gnu and on
>>>> x86_64-unknown-linux-gnu. OK for trunk?
>>>
>>> You moved get_ref_base_and_extent to tree.c - any reason for that?
>>
>> Yes, tree.c uses it (build_simple_mem_ref_loc) and I don't want tree.c
>> to depend on tree-dfa.c. Longer-term I'd like to split tree.c and
>> tree.h, and this function and the two others you mention below could
>> go into e.g. tree-anal.c.
>>
>>> It is similar to get_inner_reference which is in expr.c and similar to
>>> get_addr_base_and_unit_offset which is still in tree-dfa.c.  I'd prefer
>>> to have it stay where it is for this patch.
>>
>> OK.
>
> Seems to break build with graphite for me:
>
> /space/rguenther/src/svn/trunk/gcc/graphite-dependences.c: In function
> 'graphite_legal_transform':
> /space/rguenther/src/svn/trunk/gcc/graphite-dependences.c:534:
> warning: implicit declaration of function 'timevar_push'
> /space/rguenther/src/svn/trunk/gcc/graphite-dependences.c:534: error:
> 'TV_GRAPHITE_DATA_DEPS' undeclared (first use in this function)
> ...
> /space/rguenther/src/svn/trunk/gcc/graphite-clast-to-gimple.c: In
> function 'translate_clast_user':
> /space/rguenther/src/svn/trunk/gcc/graphite-clast-to-gimple.c:1102:
> error: 'TODO_update_ssa' undeclared (first use in this function)
> ...
> /space/rguenther/src/svn/trunk/gcc/graphite-clast-to-gimple.c:1644:
> error: 'TV_GRAPHITE_CODE_GEN' undeclared (first use in this function)
> ...
>
> /space/rguenther/src/svn/trunk/gcc/graphite-sese-to-poly.c:2341:
> error: 'TODO_update_ssa' undeclared (first use in this function)
> ...

Grr... (/me cursing about being able to build gcc without graphite)


Index: Makefile.in
===================================================================
--- Makefile.in (revision 189519)
+++ Makefile.in (working copy)
@@ -2541,11 +2541,11 @@ graphite-blocking.o : graphite-blocking.
    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 dumpfile.h $(DIAGNOSTIC_CORE_H) $(TREE_FLOW_H) \
+   $(SYSTEM_H) coretypes.h $(DIAGNOSTIC_CORE_H) $(TREE_FLOW_H) $(TREE_PASS_H) \
    $(CFGLOOP_H) $(TREE_DATA_REF_H) sese.h \
    graphite-poly.h graphite-clast-to-gimple.h
 graphite-dependences.o : graphite-dependences.c $(CONFIG_H) $(SYSTEM_H) \
-   coretypes.h dumpfile.h $(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \
+   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) \
@@ -2557,7 +2557,7 @@ graphite-scop-detection.o : graphite-sco
    coretypes.h $(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) $(TREE_PASS_H) \
    sese.h graphite-poly.h graphite-scop-detection.h
 graphite-sese-to-poly.o : graphite-sese-to-poly.c $(CONFIG_H) \
-   $(SYSTEM_H) coretypes.h dumpfile.h $(TREE_FLOW_H) $(CFGLOOP_H) \
+   $(SYSTEM_H) coretypes.h $(TREE_FLOW_H) $(TREE_PASS_H) $(CFGLOOP_H) \
    $(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) \
Index: graphite-clast-to-gimple.c
===================================================================
--- graphite-clast-to-gimple.c  (revision 189519)
+++ graphite-clast-to-gimple.c  (working copy)
@@ -36,7 +36,7 @@ along with GCC; see the file COPYING3.
 #include "coretypes.h"
 #include "diagnostic-core.h"
 #include "tree-flow.h"
-#include "dumpfile.h"
+#include "tree-pass.h"
 #include "cfgloop.h"
 #include "tree-chrec.h"
 #include "tree-data-ref.h"
Index: graphite-dependences.c
===================================================================
--- graphite-dependences.c      (revision 189519)
+++ graphite-dependences.c      (working copy)
@@ -34,7 +34,7 @@ along with GCC; see the file COPYING3.
 #include "system.h"
 #include "coretypes.h"
 #include "tree-flow.h"
-#include "dumpfile.h"
+#include "tree-pass.h"
 #include "cfgloop.h"
 #include "tree-chrec.h"
 #include "tree-data-ref.h"
Index: graphite-sese-to-poly.c
===================================================================
--- graphite-sese-to-poly.c     (revision 189519)
+++ graphite-sese-to-poly.c     (working copy)
@@ -34,7 +34,7 @@ along with GCC; see the file COPYING3.
 #include "system.h"
 #include "coretypes.h"
 #include "tree-flow.h"
-#include "dumpfile.h"
+#include "tree-pass.h"
 #include "cfgloop.h"
 #include "tree-chrec.h"
 #include "tree-data-ref.h"

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-07-16 11:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-13 13:39 [patch] Introduce dumpfile.h, clean up tree-pass.h dependencies Steven Bosscher
2012-07-16  9:00 ` Richard Guenther
2012-07-16  9:12   ` Steven Bosscher
2012-07-16 11:49     ` Richard Guenther
2012-07-16 11:57       ` Steven Bosscher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).