Re-factor inclusion of tree.h.

This moves tree.h out of every header. This exposes dependencies of
tree.h in files that should probably not need it after tree and gimple
are separated.

After this change, no header should include tree.h directly. It should
only be included by a .c file. Unfortunately, I did not find an
automatic way of forcing this.

Tested on x86_64 with all languages enabled and using
contrib/config-list.mk.

2013-10-21  Diego Novillo  <dnovillo@google.com>

	* asan.c: Include tree.h
	* bb-reorder.c: Likewise.
	* cfgcleanup.c: Likewise.
	* cfgloopmanip.c: Likewise.
	* data-streamer-in.c: Likewise.
	* data-streamer-out.c: Likewise.
	* data-streamer.c: Likewise.
	* dwarf2cfi.c: Likewise.
	* graphite-blocking.c: Likewise.
	* graphite-clast-to-gimple.c: Likewise.
	* graphite-dependences.c: Likewise.
	* graphite-interchange.c: Likewise.
	* graphite-optimize-isl.c: Likewise.
	* graphite-poly.c: Likewise.
	* graphite-scop-detection.c: Likewise.
	* graphite-sese-to-poly.c: Likewise.
	* graphite.c: Likewise.
	* ipa-devirt.c: Likewise.
	* ipa-profile.c: Likewise.
	* ipa.c: Likewise.
	* ira.c: Likewise.
	* loop-init.c: Likewise.
	* loop-unroll.c: Likewise.
	* lower-subreg.c: Likewise.
	* lto/lto-object.c: Likewise.
	* recog.c: Likewise.
	* reginfo.c: Likewise.
	* tree-loop-distribution.c: Likewise.
	* tree-parloops.c: Likewise.
	* tree-ssa-strlen.c: Likewise.
	* tree-streamer.c: Likewise.
	* value-prof.c: Likewise.
	* target-globals.c: Likewise.
	* expr.h: Include tree-core.h instead of tree.h.
	* gimple.h: Likewise.
	* ipa-prop.h: Likewise.
	* ipa-utils.h: Likewise.
	* lto-streamer.h: Likewise.
	* streamer-hooks.h: Likewise.
	* ipa-reference.h: Include cgraph.h instead of tree.h.
	* cgraph.h: Include basic-block.h instead of tree.h.
	* tree-streamer.h: Do not include tree.h.
	* genattrtab.c (write_header): Generate inclusion of
	tree.h.
	* genautomata.c (main): Likewise.
	* genemit.c: Likewise.
	* genopinit.c: Likewise.
	* genoutput.c (output_prologue): Likewise.
	* genpeep.c: Likewise.

testsuite/ChangeLog

	* g++.dg/plugin/selfassign.c: Include tree.h.
	* gcc.dg/plugin/finish_unit_plugin.c: Likewise.
	* gcc.dg/plugin/ggcplug.c: Likewise.
	* gcc.dg/plugin/one_time_plugin.c: Likewise.
	* gcc.dg/plugin/selfassign.c: Likewise.
	* gcc.dg/plugin/start_unit_plugin.c: Likewise.

From-SVN: r203908
This commit is contained in:
Diego Novillo 2013-10-21 15:36:37 -04:00 committed by Diego Novillo
parent 1e08df0e05
commit 4d64880731
56 changed files with 114 additions and 9 deletions

View File

