diff mbox

[1/4] Separate gimple.[ch] and gimplify.[ch]

Message ID 5282847C.10807@redhat.com
State New
Headers show

Commit Message

Andrew MacLeod Nov. 12, 2013, 7:41 p.m. UTC
On 11/12/2013 02:23 PM, Jeff Law wrote:
> On 11/11/13 14:03, Andrew MacLeod wrote:
>>
>> So on to the anomaly that causes the issue. force_gimple_operand* is
>> extensively used by the middle end, but not by the front end at all. The
>> front ends do not use the statement iterators, but 2 of the
>> force_gimple_operand() routines work with gsi's, and as such, have "enum
>> gsi_iterator_update" in the prototype.   This means that gimplify.h will
>> not compile without understanding what enum gsi_iterator_update is, but
>> no front end routine ever needs it.  the choices are:
>>
>>   a) put "enum gsi_iterator_update" in gimple-iterator.h where it
>> belongs and force anyone including gimpllfy.h to include it, even though
>> no front end ever uses the routines that require it.
>>   b) leave "enum gsi_iterator_update" in gimple.h, and require anyone
>> using gimplify.h to include gimple.h. Similar circumstance, but at least
>> a few places also require gimple.h...
>>   c) put enum gsi_iterator_update" in coretypes.h until such time that
>> the front end interface is better defined and no longer requires it
>>   d) split gimplifcation now into 2 parts, gimplify.[ch] for the front
>> ends which doesn't include those routines that only the middle end
>> requires, and gimplfy-be.[ch] for the routines which are used
>> exclusively by the BE.  this will allow all the types to go where they
>> belong, only only include the bits things actually need.
>>
>> My order of preference is d) then c)... a) is a distant third, and I
>> really dislike  b).... for what thats worth... opinions on how to
>> structure it?
> I'd go with "d" as well.  "c" is quick and easy but just deferrs the 
> problem.
>
>
>>
>> Anyway, these 4 set sof patches bootstrap on x86_64-unknown-linux-gnu
>> with no new regressions. I've built all languages, and configured/built
>> stage 1 of all the targets that utilized gimple.h, replacing gimple.h
>> with gimplify,h to ensure they compile.  Ive also tried seeing if any of
>> the language parts required gimplify.h, or gimple.h, or just some other
>> conponent  that was being included indirectly... so there aree some
>> minor cutbacks on includes there.
>>
>> patch 1 is the main changes,
>> patch 2 contains the include changes for the body of the middle/back end
>> patch 3 are the front end changes
>> patch4  has the config/* changes for any file which used gimple.h and I
>> built stage 1 for.
>>
>> OK for mainline?
> 1-3 are good.  You didn't include a patch in #4 :-)  Assuming it does 
> the obvious things, I'm comfortable pre-approving that hunk as wel.
>
> jeff
>
oops.  it pretty obvious :-)  for the record

Andrew
diff mbox

Patch


	* config/aarch64/aarch64.c: Include gimplify.h instead of gimple.h.
	* config/alpha/alpha.c: Likewise.
	* config/darwin.c: Likewise.
	* config/i386/i386.c: Likewise.
	* config/ia64/ia64.c: Likewise.
	* config/mep/mep.c: Likewise.
	* config/mips/mips.c: Likewise.
	* config/rs6000/rs6000.c: Likewise.
	* config/s390/s390.c: Likewise.
	* config/sh/sh.c: Likewise.
	* config/sparc/sparc.c: Likewise.
	* config/spu/spu.c: Likewise.
	* config/stormy16/stormy16.c: Likewise.
	* config/tilegx/tilegx.c: Likewise.
	* config/tilepro/tilepro.c: Likewise.
	* config/xtensa/xtensa.c: Likewise.

Index: config/aarch64/aarch64.c
===================================================================
*** config/aarch64/aarch64.c	(revision 204496)
--- config/aarch64/aarch64.c	(working copy)
***************
*** 42,48 ****
  #include "recog.h"
  #include "langhooks.h"
  #include "diagnostic-core.h"
! #include "gimple.h"
  #include "optabs.h"
  #include "dwarf2.h"
  #include "cfgloop.h"
--- 42,48 ----
  #include "recog.h"
  #include "langhooks.h"
  #include "diagnostic-core.h"
! #include "gimplify.h"
  #include "optabs.h"
  #include "dwarf2.h"
  #include "cfgloop.h"
Index: config/alpha/alpha.c
===================================================================
*** config/alpha/alpha.c	(revision 204496)
--- config/alpha/alpha.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 48,54 ****
  #include "debug.h"
  #include "langhooks.h"
  #include "splay-tree.h"
! #include "gimple.h"
  #include "gimple-ssa.h"
  #include "tree-ssanames.h"
  #include "tree-stdarg.h"
--- 48,54 ----
  #include "debug.h"
  #include "langhooks.h"
  #include "splay-tree.h"
! #include "gimplify.h"
  #include "gimple-ssa.h"
  #include "tree-ssanames.h"
  #include "tree-stdarg.h"
Index: config/darwin.c
===================================================================
*** config/darwin.c	(revision 204496)
--- config/darwin.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 45,51 ****
  #include "df.h"
  #include "debug.h"
  #include "obstack.h"
! #include "gimple.h"
  #include "lto-streamer.h"
  
  /* Darwin supports a feature called fix-and-continue, which is used
--- 45,51 ----
  #include "df.h"
  #include "debug.h"
  #include "obstack.h"
! #include "gimplify.h"
  #include "lto-streamer.h"
  
  /* Darwin supports a feature called fix-and-continue, which is used
Index: config/i386/i386.c
===================================================================
*** config/i386/i386.c	(revision 204496)
--- config/i386/i386.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 47,53 ****
  #include "langhooks.h"
  #include "reload.h"
  #include "cgraph.h"
! #include "gimple.h"
  #include "dwarf2.h"
  #include "df.h"
  #include "tm-constrs.h"
--- 47,53 ----
  #include "langhooks.h"
  #include "reload.h"
  #include "cgraph.h"
! #include "gimplify.h"
  #include "dwarf2.h"
  #include "df.h"
  #include "tm-constrs.h"
Index: config/ia64/ia64.c
===================================================================
*** config/ia64/ia64.c	(revision 204496)
--- config/ia64/ia64.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 49,55 ****
  #include "tm_p.h"
  #include "hash-table.h"
  #include "langhooks.h"
! #include "gimple.h"
  #include "intl.h"
  #include "df.h"
  #include "debug.h"
--- 49,55 ----
  #include "tm_p.h"
  #include "hash-table.h"
  #include "langhooks.h"
! #include "gimplify.h"
  #include "intl.h"
  #include "df.h"
  #include "debug.h"
Index: config/mep/mep.c
===================================================================
*** config/mep/mep.c	(revision 204496)
--- config/mep/mep.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 47,53 ****
  #include "target-def.h"
  #include "langhooks.h"
  #include "df.h"
! #include "gimple.h"
  #include "opts.h"
  #include "dumpfile.h"
  
--- 47,53 ----
  #include "target-def.h"
  #include "langhooks.h"
  #include "df.h"
! #include "gimplify.h"
  #include "opts.h"
  #include "dumpfile.h"
  
Index: config/mips/mips.c
===================================================================
*** config/mips/mips.c	(revision 204496)
--- config/mips/mips.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 50,56 ****
  #include "common/common-target.h"
  #include "langhooks.h"
  #include "sched-int.h"
! #include "gimple.h"
  #include "bitmap.h"
  #include "diagnostic.h"
  #include "target-globals.h"
--- 50,56 ----
  #include "common/common-target.h"
  #include "langhooks.h"
  #include "sched-int.h"
! #include "gimplify.h"
  #include "bitmap.h"
  #include "diagnostic.h"
  #include "target-globals.h"
Index: config/rs6000/rs6000.c
===================================================================
*** config/rs6000/rs6000.c	(revision 204496)
--- config/rs6000/rs6000.c	(working copy)
***************
*** 51,57 ****
  #include "reload.h"
  #include "cfgloop.h"
  #include "sched-int.h"
! #include "gimple.h"
  #include "intl.h"
  #include "params.h"
  #include "tm-constrs.h"
--- 51,57 ----
  #include "reload.h"
  #include "cfgloop.h"
  #include "sched-int.h"
! #include "gimplify.h"
  #include "intl.h"
  #include "params.h"
  #include "tm-constrs.h"
Index: config/s390/s390.c
===================================================================
*** config/s390/s390.c	(revision 204496)
--- config/s390/s390.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 47,53 ****
  #include "debug.h"
  #include "langhooks.h"
  #include "optabs.h"
! #include "gimple.h"
  #include "df.h"
  #include "params.h"
  #include "cfgloop.h"
--- 47,53 ----
  #include "debug.h"
  #include "langhooks.h"
  #include "optabs.h"
! #include "gimplify.h"
  #include "df.h"
  #include "params.h"
  #include "cfgloop.h"
Index: config/sh/sh.c
===================================================================
*** config/sh/sh.c	(revision 204496)
--- config/sh/sh.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 48,54 ****
  #include "sched-int.h"
  #include "params.h"
  #include "ggc.h"
! #include "gimple.h"
  #include "cfgloop.h"
  #include "alloc-pool.h"
  #include "tm-constrs.h"
--- 48,54 ----
  #include "sched-int.h"
  #include "params.h"
  #include "ggc.h"
! #include "gimplify.h"
  #include "cfgloop.h"
  #include "alloc-pool.h"
  #include "tm-constrs.h"
Index: config/sparc/sparc.c
===================================================================
*** config/sparc/sparc.c	(revision 204496)
--- config/sparc/sparc.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 46,52 ****
  #include "target.h"
  #include "target-def.h"
  #include "common/common-target.h"
! #include "gimple.h"
  #include "langhooks.h"
  #include "reload.h"
  #include "params.h"
--- 46,52 ----
  #include "target.h"
  #include "target-def.h"
  #include "common/common-target.h"
! #include "gimplify.h"
  #include "langhooks.h"
  #include "reload.h"
  #include "params.h"
Index: config/spu/spu.c
===================================================================
*** config/spu/spu.c	(revision 204496)
--- config/spu/spu.c	(working copy)
***************
*** 45,51 ****
  #include "sched-int.h"
  #include "params.h"
  #include "machmode.h"
! #include "gimple.h"
  #include "tm-constrs.h"
  #include "ddg.h"
  #include "sbitmap.h"
--- 45,51 ----
  #include "sched-int.h"
  #include "params.h"
  #include "machmode.h"
! #include "gimplify.h"
  #include "tm-constrs.h"
  #include "ddg.h"
  #include "sbitmap.h"
Index: config/stormy16/stormy16.c
===================================================================
*** config/stormy16/stormy16.c	(revision 204496)
--- config/stormy16/stormy16.c	(working copy)
***************
*** 43,49 ****
  #include "target-def.h"
  #include "tm_p.h"
  #include "langhooks.h"
! #include "gimple.h"
  #include "df.h"
  #include "reload.h"
  #include "ggc.h"
--- 43,49 ----
  #include "target-def.h"
  #include "tm_p.h"
  #include "langhooks.h"
! #include "gimplify.h"
  #include "df.h"
  #include "reload.h"
  #include "ggc.h"
Index: config/tilegx/tilegx.c
===================================================================
*** config/tilegx/tilegx.c	(revision 204496)
--- config/tilegx/tilegx.c	(working copy)
***************
*** 40,46 ****
  #include "dwarf2.h"
  #include "timevar.h"
  #include "tree.h"
! #include "gimple.h"
  #include "cfgloop.h"
  #include "tilegx-builtins.h"
  #include "tilegx-multiply.h"
--- 40,46 ----
  #include "dwarf2.h"
  #include "timevar.h"
  #include "tree.h"
! #include "gimplify.h"
  #include "cfgloop.h"
  #include "tilegx-builtins.h"
  #include "tilegx-multiply.h"
Index: config/tilepro/tilepro.c
===================================================================
*** config/tilepro/tilepro.c	(revision 204496)
--- config/tilepro/tilepro.c	(working copy)
***************
*** 41,47 ****
  #include "dwarf2.h"
  #include "timevar.h"
  #include "tree.h"
! #include "gimple.h"
  #include "cfgloop.h"
  #include "tilepro-builtins.h"
  #include "tilepro-multiply.h"
--- 41,47 ----
  #include "dwarf2.h"
  #include "timevar.h"
  #include "tree.h"
! #include "gimplify.h"
  #include "cfgloop.h"
  #include "tilepro-builtins.h"
  #include "tilepro-multiply.h"
Index: config/xtensa/xtensa.c
===================================================================
*** config/xtensa/xtensa.c	(revision 204496)
--- config/xtensa/xtensa.c	(working copy)
*************** along with GCC; see the file COPYING3.
*** 46,52 ****
  #include "target.h"
  #include "target-def.h"
  #include "langhooks.h"
! #include "gimple.h"
  #include "df.h"
  
  
--- 46,52 ----
  #include "target.h"
  #include "target-def.h"
  #include "langhooks.h"
! #include "gimplify.h"
  #include "df.h"