public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew MacLeod <amacleod@redhat.com>
To: Jeff Law <law@redhat.com>, gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [patch 4/4] Remove options.h/tm.h and function.h as dependencies and include compile time prerequisites in cgraph.h
Date: Thu, 25 Jun 2015 16:44:00 -0000	[thread overview]
Message-ID: <558C2F67.1030503@redhat.com> (raw)
In-Reply-To: <558C2AAB.4010906@redhat.com>

On 06/25/2015 12:22 PM, Jeff Law wrote:
> On 06/25/2015 07:27 AM, Andrew MacLeod wrote:
>>
>> ipa_opt_pass is given a forward declaration in function.h, but it really
>> consumed by cgraph.h   By moving that forward declaration to cgraph, it
>> no longer requires function.h to be in the include path.   It actually
>> defined in tree-pass.h, the the *right* thing would be to require
>> tree-pass.h, but that seems unnecessary. Another option would be to do
>> the forward declaration in coretypes.h.. maybe that would be better?
> It doesn't feel to me like ipa_opt_pass belongs in coretypes.h. I'd 
> really prefer to not need ipa_opt_pass in cgraph.h, but as an interm 
> step this seems fine.

yeah, the problem is that a cgraph node has a vector of these elements:

    /* Interprocedural passes scheduled to have their transform functions
      applied next time we execute local pass on them.  We maintain it
      per-function in order to allow IPA passes to introduce new 
functions.  */
   vec<ipa_opt_pass> GTY((skip)) ipa_transforms_to_apply;


I think its a shortcoming of the GTY parsing that I cant say
vec<struct ipa_opt_pass_d *> GTY((skip)) ipa_transforms_to_apply;

I tried that, and no cigar :-P


its not straightforward to get rid of completely without trickery. I'll 
leave it as is for now.

Andrew

      reply	other threads:[~2015-06-25 16:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-25 13:31 Andrew MacLeod
2015-06-25 16:22 ` Jeff Law
2015-06-25 16:44   ` Andrew MacLeod [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=558C2F67.1030503@redhat.com \
    --to=amacleod@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=law@redhat.com \
    /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).