@ -101,6 +101,58 @@
(ix86_expand_movmem): Call ix86_expand_set_or_movmem.
(ix86_expand_setmem): Call ix86_expand_set_or_movmem.
2013-10-21 Diego Novillo <dnovillo@google.com>
* asan.c: Include tree.h
* bb-reorder.c: Likewise.
* cfgcleanup.c: Likewise.
* cfgloopmanip.c: Likewise.
* data-streamer-in.c: Likewise.
* data-streamer-out.c: Likewise.
* data-streamer.c: Likewise.
* dwarf2cfi.c: Likewise.
* graphite-blocking.c: Likewise.
* graphite-clast-to-gimple.c: Likewise.
* graphite-dependences.c: Likewise.
* graphite-interchange.c: Likewise.
* graphite-optimize-isl.c: Likewise.
* graphite-poly.c: Likewise.
* graphite-scop-detection.c: Likewise.
* graphite-sese-to-poly.c: Likewise.
* graphite.c: Likewise.
* ipa-devirt.c: Likewise.
* ipa-profile.c: Likewise.
* ipa.c: Likewise.
* ira.c: Likewise.
* loop-init.c: Likewise.
* loop-unroll.c: Likewise.
* lower-subreg.c: Likewise.
* lto/lto-object.c: Likewise.
* recog.c: Likewise.
* reginfo.c: Likewise.
* tree-loop-distribution.c: Likewise.
* tree-parloops.c: Likewise.
* tree-ssa-strlen.c: Likewise.
* tree-streamer.c: Likewise.
* value-prof.c: Likewise.
* target-globals.c: Likewise.
* expr.h: Include tree-core.h instead of tree.h.
* gimple.h: Likewise.
* ipa-prop.h: Likewise.
* ipa-utils.h: Likewise.
* lto-streamer.h: Likewise.
* streamer-hooks.h: Likewise.
* ipa-reference.h: Include cgraph.h instead of tree.h.
* cgraph.h: Include basic-block.h instead of tree.h.
* tree-streamer.h: Do not include tree.h.
* genattrtab.c (write_header): Generate inclusion of
tree.h.
* genautomata.c (main): Likewise.
* genemit.c: Likewise.
* genopinit.c: Likewise.
* genoutput.c (output_prologue): Likewise.
* genpeep.c: Likewise.
2013-10-20 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/altivec.md (vec_unpacku_hi_v16qi): Adjust for

View File

@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "gimple.h"
#include "tree-iterator.h"
#include "tree-ssa.h"

View File

@ -82,6 +82,7 @@
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
#include "rtl.h"
#include "regs.h"
#include "flags.h"

View File

@ -34,6 +34,7 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "tm.h"
#include "rtl.h"
#include "tree.h"
#include "hard-reg-set.h"
#include "regs.h"
#include "insn-config.h"

View File

@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "basic-block.h"
#include "cfgloop.h"
#include "tree.h"
#include "tree-ssa.h"
#include "dumpfile.h"

View File

@ -24,7 +24,7 @@ along with GCC; see the file COPYING3. If not see
#include "is-a.h"
#include "plugin-api.h"
#include "vec.h"
#include "tree.h"
#include "basic-block.h"
#include "function.h"
#include "ipa-ref.h"

View File

@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "diagnostic.h"
#include "tree.h"
#include "data-streamer.h"
/* Read a string from the string table in DATA_IN using input block

View File

@ -23,6 +23,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "data-streamer.h"
/* Return index used to reference STRING of LEN characters in the string table

View File

@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "data-streamer.h"
/* Pack WORK into BP in a variant of uleb format. */

View File

@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see
#include "version.h"
#include "flags.h"
#include "rtl.h"
#include "tree.h"
#include "function.h"
#include "basic-block.h"
#include "dwarf2.h"

View File

@ -28,7 +28,7 @@ along with GCC; see the file COPYING3. If not see
#include "flags.h"
/* For host_integerp, tree_low_cst, fold_convert, size_binop, ssize_int,
TREE_CODE, TYPE_SIZE, int_size_in_bytes, */
#include "tree.h"
#include "tree-core.h"
/* For GET_MODE_BITSIZE, word_mode */
#include "machmode.h"

View File

@ -5100,6 +5100,7 @@ write_header (FILE *outf)
fprintf (outf, "#include \"system.h\"\n");
fprintf (outf, "#include \"coretypes.h\"\n");
fprintf (outf, "#include \"tm.h\"\n");
fprintf (outf, "#include \"tree.h\"\n");
fprintf (outf, "#include \"rtl.h\"\n");
fprintf (outf, "#include \"insn-attr.h\"\n");
fprintf (outf, "#include \"tm_p.h\"\n");

View File

@ -9665,6 +9665,7 @@ main (int argc, char **argv)
"#include \"system.h\"\n"
"#include \"coretypes.h\"\n"
"#include \"tm.h\"\n"
"#include \"tree.h\"\n"
"#include \"rtl.h\"\n"
"#include \"tm_p.h\"\n"
"#include \"insn-config.h\"\n"

View File

