public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: "Yuan, Pengfei" <ypf@pku.edu.cn>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>, Jan Hubicka <hubicka@ucw.cz>
Subject: Re: [PATCH, 5.x/6.x/7.x] Be more conservative in early inliner if FDO is enabled
Date: Thu, 15 Sep 2016 08:44:00 -0000	[thread overview]
Message-ID: <CAFiYyc2Yb6Gp+4dn1UETmcLte9OdbAUBdGntE3LD3V_0jp9B_Q@mail.gmail.com> (raw)
In-Reply-To: <392727ce.b9c7.1572b385ece.Coremail.ypf@pku.edu.cn>

On Thu, Sep 15, 2016 at 2:21 AM, Yuan, Pengfei <ypf@pku.edu.cn> wrote:
>> I think the approach is reasonable though it might still have
>> interesting effects on
>> optimization for very small growth.  So for further experimenting it
>> would be nice
>
> Test it on SPEC CPU with FDO enabled?
>
>> to have a separate PARAM_EARLY_FDO_INLINING_INSNS or maybe simply
>> adjust the PARAM_EARLY_INLINING_INSNS default accordingly when FDO is
>> enabled?
>
> Setting PARAM_EARLY_INLINING_INSNS to 0 when FDO is enabled should be
> equivalent to my patch.

Yes.  This means it's easy to experiment with other values than zero.  Basically
early inlining is supposed to remove abstraction penalty to

 a) reduce FDO instrumentation overhead
 b) get more realistic size estimates for the inliner

a) was particularly important back in time for tramp3d, reducing
profiling runtime
1000-fold.  b) is generally important.

PARAM_EARLY_INLINING_INSNS is supposed to be a reasonable value to
get abstraction removed but IIRC we increased it quite a bit to also get more
early optimization (to get more accurate inliner estimates).

What I am saying is that reducing PARAM_EARLY_INLINING_INSNS makes
sense for FDO but reducing it to zero is probably a bit much.

Can you do your measurements with values between zero and the current
default of 14 (wow, 14 ... didn't know it's _that_ high currently ;)).
What's the
value that crosses the boundary of diminishing returns regarding to code-size
improvements for you?

Richard.

> Regards,
> Yuan, Pengfei
>
>> I'll let Honza also double-check the condition detecting FDO (it looks
>> like we should
>> have some abstraction for that).
>>
>> Thanks,
>> Richard.
>

  reply	other threads:[~2016-09-15  8:15 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-10  6:41 Yuan, Pengfei
2016-09-14 10:35 ` Richard Biener
2016-09-15  3:17   ` Yuan, Pengfei
2016-09-15  8:44     ` Richard Biener [this message]
2016-09-15 10:08       ` Yuan, Pengfei
2016-09-16  5:52       ` Yuan, Pengfei
2016-09-16  8:09         ` Jan Hubicka
2016-09-16  9:01           ` Yuan, Pengfei
2016-09-16  9:21             ` Richard Biener
2016-09-16  9:37               ` Jan Hubicka
2016-09-16 12:00                 ` Yuan, Pengfei
2016-09-16 12:56                   ` Jan Hubicka
2016-09-20  8:53                     ` Yuan, Pengfei
2016-09-20 11:44                     ` Richard Biener
2016-09-20 11:58                       ` Richard Biener
2016-09-20 12:09                         ` Yuan, Pengfei
2016-09-20 12:19                           ` Richard Biener
2016-09-20 13:10                             ` Yuan, Pengfei
2016-09-21 12:44                         ` Yuan, Pengfei
2016-09-26  4:03                   ` Yuan, Pengfei
2016-10-10  2:23                   ` PING: [PATCH] " Yuan, Pengfei
2016-10-10  9:55                     ` Richard Biener
2016-10-10 10:52                       ` Yuan, Pengfei

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=CAFiYyc2Yb6Gp+4dn1UETmcLte9OdbAUBdGntE3LD3V_0jp9B_Q@mail.gmail.com \
    --to=richard.guenther@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hubicka@ucw.cz \
    --cc=ypf@pku.edu.cn \
    /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).