From: Martin Jambor <mjambor@suse.cz>
To: Jan Hubicka <hubicka@ucw.cz>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] New IPA-CP with real function cloning
Date: Fri, 15 Jul 2011 13:37:00 -0000 [thread overview]
Message-ID: <20110715130825.GA3483@alvy.suse.cz> (raw)
In-Reply-To: <20110714212832.GC28097@kam.mff.cuni.cz>
Hi,
On Thu, Jul 14, 2011 at 11:28:32PM +0200, Jan Hubicka wrote:
> >
> > 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?
You are right, that is however basically an omission of mine - it was
supposed to handle the case below but I do not look into the
lattices. I will fix that later.
Nevertheless, the calls to ipa_cst_from_jfunc from
ipa-inline-analyzis.c do access the values of lattices. Potentially
all of them. So I will GTY lattices too.
Thanks,
Martin
/* Verify that simple indirect calls are inlined even without early
inlining.. */
/* { dg-do compile } */
/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining" } */
extern void non_existent(int);
int __attribute__ ((noinline,noclone)) get_input(void)
{
return 1;
}
static void hooray ()
{
non_existent (1);
}
void hip2 (void (*g)())
{
non_existent (2);
g ();
}
static void
__attribute__ ((noinline))
hip1 (void (*f)(void (*)()), void (*g)())
{
non_existent (2);
f (g);
}
int main (int argc, int *argv[])
{
int i;
for (i = 0; i < get_input (); i++)
hip1 (hip2, hooray);
return 0;
}
/* { dg-final { scan-ipa-dump "hooray\[^\\n\]*inline copy in main" "inline" } } */
/* { dg-final { scan-ipa-dump "hip2\[^\\n\]*inline copy in main" "inline" } } */
/* { dg-final { cleanup-ipa-dump "inline" } } */
next prev parent reply other threads:[~2011-07-15 13:04 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
2011-07-15 13:37 ` Martin Jambor [this message]
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=20110715130825.GA3483@alvy.suse.cz \
--to=mjambor@suse.cz \
--cc=gcc-patches@gcc.gnu.org \
--cc=hubicka@ucw.cz \
/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).