[patch] bit of cleanup to graphite files

2015-07-10 Thread Andrew MacLeod
I noticed a few annoying bits around the graphite files that I decided 
to cleanup.


- omega.h shouldn't include "config.h".  including params.h is fine 
since it is needed, but it should be within the #ifndef GCC_OMEGA_H guard.
- sese.h is required for compilation of graphite-poly.h, and basically 
isn't used anywhere else (except sese.c) , so simply include it in 
graphite-poly.h.
- I adjusted the rest of the graphite files . All but graphite.c guard 
the enter contents of the file with HAVE_isl, but they all include a ton 
of GCC includes outside the guard.  I moved them inside the guard and 
ran include reduction on them all to remove the unneeded headers.
- graphite.c was similar, except it has a small hunk of code which is 
compiled when HAVE_isl is false. I manually adjusted those includes to 
be minimal, and ran include reduction on the rest.


I bootstrapped with HAVE_isl defined and also with it not defined on 
x86_64-unknown-linux-gnu.  I ran it with no regressions with HAVE_isl 
defined.


OK for trunk?

Andrew


	* omega.h: Don't include config.h, don't include params.h again if
	omega.h has already been included.
	* graphite-poly.h: Include sese.h.
	* graphite.c: Don't include sese.h, remove needless includes and 
	minimize includes outside #ifdef HAVE_isl block.
	* graphite-blocking.c: Don't include sese.h, remove needless includes,
	and wrap entire file in #ifdef HAVE_isl
	* graphite-dependences.c: Likewise.
	* graphite-interchange.c: Likewise.
	* graphite-isl-ast-to-gimple.c: Likewise.
	* graphite-optimize-isl.c: Likewise.
	* graphite-poly.c: Likewise.
	* graphite-scop-detection.c: Likewise.
	* graphite-sese-to-poly.c: Likewise.

Index: omega.h
===
*** omega.h	(revision 225674)
--- omega.h	(working copy)
*** You should have received a copy of the G
*** 24,35 
  along with GCC; see the file COPYING3.  If not see
  .  */
  
- #include "config.h"
- #include "params.h"
  
  #ifndef GCC_OMEGA_H
  #define GCC_OMEGA_H
  
  #define OMEGA_MAX_VARS PARAM_VALUE (PARAM_OMEGA_MAX_VARS)
  #define OMEGA_MAX_GEQS PARAM_VALUE (PARAM_OMEGA_MAX_GEQS)
  #define OMEGA_MAX_EQS PARAM_VALUE (PARAM_OMEGA_MAX_EQS)
--- 24,35 
  along with GCC; see the file COPYING3.  If not see
  .  */
  
  
  #ifndef GCC_OMEGA_H
  #define GCC_OMEGA_H
  
+ #include "params.h"
+ 
  #define OMEGA_MAX_VARS PARAM_VALUE (PARAM_OMEGA_MAX_VARS)
  #define OMEGA_MAX_GEQS PARAM_VALUE (PARAM_OMEGA_MAX_GEQS)
  #define OMEGA_MAX_EQS PARAM_VALUE (PARAM_OMEGA_MAX_EQS)
Index: graphite-poly.h
===
*** graphite-poly.h	(revision 225674)
--- graphite-poly.h	(working copy)
*** along with GCC; see the file COPYING3.
*** 22,27 
--- 22,29 
  #ifndef GCC_GRAPHITE_POLY_H
  #define GCC_GRAPHITE_POLY_H
  
+ #include "sese.h"
+ 
  typedef struct poly_dr *poly_dr_p;
  
  typedef struct poly_bb *poly_bb_p;
Index: graphite.c
===
*** graphite.c	(revision 225674)
--- graphite.c	(working copy)
*** along with GCC; see the file COPYING3.
*** 46,78 
  
  #include "system.h"
  #include "coretypes.h"
- #include "diagnostic-core.h"
- #include "alias.h"
  #include "backend.h"
  #include "cfghooks.h"
  #include "tree.h"
  #include "gimple.h"
- #include "hard-reg-set.h"
- #include "options.h"
  #include "fold-const.h"
- #include "internal-fn.h"
  #include "gimple-iterator.h"
  #include "tree-cfg.h"
  #include "tree-ssa-loop.h"
- #include "tree-dump.h"
- #include "cfgloop.h"
- #include "tree-chrec.h"
  #include "tree-data-ref.h"
  #include "tree-scalar-evolution.h"
! #include "sese.h"
  #include "dbgcnt.h"
  #include "tree-parloops.h"
- #include "tree-pass.h"
  #include "tree-cfgcleanup.h"
- 
- #ifdef HAVE_isl
- 
- #include "graphite-poly.h"
  #include "graphite-scop-detection.h"
  #include "graphite-isl-ast-to-gimple.h"
  #include "graphite-sese-to-poly.h"
--- 46,70 
  
  #include "system.h"
  #include "coretypes.h"
  #include "backend.h"
+ #include "diagnostic-core.h"
+ #include "cfgloop.h"
+ #include "tree-pass.h"
+ 
+ #ifdef HAVE_isl
  #include "cfghooks.h"
  #include "tree.h"
  #include "gimple.h"
  #include "fold-const.h"
  #include "gimple-iterator.h"
  #include "tree-cfg.h"
  #include "tree-ssa-loop.h"
  #include "tree-data-ref.h"
  #include "tree-scalar-evolution.h"
! #include "graphite-poly.h"
  #include "dbgcnt.h"
  #include "tree-parloops.h"
  #include "tree-cfgcleanup.h"
  #include "graphite-scop-detection.h"
  #include "graphite-isl-ast-to-gimple.h"
  #include "graphite-sese-to-poly.h"
Index: graphite-blocking.c
===
*** graphite-blocking.c	(revision 225674)
--- graphite-blocking.c	(working copy)
*** along with GCC; see the file COPYING3.
*** 31,62 
  #include 
  #include 
  #inc

Re: [patch] bit of cleanup to graphite files

2015-07-10 Thread Jeff Law

On 07/10/2015 02:47 PM, Andrew MacLeod wrote:

I noticed a few annoying bits around the graphite files that I decided
to cleanup.

- omega.h shouldn't include "config.h".  including params.h is fine
since it is needed, but it should be within the #ifndef GCC_OMEGA_H guard.
- sese.h is required for compilation of graphite-poly.h, and basically
isn't used anywhere else (except sese.c) , so simply include it in
graphite-poly.h.
- I adjusted the rest of the graphite files . All but graphite.c guard
the enter contents of the file with HAVE_isl, but they all include a ton
of GCC includes outside the guard.  I moved them inside the guard and
ran include reduction on them all to remove the unneeded headers.
- graphite.c was similar, except it has a small hunk of code which is
compiled when HAVE_isl is false. I manually adjusted those includes to
be minimal, and ran include reduction on the rest.

I bootstrapped with HAVE_isl defined and also with it not defined on
x86_64-unknown-linux-gnu.  I ran it with no regressions with HAVE_isl
defined.

OK for trunk?

OK.
jeff