public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew MacLeod <amacleod@redhat.com>
To: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: [patch] Remove target.h and alloc-pool.h from lto-streamer.h.
Date: Thu, 09 Jul 2015 11:47:00 -0000	[thread overview]
Message-ID: <559E5F68.1020805@redhat.com> (raw)

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

target.h and alloc-pool.h are not required by any of the streamer header 
files to compile, so I flattened those 2 includes from lto-streamer.h.
plugin-api.h, gcov-io.h and diagnostic.h are all required to parse 
lto-streamer.h, so I left those in the file.

I then ran the include reducer on all of the files which were affected 
by by the flattening (there were 38). I had it only consider the 
affected files : target.h, alloc-pool.h and lto-streamer.h.
Only 22 of the 38 files now show any change, and in many of those cases 
it was removing lto-streamer.h itself that was the end result :-)  So 
its a much cleaner patch now :-)

Bootstraps on x86_64-unknown-linux-gnu with no new regressions.
OK for trunk?

Andrew

[-- Attachment #2: streamer.patch --]
[-- Type: text/x-patch, Size: 11423 bytes --]


	* lto-streamer.h: Don't include target.h and alloc-pool.h.
	* builtins.c: Adjust includes.
	* gimple.c: Likewise.
	* ipa-icf.c: Likewise.
	* ipa-reference.c: Likewise.
	* lto-section-out.c: Likewise.
	* lto-streamer-in.c: Likewise.
	* lto-streamer-out.c: Likewise.
	* opts-global.c: Likewise.
	* symtab.c: Likewise.
	* tree-chkp.c: Likewise.
	* tree-ssa-live.c: Likewise.
	* tree-streamer-in.c: Likewise.
	* tree-streamer-out.c: Likewise.
	* config/darwin.c: Likewise.
	* config/i386/winnt.c: Likewise.

	* cp/cp-ubsan.c: Don't include alloc-pool.h or lto-streamer.h.

	* lto/lto-lang.c: Adjust includes of target.h, alloc-pool.h and
	lto-streamer.h.
	* lto/lto-object.c: Likewise.
	* lto/lto-partition.c: Likewise.
	* lto/lto-symtab.c: Likewise.
	* lto-opts.c: Likewise.


Index: lto-streamer.h
===================================================================
*** lto-streamer.h	(revision 225531)
--- lto-streamer.h	(working copy)
*************** along with GCC; see the file COPYING3.
*** 24,31 ****
  #define GCC_LTO_STREAMER_H
  
  #include "plugin-api.h"
- #include "target.h"
- #include "alloc-pool.h"
  #include "gcov-io.h"
  #include "diagnostic.h"
  
--- 24,29 ----
Index: builtins.c
===================================================================
*** builtins.c	(revision 225531)
--- builtins.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 60,66 ****
  #include "builtins.h"
  #include "asan.h"
  #include "cilk.h"
- #include "lto-streamer.h"
  #include "cgraph.h"
  #include "tree-chkp.h"
  #include "rtl-chkp.h"
--- 60,65 ----
Index: gimple.c
===================================================================
*** gimple.c	(revision 225531)
--- gimple.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 44,50 ****
  #include "alias.h"
  #include "demangle.h"
  #include "langhooks.h"
- #include "lto-streamer.h"
  #include "cgraph.h"
  
  
--- 44,49 ----
Index: ipa-icf.c
===================================================================
*** ipa-icf.c	(revision 225531)
--- ipa-icf.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 89,94 ****
--- 89,95 ----
  #include "coverage.h"
  #include "attribs.h"
  #include "print-tree.h"
+ #include "target.h"
  #include "lto-streamer.h"
  #include "data-streamer.h"
  #include "ipa-utils.h"
Index: ipa-reference.c
===================================================================
*** ipa-reference.c	(revision 225531)
--- ipa-reference.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 57,63 ****
  #include "flags.h"
  #include "diagnostic.h"
  #include "data-streamer.h"
- #include "lto-streamer.h"
  
  static void remove_node_data (struct cgraph_node *node,
  			      void *data ATTRIBUTE_UNUSED);
--- 57,62 ----
Index: lto-section-out.c
===================================================================
*** lto-section-out.c	(revision 225531)
--- lto-section-out.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 44,50 ****
  #include "langhooks.h"
  #include "cgraph.h"
  #include "data-streamer.h"
- #include "lto-streamer.h"
  #include "lto-compress.h"
  
  static vec<lto_out_decl_state_ptr> decl_state_stack;
--- 44,49 ----
Index: lto-streamer-in.c
===================================================================
*** lto-streamer-in.c	(revision 225531)
--- lto-streamer-in.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 54,59 ****
--- 54,60 ----
  #include "debug.h"
  #include "cgraph.h"
  #include "ipa-utils.h"
+ #include "target.h"
  #include "data-streamer.h"
  #include "gimple-streamer.h"
  #include "lto-streamer.h"
Index: lto-streamer-out.c
===================================================================
*** lto-streamer-out.c	(revision 225531)
--- lto-streamer-out.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 49,54 ****
--- 49,55 ----
  #include "except.h"
  #include "lto-symtab.h"
  #include "cgraph.h"
+ #include "target.h"
  #include "lto-streamer.h"
  #include "data-streamer.h"
  #include "gimple-streamer.h"
Index: opts-global.c
===================================================================
*** opts-global.c	(revision 225531)
--- opts-global.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 35,41 ****
  #include "dbgcnt.h"
  #include "debug.h"
  #include "cgraph.h"
! #include "lto-streamer.h"
  #include "output.h"
  #include "plugin.h"
  #include "toplev.h"
--- 35,41 ----
  #include "dbgcnt.h"
  #include "debug.h"
  #include "cgraph.h"
! #include "target.h"
  #include "output.h"
  #include "plugin.h"
  #include "toplev.h"
Index: symtab.c
===================================================================
*** symtab.c	(revision 225531)
--- symtab.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 36,41 ****
--- 36,42 ----
  #include "cgraph.h"
  #include "diagnostic.h"
  #include "timevar.h"
+ #include "target.h"
  #include "lto-streamer.h"
  #include "output.h"
  #include "ipa-utils.h"
Index: tree-chkp.c
===================================================================
*** tree-chkp.c	(revision 225531)
--- tree-chkp.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 60,66 ****
  #include "tree-chkp.h"
  #include "gimple-walk.h"
  #include "tree-dfa.h"
- #include "lto-streamer.h"
  #include "cgraph.h"
  #include "ipa-chkp.h"
  #include "params.h"
--- 60,65 ----
Index: tree-ssa-live.c
===================================================================
*** tree-ssa-live.c	(revision 225531)
--- tree-ssa-live.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 48,54 ****
  #include "diagnostic-core.h"
  #include "debug.h"
  #include "tree-ssa.h"
- #include "lto-streamer.h"
  #include "cgraph.h"
  #include "ipa-utils.h"
  
--- 48,53 ----
Index: tree-streamer-in.c
===================================================================
*** tree-streamer-in.c	(revision 225531)
--- tree-streamer-in.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 33,42 ****
  #include "stringpool.h"
  #include "internal-fn.h"
  #include "cgraph.h"
  #include "tree-streamer.h"
  #include "data-streamer.h"
  #include "streamer-hooks.h"
- #include "lto-streamer.h"
  #include "builtins.h"
  #include "ipa-chkp.h"
  #include "gomp-constants.h"
--- 33,42 ----
  #include "stringpool.h"
  #include "internal-fn.h"
  #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"
Index: tree-streamer-out.c
===================================================================
*** tree-streamer-out.c	(revision 225531)
--- tree-streamer-out.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 32,37 ****
--- 32,38 ----
  #include "stor-layout.h"
  #include "internal-fn.h"
  #include "cgraph.h"
+ #include "target.h"
  #include "tree-streamer.h"
  #include "data-streamer.h"
  #include "streamer-hooks.h"
Index: config/darwin.c
===================================================================
*** config/darwin.c	(revision 225531)
--- config/darwin.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 63,68 ****
--- 63,69 ----
  #include "tree-eh.h"
  #include "gimplify.h"
  #include "cgraph.h"
+ #include "alloc-pool.h"
  #include "lto-streamer.h"
  #include "lto-section-names.h"
  
Index: config/i386/winnt.c
===================================================================
*** config/i386/winnt.c	(revision 225531)
--- config/i386/winnt.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 51,56 ****
--- 51,57 ----
  #include "gimple-fold.h"
  #include "tree-eh.h"
  #include "cgraph.h"
+ #include "alloc-pool.h"
  #include "lto-streamer.h"
  #include "lto-section-names.h"
  #include "builtins.h"
Index: cp/cp-ubsan.c
===================================================================
*** cp/cp-ubsan.c	(revision 225531)
--- cp/cp-ubsan.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 28,34 ****
  #include "cp-tree.h"
  #include "gimple.h"
  #include "options.h"
- #include "alloc-pool.h"
  #include "output.h"
  #include "toplev.h"
  #include "ubsan.h"
--- 28,33 ----
*************** along with GCC; see the file COPYING3.
*** 40,46 ****
  #include "builtins.h"
  #include "fold-const.h"
  #include "stringpool.h"
- #include "lto-streamer.h"
  #include "cgraph.h"
  
  /* Test if we should instrument vptr access.  */
--- 39,44 ----
Index: lto/lto-lang.c
===================================================================
*** lto/lto-lang.c	(revision 225531)
--- lto/lto-lang.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 44,50 ****
  #include "diagnostic-core.h"
  #include "toplev.h"
  #include "cgraph.h"
- #include "lto-streamer.h"
  #include "cilk.h"
  
  static tree lto_type_for_size (unsigned, int);
--- 44,49 ----
Index: lto/lto-object.c
===================================================================
*** lto/lto-object.c	(revision 225531)
--- lto/lto-object.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 35,41 ****
  #include "diagnostic-core.h"
  #include "lto.h"
  #include "cgraph.h"
- #include "lto-streamer.h"
  #include "lto-section-names.h"
  #include "simple-object.h"
  
--- 35,40 ----
Index: lto/lto-partition.c
===================================================================
*** lto/lto-partition.c	(revision 225531)
--- lto/lto-partition.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 33,42 ****
  #include "fold-const.h"
  #include "internal-fn.h"
  #include "cgraph.h"
  #include "lto-streamer.h"
  #include "timevar.h"
  #include "params.h"
- #include "alloc-pool.h"
  #include "symbol-summary.h"
  #include "ipa-prop.h"
  #include "ipa-inline.h"
--- 33,43 ----
  #include "fold-const.h"
  #include "internal-fn.h"
  #include "cgraph.h"
+ #include "target.h"
+ #include "alloc-pool.h"
  #include "lto-streamer.h"
  #include "timevar.h"
  #include "params.h"
  #include "symbol-summary.h"
  #include "ipa-prop.h"
  #include "ipa-inline.h"
Index: lto/lto-symtab.c
===================================================================
*** lto/lto-symtab.c	(revision 225531)
--- lto/lto-symtab.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 34,42 ****
  #include "fold-const.h"
  #include "internal-fn.h"
  #include "cgraph.h"
  #include "lto-streamer.h"
  #include "ipa-utils.h"
- #include "alloc-pool.h"
  #include "symbol-summary.h"
  #include "ipa-prop.h"
  #include "ipa-inline.h"
--- 34,43 ----
  #include "fold-const.h"
  #include "internal-fn.h"
  #include "cgraph.h"
+ #include "target.h"
+ #include "alloc-pool.h"
  #include "lto-streamer.h"
  #include "ipa-utils.h"
  #include "symbol-summary.h"
  #include "ipa-prop.h"
  #include "ipa-inline.h"
Index: lto-opts.c
===================================================================
*** lto-opts.c	(revision 225531)
--- lto-opts.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 36,41 ****
--- 36,42 ----
  #include "common/common-target.h"
  #include "diagnostic.h"
  #include "cgraph.h"
+ #include "target.h"
  #include "lto-streamer.h"
  #include "lto-section-names.h"
  #include "toplev.h"

             reply	other threads:[~2015-07-09 11:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-09 11:47 Andrew MacLeod [this message]
2015-07-09 13:46 ` Jeff Law

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=559E5F68.1020805@redhat.com \
    --to=amacleod@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).