public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jan Hubicka <hubicka@ucw.cz>
To: Jan Hubicka <hubicka@ucw.cz>, GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] New IPA-CP with real function cloning
Date: Thu, 14 Jul 2011 21:43:00 -0000	[thread overview]
Message-ID: <20110714212832.GC28097@kam.mff.cuni.cz> (raw)
In-Reply-To: <20110714134617.GA1349@virgil.arch.suse.de>

> 
> Well, technically they survive until after inlining (because of
> indirect inlining which also derives information from the lattices
> corresponding to node->inlined_to node.  Results of arithmetic
> functions are not going to be accessed during inlining when compiling
> any reasonable program but...

Hmm, this sounds bad.  We should move it to GTY then incrementally.  I however
though that indirect inlining looks only at jump functions, not at lattices?
> > 
> > __attribute__ ((really_bad_attribute))
> > function (int param)
> > {
> >   use param
> > }
> > 
> > and then let ipa-cp to invent param is a constant.
> 
> what would be such a "really_bad_attribute" ? 

Well, we need to go through the attribute list and prepare list of "bad guys"
instead of forbidding any attribute.
Obviously we should not give up on "pure" attribute, for example.

Another class of attributes are those referring to function arguments that needs
updating if they are still in use after clonning. I think this was original reason
for adding the check.

I am not sure if we have attributes that should prevent clonning completely.
> > > > 
> > > > can_change_sigunature will also handle apply_args.
> > > > Add VA_START code there, too.  For the other use of this flag (in i386) VA_START
> 
> The last one already is VA_START... or do you mean a different one?

I meant the code in ipa-inline-analysis.c doing the same checks but skiiping va_start since
i386 backend tests it by itself.
> > BTW currently the edges from thunks miss any profile info.
> > (i.e. it will be 0). I guess we ought to make ipa-profile pass to estimate those
> > (it is difficult ot measure count of an alias).
> > 
> 
> I'm not really looking at the edges from thunks to the actual
> function.  OTOH, I assume that edges to a thunk do have a count and
> look at that.

They do have (unless they are thunk to thunk edges), but in any case we ought to
regularize things here, sooner or later someone will get confused with counts
missing in the callgraph.
> 
> > If you walk only hot edges, then you need to make your function descent into
> > both alias refs and thunks calls, or the aliases of thunks will not be seen
> > then.
> 
> Well, looking at bits of the patch again now, aliases to thunks might
> indeed be a problem for a few pieces of it.  I'll send the patch
> nevertheless and ponder about this problem later.

Hmm, please do :)
I will look at the updated patch.

Honza
> 
> Thanks,
> 
> Martin

  reply	other threads:[~2011-07-14 21:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-23 19:53 Martin Jambor
2011-07-07 16:07 ` Jan Hubicka
2011-07-08 17:37   ` Martin Jambor
2011-07-08 19:07     ` Jan Hubicka
2011-07-14 14:15       ` Martin Jambor
2011-07-14 21:43         ` Jan Hubicka [this message]
2011-07-15 13:37           ` Martin Jambor
2011-07-10 19:44 ` Jan Hubicka
2011-07-14 15:41   ` Martin Jambor
2011-07-14 16:19     ` Jan Hubicka
  -- strict thread matches above, loose matches on Subject: below --
2011-06-15 15:41 Martin Jambor

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=20110714212832.GC28097@kam.mff.cuni.cz \
    --to=hubicka@ucw.cz \
    --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).