On 10/23/2015 12:24 PM, Jeff Law wrote:
> On 10/23/2015 10:53 AM, Andrew MacLeod wrote:
>> Just finished running...  I think the external hard drive was slowing
>> down this run :-P  It took quite a while.
>>
>> Anyway, this is the reduction patch independent of the header-ordering
>> patch... ie, that patch needs to be applied before this one.   So this
>> should be mostly just removals.   I also need to follow up and build all
>> the target and bootstrap from scratch to make sure there arent any
>> weirdnesses with it.   But you can at least get a look at it now.
>>
>> a few interesting stats:
>>
>> Top reductions:
>>
>> passes.c: Reduction performed, 26 includes removed.
>> shrink-wrap.c: Reduction performed, 21 includes removed.
>> ipa-polymorphic-call.c: Reduction performed, 21 includes removed.
>> lto-cgraph.c: Reduction performed, 19 includes removed.
>> ddg.c: Reduction performed, 19 includes removed.
>> tree-ssa-pre.c: Reduction performed, 18 includes removed.
>> lra-remat.c: Reduction performed, 18 includes removed.
>> cgraph.c: Reduction performed, 18 includes removed.
>> cgraphclones.c: Reduction performed, 18 includes removed.
>> tsan.c: Reduction performed, 17 includes removed.
>> tree-into-ssa.c: Reduction performed, 17 includes removed.
>> lto-section-in.c: Reduction performed, 17 includes removed.
>>
>> And headers most often removed:
>>
>> alias.h: Removed 230 times.
>> flags.h: Removed 207 times.
>> internal-fn.h: Removed 143 times.
>> stmt.h: Removed 128 times.
>> dojump.h: Removed 122 times.
>> expmed.h: Removed 115 times.
>> explow.h: Removed 115 times.
>> varasm.h: Removed 114 times.
>> calls.h: Removed 114 times.
>> expr.h: Removed 81 times.
>> insn-config.h: Removed 77 times.
>> emit-rtl.h: Removed 62 times.
>> hard-reg-set.h: Removed 60 times.
>> tm_p.h: Removed 56 times.
>> fold-const.h: Removed 56 times.
>> diagnostic-core.h: Removed 53 times.
>> except.h: Removed 51 times.
> Approved.  This was the easy part :-)
> 
> A quick grep shows 2309 unnecessary #includes removed.

There's a little bit of fallout with this patch when building an
offloaded compiler for openacc. It looks like cgraph.c needs to include
context.h and varpool.c needs context.h and omp-low.h. There's a couple
of ifdef ENABLE_OFFLOADING which may have gone undetected with your script.

I've bootstrapped the attached patch for an nvptx/x86_64-linux target.
I'm still testing that toolchain. If the testing comes back clean, is
this patch OK for trunk?

Cesar

2015-10-30  Cesar Philippidis  <ce...@codesourcery.com>

	gcc/
	* cgraph.c: Include context.h for offloading.
	* varpool.c: Include context.h and omp-low.h.

diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 92b8613..7839c72 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -57,6 +57,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "profile.h"
 #include "params.h"
 #include "tree-chkp.h"
+#include "context.h"
 
 /* FIXME: Only for PROP_loops, but cgraph shouldn't have to know about this.  */
 #include "tree-pass.h"
diff --git a/gcc/varpool.c b/gcc/varpool.c
index 3010dbb..478f365 100644
--- a/gcc/varpool.c
+++ b/gcc/varpool.c
@@ -31,6 +31,8 @@ along with GCC; see the file COPYING3.  If not see
 #include "varasm.h"
 #include "debug.h"
 #include "output.h"
+#include "omp-low.h"
+#include "context.h"
 
 const char * const tls_model_names[]={"none", "emulated",
 				      "global-dynamic", "local-dynamic",

Reply via email to