diff mbox

Adjust *-streamer.h

Message ID 55A5703F.505@redhat.com
State New
Headers show

Commit Message

Andrew MacLeod July 14, 2015, 8:25 p.m. UTC
THIs patch just does a minor cleanup..

gimple-pretty-print.h doesn't need to include pretty-print.h since 
tree-pretty-print.h already does.
I also cleaned up the 4 streamer files, such that each one includes just 
the previous one, and then make each source file include just he one it 
needs.

so lto-streamer.h <- data-streamer.h <- tree-streamer.h  <- 
gimple-streamer.h
and tree-streamer.h also includes streamer-hooks.h

This makes these files match their compilation requirements, and only 
one ever needs to be included. I also added them to each source file and 
ran include reduction to ensure they each had the exact one they needed. 
which they did.

The rest of the the patch is simply removing headers that are redundant 
now (ie,if tree-streamer.h is included, you don't need to include 
lto-streamer.h or streamer-hooks.h.

bootstraps on  x86_64-unknown-linux-gnu, and no new regressions

  OK for trunk?

Andrew

Comments

Jeff Law July 15, 2015, 4:44 p.m. UTC | #1
On 07/14/2015 02:25 PM, Andrew MacLeod wrote:
> THIs patch just does a minor cleanup..
>
> gimple-pretty-print.h doesn't need to include pretty-print.h since
> tree-pretty-print.h already does.
> I also cleaned up the 4 streamer files, such that each one includes just
> the previous one, and then make each source file include just he one it
> needs.
>
> so lto-streamer.h <- data-streamer.h <- tree-streamer.h  <-
> gimple-streamer.h
> and tree-streamer.h also includes streamer-hooks.h
>
> This makes these files match their compilation requirements, and only
> one ever needs to be included. I also added them to each source file and
> ran include reduction to ensure they each had the exact one they needed.
> which they did.
>
> The rest of the the patch is simply removing headers that are redundant
> now (ie,if tree-streamer.h is included, you don't need to include
> lto-streamer.h or streamer-hooks.h.
>
> bootstraps on  x86_64-unknown-linux-gnu, and no new regressions
>
>   OK for trunk?
OK.
jeff
diff mbox

Patch


	* gimple-pretty-print.h: Don't include pretty-print.h.
	* tree-streamer.h: Don't include lto-streamer.h.
	* gimple-streamer.h: Include tree-streamer.h rather than lto-streamer.h.
	* gimple-streamer-in.c: Remove redundant includes.
	* gimple-streamer-out.c: Likewise.
	* ipa-devirt.c: Likewise.
	* ipa-icf.c: Likewise.
	* ipa-inline-analysis.c: Likewise.
	* ipa-polymorphic-call.c: Likewise.
	* ipa-profile.c: Likewise.
	* ipa-prop.c: Likewise.
	* ipa-pure-const.c: Likewise.
	* lto-cgraph.c: Likewise.
	* lto-streamer-in.c: Likewise.
	* lto-streamer-out.c: Likewise.
	* lto-streamer.c: Likewise.
	* tree-streamer-in.c: Likewise.
	* tree-streamer-out.c: Likewise.
	* tree-streamer.c: Likewise.
	* lto/lto.c: Likewise.

Index: gimple-pretty-print.h
===================================================================
*** gimple-pretty-print.h	(revision 225741)
--- gimple-pretty-print.h	(working copy)
*************** along with GCC; see the file COPYING3.
*** 21,27 ****
  #ifndef GCC_GIMPLE_PRETTY_PRINT_H
  #define GCC_GIMPLE_PRETTY_PRINT_H
  
- #include "pretty-print.h"
  #include "tree-pretty-print.h"
  
  /* In gimple-pretty-print.c  */
--- 21,26 ----
Index: tree-streamer.h
===================================================================
*** tree-streamer.h	(revision 225741)
--- tree-streamer.h	(working copy)
*************** along with GCC; see the file COPYING3.
*** 23,29 ****
  #define GCC_TREE_STREAMER_H
  
  #include "streamer-hooks.h"
- #include "lto-streamer.h"
  #include "data-streamer.h"
  
  /* Cache of pickled nodes.  Used to avoid writing the same node more
--- 23,28 ----
Index: gimple-streamer.h
===================================================================
*** gimple-streamer.h	(revision 225741)
--- gimple-streamer.h	(working copy)
*************** along with GCC; see the file COPYING3.
*** 22,28 ****
  #ifndef GCC_GIMPLE_STREAMER_H
  #define GCC_GIMPLE_STREAMER_H
  
! #include "lto-streamer.h"
  
  /* In gimple-streamer-in.c  */
  void input_bb (struct lto_input_block *, enum LTO_tags, struct data_in *,
--- 22,28 ----
  #ifndef GCC_GIMPLE_STREAMER_H
  #define GCC_GIMPLE_STREAMER_H
  
! #include "tree-streamer.h"
  
  /* In gimple-streamer-in.c  */
  void input_bb (struct lto_input_block *, enum LTO_tags, struct data_in *,
Index: gimple-streamer-in.c
===================================================================
*** gimple-streamer-in.c	(revision 225741)
--- gimple-streamer-in.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 35,42 ****
  #include "tree-eh.h"
  #include "gimple-iterator.h"
  #include "cgraph.h"
- #include "data-streamer.h"
- #include "tree-streamer.h"
  #include "gimple-streamer.h"
  #include "value-prof.h"
  
--- 35,40 ----
Index: gimple-streamer-out.c
===================================================================
*** gimple-streamer-out.c	(revision 225741)
--- gimple-streamer-out.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 34,43 ****
  #include "gimple-iterator.h"
  #include "gimple-ssa.h"
  #include "cgraph.h"
- #include "data-streamer.h"
  #include "gimple-streamer.h"
- #include "lto-streamer.h"
- #include "tree-streamer.h"
  #include "value-prof.h"
  
  /* Output PHI function PHI to the main stream in OB.  */
--- 34,40 ----
Index: ipa-devirt.c
===================================================================
*** ipa-devirt.c	(revision 225741)
--- ipa-devirt.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 128,134 ****
  #include "expr.h"
  #include "tree-pass.h"
  #include "target.h"
- #include "tree-pretty-print.h"
  #include "ipa-utils.h"
  #include "internal-fn.h"
  #include "gimple-fold.h"
--- 128,133 ----
*************** along with GCC; see the file COPYING3.
*** 143,149 ****
  #include "gimple-pretty-print.h"
  #include "stor-layout.h"
  #include "intl.h"
- #include "streamer-hooks.h"
  #include "lto-streamer.h"
  
  /* Hash based set of pairs of types.  */
--- 142,147 ----
Index: ipa-icf.c
===================================================================
*** ipa-icf.c	(revision 225741)
--- ipa-icf.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 90,96 ****
  #include "attribs.h"
  #include "print-tree.h"
  #include "target.h"
- #include "lto-streamer.h"
  #include "data-streamer.h"
  #include "ipa-utils.h"
  #include "ipa-icf-gimple.h"
--- 90,95 ----
Index: ipa-inline-analysis.c
===================================================================
*** ipa-inline-analysis.c	(revision 225741)
--- ipa-inline-analysis.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 94,101 ****
  #include "alloc-pool.h"
  #include "symbol-summary.h"
  #include "ipa-prop.h"
- #include "lto-streamer.h"
- #include "data-streamer.h"
  #include "tree-streamer.h"
  #include "ipa-inline.h"
  #include "cfgloop.h"
--- 94,99 ----
Index: ipa-polymorphic-call.c
===================================================================
*** ipa-polymorphic-call.c	(revision 225741)
--- ipa-polymorphic-call.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 40,46 ****
  #include "expr.h"
  #include "tree-pass.h"
  #include "target.h"
- #include "tree-pretty-print.h"
  #include "cgraph.h"
  #include "ipa-utils.h"
  #include "internal-fn.h"
--- 40,45 ----
*************** along with GCC; see the file COPYING3.
*** 57,63 ****
  #include "stor-layout.h"
  #include "intl.h"
  #include "data-streamer.h"
- #include "lto-streamer.h"
  #include "streamer-hooks.h"
  #include "tree-ssa-operands.h"
  #include "tree-into-ssa.h"
--- 56,61 ----
Index: ipa-profile.c
===================================================================
*** ipa-profile.c	(revision 225741)
--- ipa-profile.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 67,73 ****
  #include "value-prof.h"
  #include "alloc-pool.h"
  #include "tree-inline.h"
- #include "lto-streamer.h"
  #include "data-streamer.h"
  #include "symbol-summary.h"
  #include "ipa-prop.h"
--- 67,72 ----
Index: ipa-prop.c
===================================================================
*** ipa-prop.c	(revision 225741)
--- ipa-prop.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 61,68 ****
  #include "ipa-inline.h"
  #include "diagnostic.h"
  #include "gimple-pretty-print.h"
- #include "lto-streamer.h"
- #include "data-streamer.h"
  #include "tree-streamer.h"
  #include "params.h"
  #include "ipa-utils.h"
--- 61,66 ----
Index: ipa-pure-const.c
===================================================================
*** ipa-pure-const.c	(revision 225741)
--- ipa-pure-const.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 59,66 ****
  #include "gimple-pretty-print.h"
  #include "langhooks.h"
  #include "target.h"
- #include "lto-streamer.h"
- #include "data-streamer.h"
  #include "tree-streamer.h"
  #include "cfgloop.h"
  #include "tree-scalar-evolution.h"
--- 59,64 ----
Index: lto-cgraph.c
===================================================================
*** lto-cgraph.c	(revision 225741)
--- lto-cgraph.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 48,55 ****
  #include "except.h"
  #include "timevar.h"
  #include "cgraph.h"
- #include "lto-streamer.h"
- #include "data-streamer.h"
  #include "tree-streamer.h"
  #include "gcov-io.h"
  #include "tree-pass.h"
--- 48,53 ----
Index: lto-streamer-in.c
===================================================================
*** lto-streamer-in.c	(revision 225741)
--- lto-streamer-in.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 56,66 ****
  #include "cgraph.h"
  #include "ipa-utils.h"
  #include "target.h"
- #include "data-streamer.h"
  #include "gimple-streamer.h"
- #include "lto-streamer.h"
- #include "tree-streamer.h"
- #include "streamer-hooks.h"
  #include "cfgloop.h"
  
  
--- 56,62 ----
Index: lto-streamer-out.c
===================================================================
*** lto-streamer-out.c	(revision 225741)
--- lto-streamer-out.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 50,60 ****
  #include "lto-symtab.h"
  #include "cgraph.h"
  #include "target.h"
- #include "lto-streamer.h"
- #include "data-streamer.h"
  #include "gimple-streamer.h"
- #include "tree-streamer.h"
- #include "streamer-hooks.h"
  #include "cfgloop.h"
  #include "builtins.h"
  #include "gomp-constants.h"
--- 50,56 ----
Index: lto-streamer.c
===================================================================
*** lto-streamer.c	(revision 225741)
--- lto-streamer.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 37,43 ****
  #include "tree-streamer.h"
  #include "lto-streamer.h"
  #include "lto-section-names.h"
- #include "streamer-hooks.h"
  
  /* Statistics gathered during LTO, WPA and LTRANS.  */
  struct lto_stats_d lto_stats;
--- 37,42 ----
Index: tree-streamer-in.c
===================================================================
*** tree-streamer-in.c	(revision 225741)
--- tree-streamer-in.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 35,42 ****
  #include "cgraph.h"
  #include "target.h"
  #include "tree-streamer.h"
- #include "data-streamer.h"
- #include "streamer-hooks.h"
  #include "builtins.h"
  #include "ipa-chkp.h"
  #include "gomp-constants.h"
--- 35,40 ----
Index: tree-streamer-out.c
===================================================================
*** tree-streamer-out.c	(revision 225741)
--- tree-streamer-out.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 34,41 ****
  #include "cgraph.h"
  #include "target.h"
  #include "tree-streamer.h"
- #include "data-streamer.h"
- #include "streamer-hooks.h"
  #include "gomp-constants.h"
  
  
--- 34,39 ----
Index: tree-streamer.c
===================================================================
*** tree-streamer.c	(revision 225741)
--- tree-streamer.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 31,39 ****
  #include "options.h"
  #include "fold-const.h"
  #include "internal-fn.h"
- #include "streamer-hooks.h"
- #include "cgraph.h"
  #include "tree-streamer.h"
  
  /* Table indexed by machine_mode, used for 2 different purposes.
     During streaming out we record there non-zero value for all modes
--- 31,38 ----
  #include "options.h"
  #include "fold-const.h"
  #include "internal-fn.h"
  #include "tree-streamer.h"
+ #include "cgraph.h"
  
  /* Table indexed by machine_mode, used for 2 different purposes.
     During streaming out we record there non-zero value for all modes
Index: lto/lto.c
===================================================================
*** lto/lto.c	(revision 225741)
--- lto/lto.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 48,59 ****
  #include "internal-fn.h"
  #include "lto.h"
  #include "lto-tree.h"
- #include "lto-streamer.h"
- #include "lto-section-names.h"
  #include "tree-streamer.h"
  #include "splay-tree.h"
  #include "lto-partition.h"
- #include "data-streamer.h"
  #include "context.h"
  #include "pass_manager.h"
  #include "ipa-inline.h"
--- 48,57 ----
  #include "internal-fn.h"
  #include "lto.h"
  #include "lto-tree.h"
  #include "tree-streamer.h"
+ #include "lto-section-names.h"
  #include "splay-tree.h"
  #include "lto-partition.h"
  #include "context.h"
  #include "pass_manager.h"
  #include "ipa-inline.h"