public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/97445] Some fonctions marked static inline in Linux kernel are not inlined
Date: Wed, 21 Oct 2020 18:01:33 +0000	[thread overview]
Message-ID: <bug-97445-4-Tp9kboWmDd@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-97445-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97445

--- Comment #50 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jan Hubicka <hubicka@gcc.gnu.org>:

https://gcc.gnu.org/g:caaa218f912ccf932fdb79243ded68bb462bbe63

commit r11-4192-gcaaa218f912ccf932fdb79243ded68bb462bbe63
Author: Jan Hubicka <jh@suse.cz>
Date:   Wed Oct 21 20:00:22 2020 +0200

    Inline functions with builtin_constant_p more agressively.

    This patch implements heuristics that increases inline limits (by the hints
    mechanism) for inline functions that use builtin_constant_p on parameter.
Those
    are very likely intended to be always inlined and simplify after inlining.

    The PR is about a function that we used to inline with
     --param inline-insns-single=200 but with new default of 70 for -O2 we no
longer
    do so.  Hints are currently configured to bump the bound up twice, so we
    get limit of 140 that is still not enough to inline the particular testcase
    but it should help in general.  I can implement a stronger bump if that
seems
    useful (maybe it is). The example is bit operation written as a decision
chain
    with 64 conditions.
    This blows up the limit on number of conditions we track per funtion (which
is
    30) and thus the size/time estimates are not working that well.

    gcc/ChangeLog:

            PR ipa/97445
            * ipa-fnsummary.c (ipa_dump_hints): Add
INLINE_HINT_builtin_constant_p.
            (ipa_fn_summary::~ipa_fn_summary): Free builtin_constant_p_parms.
            (ipa_fn_summary_t::duplicate): Duplicate builtin_constant_p_parms.
            (ipa_dump_fn_summary): Dump builtin_constant_p_parms.
            (add_builtin_constant_p_parm): New function
            (set_cond_stmt_execution_predicate): Update
builtin_constant_p_parms.
            (ipa_call_context::estimate_size_and_time): Set
            INLINE_HINT_builtin_constant_p..
            (ipa_merge_fn_summary_after_inlining): Merge
builtin_constant_p_parms.
            (inline_read_section): Read builtin_constant_p_parms.
            (ipa_fn_summary_write): Write builtin_constant_p_parms.
            * ipa-fnsummary.h (enum ipa_hints_vals): Add
            INLINE_HINT_builtin_constant_p.
            * ipa-inline.c (want_inline_small_function_p): Use
            INLINE_HINT_builtin_constant_p.
            (edge_badness): Use INLINE_HINT_builtin_constant_p.

    gcc/testsuite/ChangeLog:

            PR ipa/97445
            * gcc.dg/ipa/inlinehint-5.c: New test.

  parent reply	other threads:[~2020-10-21 18:01 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-15 13:41 [Bug c/97445] New: " christophe.leroy at csgroup dot eu
2020-10-15 13:46 ` [Bug c/97445] " jakub at gcc dot gnu.org
2020-10-15 14:27 ` rguenth at gcc dot gnu.org
2020-10-15 14:49 ` segher at gcc dot gnu.org
2020-10-15 14:52 ` jakub at gcc dot gnu.org
2020-10-15 15:08 ` christophe.leroy at csgroup dot eu
2020-10-15 15:13 ` christophe.leroy at csgroup dot eu
2020-10-17 16:23 ` christophe.leroy at csgroup dot eu
2020-10-17 16:31 ` christophe.leroy at csgroup dot eu
2020-10-19 12:33 ` jakub at gcc dot gnu.org
2020-10-19 12:39 ` christophe.leroy at csgroup dot eu
2020-10-19 12:57 ` christophe.leroy at csgroup dot eu
2020-10-19 12:59 ` christophe.leroy at csgroup dot eu
2020-10-19 13:01 ` christophe.leroy at csgroup dot eu
2020-10-19 15:05 ` marxin at gcc dot gnu.org
2020-10-19 15:06 ` marxin at gcc dot gnu.org
2020-10-19 15:11 ` marxin at gcc dot gnu.org
2020-10-19 15:18 ` hubicka at ucw dot cz
2020-10-19 15:33 ` marxin at gcc dot gnu.org
2020-10-19 16:13 ` hubicka at gcc dot gnu.org
2020-10-19 16:20 ` hubicka at ucw dot cz
2020-10-19 16:52 ` jakub at gcc dot gnu.org
2020-10-19 17:13 ` hubicka at ucw dot cz
2020-10-20  5:19 ` christophe.leroy at csgroup dot eu
2020-10-20  6:44   ` Jan Hubicka
2020-10-20  5:21 ` christophe.leroy at csgroup dot eu
2020-10-20  5:21 ` christophe.leroy at csgroup dot eu
2020-10-20  6:17 ` christophe.leroy at csgroup dot eu
2020-10-20  6:44 ` hubicka at ucw dot cz
2020-10-20  7:09 ` christophe.leroy at csgroup dot eu
2020-10-20  7:10 ` christophe.leroy at csgroup dot eu
2020-10-20  7:10 ` christophe.leroy at csgroup dot eu
2020-10-20  9:55 ` segher at gcc dot gnu.org
2020-10-20 10:16   ` Jan Hubicka
2020-10-20 10:16 ` hubicka at ucw dot cz
2020-10-20 10:40 ` jakub at gcc dot gnu.org
2020-10-20 11:12   ` Jan Hubicka
2020-10-20 11:12 ` hubicka at ucw dot cz
2020-10-20 11:17   ` Jan Hubicka
2020-10-20 13:12     ` Jan Hubicka
2020-10-20 11:17 ` hubicka at ucw dot cz
2020-10-20 11:45 ` hubicka at ucw dot cz
2020-10-20 13:12 ` hubicka at ucw dot cz
2020-10-20 13:28 ` christophe.leroy at csgroup dot eu
2020-10-20 13:31 ` jakub at gcc dot gnu.org
2020-10-20 13:51 ` christophe.leroy at csgroup dot eu
2020-10-20 14:18 ` jakub at gcc dot gnu.org
2020-10-20 14:22 ` christophe.leroy at csgroup dot eu
2020-10-20 14:24 ` christophe.leroy at csgroup dot eu
2020-10-20 14:29 ` jakub at gcc dot gnu.org
2020-10-20 16:58 ` jakub at gcc dot gnu.org
2020-10-20 21:19 ` segher at gcc dot gnu.org
2020-10-21  5:38 ` christophe.leroy at csgroup dot eu
2020-10-21 15:04 ` [Bug ipa/97445] " hubicka at gcc dot gnu.org
2020-10-21 15:16 ` hubicka at gcc dot gnu.org
2020-10-21 18:01 ` cvs-commit at gcc dot gnu.org [this message]
2020-10-21 18:21 ` marxin at gcc dot gnu.org
2020-10-21 18:24 ` hubicka at ucw dot cz
2020-10-21 18:25 ` marxin at gcc dot gnu.org
2020-10-21 18:34 ` hubicka at ucw dot cz
2020-10-21 18:38 ` marxin at gcc dot gnu.org
2020-10-21 23:42 ` cvs-commit at gcc dot gnu.org

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=bug-97445-4-Tp9kboWmDd@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).