@ -790,6 +790,7 @@ from the machine description file `md'. */\n\n");
printf ("#include \"system.h\"\n");
printf ("#include \"coretypes.h\"\n");
printf ("#include \"tm.h\"\n");
printf ("#include \"tree.h\"\n");
printf ("#include \"rtl.h\"\n");
printf ("#include \"tm_p.h\"\n");
printf ("#include \"function.h\"\n");

View File

@ -404,6 +404,7 @@ main (int argc, char **argv)
"#include \"system.h\"\n"
"#include \"coretypes.h\"\n"
"#include \"tm.h\"\n"
"#include \"tree.h\"\n"
"#include \"rtl.h\"\n"
"#include \"tm_p.h\"\n"
"#include \"flags.h\"\n"

View File

@ -238,6 +238,7 @@ output_prologue (void)
printf ("#include \"tm.h\"\n");
printf ("#include \"flags.h\"\n");
printf ("#include \"ggc.h\"\n");
printf ("#include \"tree.h\"\n");
printf ("#include \"rtl.h\"\n");
printf ("#include \"expr.h\"\n");
printf ("#include \"insn-codes.h\"\n");

View File

@ -359,6 +359,7 @@ from the machine description file `md'. */\n\n");
printf ("#include \"coretypes.h\"\n");
printf ("#include \"tm.h\"\n");
printf ("#include \"insn-config.h\"\n");
printf ("#include \"tree.h\"\n");
printf ("#include \"rtl.h\"\n");
printf ("#include \"tm_p.h\"\n");
printf ("#include \"regs.h\"\n");

View File

@ -27,7 +27,7 @@ along with GCC; see the file COPYING3. If not see
#include "vec.h"
#include "ggc.h"
#include "basic-block.h"
#include "tree.h"
#include "tree-core.h"
#include "tree-ssa-alias.h"
#include "internal-fn.h"
#include "gimple-fold.h"

View File

@ -34,6 +34,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "tree-ssa.h"
#include "dumpfile.h"
#include "cfgloop.h"

View File

@ -35,6 +35,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "diagnostic-core.h"
#include "tree.h"
#include "tree-ssa.h"
#include "tree-pass.h"
#include "cfgloop.h"

View File

@ -33,6 +33,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "tree-ssa.h"
#include "tree-pass.h"
#include "cfgloop.h"

View File

@ -35,6 +35,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "tree-ssa.h"
#include "dumpfile.h"
#include "cfgloop.h"

View File

@ -32,6 +32,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "tree-ssa.h"
#include "dumpfile.h"
#include "cfgloop.h"

View File

@ -35,6 +35,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "diagnostic-core.h"
#include "tree.h"
#include "tree-ssa.h"
#include "dumpfile.h"
#include "gimple-pretty-print.h"

View File

@ -31,6 +31,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "tree-ssa.h"
#include "cfgloop.h"
#include "tree-chrec.h"

View File

@ -33,6 +33,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "tree-ssa.h"
#include "tree-pass.h"
#include "cfgloop.h"

View File

@ -47,6 +47,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "diagnostic-core.h"
#include "tree.h"
#include "tree-ssa.h"
#include "tree-dump.h"
#include "cfgloop.h"

View File

@ -109,6 +109,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
#include "cgraph.h"
#include "tree-pass.h"
#include "ggc.h"

View File

@ -48,6 +48,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
#include "cgraph.h"
#include "tree-pass.h"
#include "gimple.h"

View File

@ -20,7 +20,7 @@ along with GCC; see the file COPYING3. If not see
#ifndef IPA_PROP_H
#define IPA_PROP_H
#include "tree.h"
#include "tree-core.h"
#include "vec.h"
#include "cgraph.h"
#include "gimple.h"

View File

@ -21,7 +21,7 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_IPA_REFERENCE_H
#define GCC_IPA_REFERENCE_H
#include "bitmap.h"
#include "tree.h"
#include "cgraph.h"
/* In ipa-reference.c */
bitmap ipa_reference_get_not_read_global (struct cgraph_node *fn);

View File

