public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: Andrew MacLeod <amacleod@redhat.com>,
	       gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [patch] options.h and comments on a couple of tm.h #include's
Date: Wed, 15 Jul 2015 16:53:00 -0000	[thread overview]
Message-ID: <55A68F79.3020600@redhat.com> (raw)
In-Reply-To: <55A68B1B.7000201@redhat.com>

On 07/15/2015 10:32 AM, Andrew MacLeod wrote:
> I think this is the last patch before I start include reductions and
> cleanups.
>
> options.h is generated with the following snippet:
>
> /* Anything that includes tm.h, does not necessarily need this.  */"
> #if !defined(GCC_TM_H)
> #include "input.h" /* for location_t */
> <...>
> // bunch of prototypes which use location_t
> <...>
> #endif
>
> This is primarily so that the generator files can compile which don't
> include input.h, and thus have no location_t defined.
> options.h is usually included by tm.h, but some front end files include
> just option.h, and the inclusion of input.h is so that they don't have
> to I guess.
>
> input.h is now included by coretypes.h, so any of these files that care
> about the prototypes  already have input.h.  It seems to make more sense
> to simply check if input.h has been included instead of a weird
> contortion on tm.h, which is really unrelated in many ways. (I'm simply
> checking if UNKNOWN_LOCATION is defined)   In fact, the current approach
> introduces a latent ordering issue in a number of front end files...
> they include options.h because they dont need tm.h, but then include
> tm.h indirectly through target.h..  if the include order is changed such
> that target.h was included *before* options.h (or instead of), some
> files fail to compile because they no longer see these prototypes. this
> just cleans that crud up.
>
> The other 4 files in the patch include tm.h on a line with a multi-line
> comment following it.  The comment is suppose to reflect what macros the
> include is for, but at least some of these are out of date.. no one
> updates them. The information they convey is easily determined in an up
> to date way by simply removing the include from the list and compiling
> the .o.  Plus many other front end files dont bother with this, so its
> inconsistent.  And my real motivation is because it plays havoc with my
> automatic include maniupulations :-)    So i propose just removing the
> comments.
>
> I didnt bother trying to merge options.h and tm.h in various files,
> mostly because for the include reduction, Im going to flatten option.h
> out of tm.h and tm.h/hard-reg-set.h  out of target.h.  I wont bother
> submitting that to mainline since its going to affect all the same files
> I'll be checking in later.  When the reduction is done, I'll look at who
> actually needed options.h, tm.h, target.h and maybe they'll probably get
> mashed back to the way they are now(or maybe they wont... :-)  it'll
> depend on the usage patterns.  In any case, i dont need to pollute trunk
> until I know for sure.
>
> This bootstraps on x86_64-unknown-linux-gnu with no new regressions.  ok
> for trunk?
OK.
jeff

      reply	other threads:[~2015-07-15 16:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-15 16:48 Andrew MacLeod
2015-07-15 16:53 ` Jeff Law [this message]

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=55A68F79.3020600@redhat.com \
    --to=law@redhat.com \
    --cc=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).