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

Reply via email to