This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Mostly remove tree-core.h from other .h files.


I noticed there were a few .h files which we including tree-core.h themselves. expr.h was one of them, and many of the rtl files used that to get at the basic tree structure for various bits.

I moved the include of tree-core.h to rtl.h instead. That way all the rtl files get it, and when we flatten the rtl.h includes into the c files, it'll be reduced to just the ones that need it. Eventually, those things that need it from rtl.h won't even need tree-code.h, they'll get converted to the new gimple interface instead.

streamer-hooks.h was including tree-core.h as well, but really only streamer-hooks.c needed location_t from input.h, so I included that instead from there.

Now only tree.h and rtl.h are including tree-core.h, which is more appropriate.

bootstrapping and regressions running on x86_64-unknown-linux-gnu.. assuming no issues, OK?

Andrew

	* rtl.h: Add tree-core.h to include list.
	* expr.h: Remove tree-core.h from include list.
	* gimple.h: Likewise.
	* ipa-prop.h: Likewise.
	* ipa-utils.h: Likewise.
	* lto-streamer.h: Likewise.
	* streamer-hooks.h: Likewise.
	* streamer-hooks.c: Include input.h.

*** HEADER/rtl.h	2013-10-28 11:55:32.021437788 -0400
--- rtl.h	2013-10-28 14:49:39.749635187 -0400
*************** along with GCC; see the file COPYING3.
*** 29,34 ****
--- 29,35 ----
  #include "alias.h"
  #include "hashtab.h"
  #include "flags.h"
+ #include "tree-core.h"
  
  /* Value used by some passes to "recognize" noop moves as valid
   instructions.  */
*** HEADER/expr.h	2013-10-28 11:55:32.005437796 -0400
--- expr.h	2013-10-28 14:46:25.069932215 -0400
*************** along with GCC; see the file COPYING3.
*** 26,34 ****
  #include "rtl.h"
  /* For optimize_size */
  #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-core.h"
  /* For GET_MODE_BITSIZE, word_mode */
  #include "machmode.h"
  
--- 26,31 ----
*** HEADER/gimple.h	2013-10-28 11:55:32.009437794 -0400
--- gimple.h	2013-10-28 15:01:27.285050961 -0400
*************** along with GCC; see the file COPYING3.
*** 27,33 ****
  #include "vec.h"
  #include "ggc.h"
  #include "basic-block.h"
- #include "tree-core.h"
  #include "tree-ssa-alias.h"
  #include "internal-fn.h"
  #include "gimple-fold.h"
--- 27,32 ----
*** HEADER/ipa-prop.h	2013-10-28 11:55:32.013437792 -0400
--- ipa-prop.h	2013-10-28 15:03:36.512726491 -0400
*************** along with GCC; see the file COPYING3.
*** 20,26 ****
  #ifndef IPA_PROP_H
  #define IPA_PROP_H
  
- #include "tree-core.h"
  #include "vec.h"
  #include "cgraph.h"
  #include "alloc-pool.h"
--- 20,25 ----
*** HEADER/ipa-utils.h	2013-10-28 11:55:32.014437792 -0400
--- ipa-utils.h	2013-10-28 15:04:02.304664416 -0400
*************** along with GCC; see the file COPYING3.
*** 20,26 ****
  
  #ifndef GCC_IPA_UTILS_H
  #define GCC_IPA_UTILS_H
- #include "tree-core.h"
  #include "cgraph.h"
  
  struct ipa_dfs_info {
--- 20,25 ----
*** HEADER/lto-streamer.h	2013-10-28 11:55:32.017437790 -0400
--- lto-streamer.h	2013-10-28 15:04:30.626597222 -0400
*************** along with GCC; see the file COPYING3.
*** 25,31 ****
  
  #include "plugin-api.h"
  #include "hash-table.h"
- #include "tree-core.h"
  #include "target.h"
  #include "cgraph.h"
  #include "vec.h"
--- 25,30 ----
*** HEADER/streamer-hooks.h	2013-10-28 11:55:32.023437787 -0400
--- streamer-hooks.h	2013-10-28 15:30:31.876866273 -0400
*************** along with GCC; see the file COPYING3.
*** 23,30 ****
  #ifndef GCC_STREAMER_HOOKS_H
  #define GCC_STREAMER_HOOKS_H
  
- #include "tree-core.h"
- 
  /* Forward declarations to avoid including unnecessary headers.  */
  struct output_block;
  struct lto_input_block;
--- 23,28 ----
*** HEADER/streamer-hooks.c	2013-10-28 11:55:32.023437787 -0400
--- streamer-hooks.c	2013-10-28 15:30:42.437856247 -0400
*************** along with GCC; see the file COPYING3.
*** 23,28 ****
--- 23,29 ----
  #include "config.h"
  #include "system.h"
  #include "coretypes.h"
+ #include "input.h"
  #include "streamer-hooks.h"
  
  /* Streamer hooks.  */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]