@ -20,7 +20,7 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_IPA_UTILS_H
#define GCC_IPA_UTILS_H
#include "tree.h"
#include "tree-core.h"
#include "cgraph.h"
struct ipa_dfs_info {

View File

@ -21,6 +21,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
#include "cgraph.h"
#include "tree-pass.h"
#include "gimple.h"

View File

@ -361,6 +361,7 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "tm.h"
#include "regs.h"
#include "tree.h"
#include "rtl.h"
#include "tm_p.h"
#include "target.h"

View File

@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "tm.h"
#include "rtl.h"
#include "tree.h"
#include "regs.h"
#include "obstack.h"
#include "basic-block.h"

View File

@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "tm.h"
#include "rtl.h"
#include "tree.h"
#include "hard-reg-set.h"
#include "obstack.h"
#include "basic-block.h"

View File

@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "machmode.h"
#include "tm.h"
#include "tree.h"
#include "rtl.h"
#include "tm_p.h"
#include "flags.h"

View File

@ -25,7 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "plugin-api.h"
#include "hash-table.h"
#include "tree.h"
#include "tree-core.h"
#include "gimple.h"
#include "target.h"
#include "cgraph.h"

View File

@ -21,6 +21,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "diagnostic-core.h"
#include "lto.h"
#include "tm.h"

View File

@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
#include "rtl-error.h"
#include "tm_p.h"
#include "insn-config.h"

View File

@ -30,6 +30,7 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "tm.h"
#include "hard-reg-set.h"
#include "tree.h"
#include "rtl.h"
#include "expr.h"
#include "tm_p.h"

View File

@ -23,7 +23,7 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_STREAMER_HOOKS_H
#define GCC_STREAMER_HOOKS_H
#include "tree.h"
#include "tree-core.h"
/* Forward declarations to avoid including unnecessary headers. */
struct output_block;

View File

@ -23,6 +23,7 @@ along with GCC; see the file COPYING3. If not see
#include "tm.h"
#include "insn-config.h"
#include "machmode.h"
#include "tree.h"
#include "ggc.h"
#include "toplev.h"
#include "target-globals.h"

View File

@ -25,6 +25,15 @@
* gcc.target/i386/memset-vector_loop-1.c: New test.
* gcc.target/i386/memset-vector_loop-2.c: New test.
2013-10-21 Diego Novillo <dnovillo@google.com>
* g++.dg/plugin/selfassign.c: Include tree.h.
* gcc.dg/plugin/finish_unit_plugin.c: Likewise.
* gcc.dg/plugin/ggcplug.c: Likewise.
* gcc.dg/plugin/one_time_plugin.c: Likewise.
* gcc.dg/plugin/selfassign.c: Likewise.
* gcc.dg/plugin/start_unit_plugin.c: Likewise.
2013-10-20 Richard Sandiford <rdsandiford@googlemail.com>
* gcc.target/mips/mips-ps-5.c: Add alignment attributes.

View File

@ -7,6 +7,7 @@
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
#include "toplev.h"
#include "basic-block.h"
#include "gimple.h"

View File

@ -6,6 +6,7 @@
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
#include "toplev.h"
#include "basic-block.h"
#include "gimple.h"

View File

@ -5,6 +5,7 @@
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
#include "toplev.h"
#include "basic-block.h"
#include "gimple.h"

View File

@ -3,6 +3,7 @@
#include "gcc-plugin.h"
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "tm.h"
#include "toplev.h"
#include "gimple.h"

View File

@ -7,6 +7,7 @@
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
#include "toplev.h"
#include "basic-block.h"
#include "gimple.h"

View File

@ -10,6 +10,7 @@
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
#include "toplev.h"
#include "basic-block.h"
#include "gimple.h"

View File

@ -44,6 +44,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "tree-ssa.h"
#include "cfgloop.h"
#include "tree-chrec.h"

View File

@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "tree-ssa.h"
#include "cfgloop.h"
#include "tree-data-ref.h"

View File

@ -21,6 +21,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "hash-table.h"
#include "tree-ssa.h"
#include "tree-pass.h"

View File

@ -23,6 +23,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "streamer-hooks.h"
#include "tree-streamer.h"

View File

@ -22,7 +22,6 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_TREE_STREAMER_H
#define GCC_TREE_STREAMER_H
#include "tree.h"
#include "streamer-hooks.h"
#include "lto-streamer.h"

View File

@ -21,6 +21,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
#include "rtl.h"
#include "expr.h"
#include "hard-reg-set.h"