public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: Jan Hubicka <hubicka@ucw.cz>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: Inliner badness metric tweak
Date: Mon, 30 Mar 2015 09:25:00 -0000	[thread overview]
Message-ID: <CAFiYyc0Tgg0MM5hJdDU7n9H9goyscf_n=y2k7V_wONcg-w8evA@mail.gmail.com> (raw)
In-Reply-To: <20150330014542.GC10552@kam.mff.cuni.cz>

On Mon, Mar 30, 2015 at 3:45 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
> Hi,
> this patch makes inline metric to be
>        estimate_speedup
>   ---------------------------- (over)
>   edge_growth^2*overall_growth
>
> This is intended to make stronger push on inliner to preffer functions with
> smaller growth and do not take overall growth (that is expected unit growth
> after inlining all calls to a give function) so seriously.
>
> This solve code size regression for tramp3d and also improve DLV. I tested it
> on firefox with resonable results and on subset of SPEC that caused inliner
> issues in past.
>
> Lacking access to SUSE's periodic testers, I intend to commit it today and
> watch them for possible regressions.
>
> Bootstrapped/regtested x86_64-linux.
>
>         PR ipa/65076
>         * ipa-inline.c (edge_badness): Base denominator on callee's
>         grwoth squared.
>
> Index: ipa-inline.c
> ===================================================================
> --- ipa-inline.c        (revision 221757)
> +++ ipa-inline.c        (working copy)
> @@ -1099,7 +1099,7 @@ edge_badness (struct cgraph_edge *edge,
>         numerator = numerator >> 11;
>        denominator = growth;
>        if (callee_info->growth > 0)
> -       denominator *= callee_info->growth;
> +       denominator *= callee_info->growth * callee_info->growth;

For sure a comment explaining this would be good ...

>        badness = - numerator / denominator;
>

  reply	other threads:[~2015-03-30  9:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-30  1:45 Jan Hubicka
2015-03-30  9:25 ` Richard Biener [this message]
2015-04-01 15:36 ` H.J. Lu
2015-04-02  4:47   ` Jan Hubicka

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='CAFiYyc0Tgg0MM5hJdDU7n9H9goyscf_n=y2k7V_wONcg-w8evA@mail.gmail.com' \
    --to=richard.guenther@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).