From: Jan Hubicka <hubicka@ucw.cz>
To: Diego Novillo <dnovillo@google.com>
Cc: Rafael Espindola <espindola@google.com>,
gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [lto][patch] Move the call to execute_all_ipa_transforms to cgraphunit.c
Date: Tue, 11 Nov 2008 23:14:00 -0000 [thread overview]
Message-ID: <20081111231111.GG27401@atrey.karlin.mff.cuni.cz> (raw)
In-Reply-To: <b798aad50811111453m7da74c0aradf8dfe50409fa86@mail.gmail.com>
> 2008/11/11 Rafael Espindola <espindola@google.com>:
>
> > So, which one is your favorite? :-) Assuming disabling the pass has no
> > regressions, should I commit that?
>
> Yes, thanks. Converting pass_set_nothrow_function_flag into an IPA
> pass is the right approach. In fact, I like Jan's idea of bundling it
> with the const/pure pass. However, that can wait. Could you open a
> PR for it?
Well, things seems a bit more complicated here. It seems to make sense
to do the pass both locally and at IPA level. It probably should be
moved to gimple though.
I was just looking into inliner heuristics to make it more scalable. On
C++ beasts like tramp3d or botan we miss a lot of early optimization
oppurtunities because we don't know if functions are const/pure/nothrow.
So I am thinking about scheduling simple local pass into early
optimizations that will look at current function body and set the flags.
(we also need alias analysis in early stages and do some function call
regularization). Those should make early optimizers a lot more
effective and make inlining heuristics (and IPA in general) fed with a
lot less garbage. Current trick of ignoring load/stores for program
size metrics has many sick side effects and for tramp3d we tend to
handle functions containing over 9000 loads+stores as being cheap to
inline (and indeed we optimize those 9000 statement later, but it is all
unnecesarily expensive and unsafe in a way that on different code base
where loads/stores do not optimize out we will end up inlining very
large constructors even at -Os)
We tend to simplify function bodies a lot in our late optimization
passes quite likely turning them to nothrow that in turn affect size of
dwarf2out tables quite a lot, so still doing this late nothrow discovery
seems to make sense.
So I guess ideally we should have constpure pass handling nothrow too
and having option to work either locally or doing IPA propagation and do
it on all three stages to be able to clean up the abstraction penalties
effectivly... Don't seem to be compilation time overkill here, but I
guess little experimentation will be needed.
Honza
>
>
> > And if it has? Should I debug the above problem?
>
> No, it would be too much hassle for no gain. The pass must go away.
>
>
> Diego.
prev parent reply other threads:[~2008-11-11 23:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-11 17:31 Rafael Espindola
2008-11-11 20:23 ` Jan Hubicka
2008-11-11 22:49 ` Rafael Espindola
2008-11-11 22:53 ` Jan Hubicka
2008-11-11 23:11 ` Diego Novillo
2008-11-11 23:18 ` Jan Hubicka
2008-11-11 23:41 ` Rafael Espindola
2008-11-11 23:59 ` Jan Hubicka
2008-11-12 0:01 ` Diego Novillo
2008-11-12 0:04 ` Jan Hubicka
2008-11-12 0:57 ` Jan Hubicka
2008-11-12 2:02 ` Diego Novillo
2008-11-12 10:01 ` Rafael Espindola
2008-11-12 16:02 ` Jan Hubicka
2008-11-12 16:35 ` Jan Hubicka
2008-11-11 23:53 ` Diego Novillo
2008-11-11 22:54 ` Diego Novillo
2008-11-11 23:14 ` Jan Hubicka [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=20081111231111.GG27401@atrey.karlin.mff.cuni.cz \
--to=hubicka@ucw.cz \
--cc=dnovillo@google.com \
--cc=espindola@google.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).