public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Jan Hubicka <hubicka@ucw.cz>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: Even more inliner cleanups
Date: Mon, 18 Apr 2011 20:55:00 -0000	[thread overview]
Message-ID: <BANLkTinrZgS_+=zwbmuJ9hP75EMPYwLGDQ@mail.gmail.com> (raw)
In-Reply-To: <20110418184412.GB4096@kam.mff.cuni.cz>

On Mon, Apr 18, 2011 at 11:44 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
> Hi,
> this patch is result of another pass through ipa-inline.c cleaning up
> confused and outdated comments.
>
> I also fixed accounting of growth caused by the small function inlining.
> We do not want to base it on program size before flattening, but afterwards.
> Just like always inlines are not (and should not) be accounted.
>
> I also broked out logic testing whether function should be inlined
> as inlined once into want_inline_function_called_once_p.
> Since it is now common to see that inlining functions called once
> makes a mistake inlining something terribly unimportant that prevents
> it to inline hot call later, I added simple logic to inline first
> hot edges and cold edges just afterwards.
>
> Finally I forgot to update recursive call inlining to be driven by frequencies
> when profile is missing.
>
> Bootstrapped/regtested x86_64-linux and comitted.
>
>        * ipa-inline.c: Fix comment typos; do not inline gt-ipa-inline.h
>        (want_inline_function_called_once_p): Break out the logic from
>        ipa_inline.
>        (edge_badness): Ensure that profile is not misupdated.
>        (lookup_recursive_calls): Prioritize by call frequencies.
>        (inline_small_functions): Move program size estimates here;
>        actually process whole queue even when unit growth has been
>        met. (to properly compute inline_failed reasons and for the
>        case unit size decrease.) Revisit comments on recursive
>        inlining.
>        (ipa_inline): Remove unit summary code; first inline hot calls
>        of functions called once, cold calls next.
>        (order, nnodes): Remove unused variables.
>        * Makefile.in (ipa-inline.o): No longer depent on ggc files.
>        (GTFILES): Remove ipa-inline.c
>        * sel-sched.c (fill_insns): Silence uninitialized var warning.
>

This caused:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48671


-- 
H.J.

      reply	other threads:[~2011-04-18 20:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-18 18:52 Jan Hubicka
2011-04-18 20:55 ` H.J. Lu [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='BANLkTinrZgS_+=zwbmuJ9hP75EMPYwLGDQ@mail.gmail.com' \
    --to=hjl.tools@gmail.com \
    --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).