From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Peter Zijlstra <peterz@infradead.org>, Jakub Jelinek <jakub@redhat.com>
Cc: linux-toolchains@vger.kernel.org
Subject: Re: ilog2 vs. GCC inlining heuristics
Date: Wed, 21 Oct 2020 20:40:19 +0200 [thread overview]
Message-ID: <21556974-eea1-ed6a-ea6f-3e97a6eea4bc@csgroup.eu> (raw)
In-Reply-To: <20201021151947.GL2628@hirez.programming.kicks-ass.net>
Le 21/10/2020 à 17:19, Peter Zijlstra a écrit :
> On Wed, Oct 21, 2020 at 03:27:18PM +0200, Jakub Jelinek wrote:
>> Hi!
>>
>> Based on the GCC PR97445 discussions, I'd like to propose following change,
>> which should significantly decrease the amount of code in inline functions
>> that use ilog2, but as I'm already two decades out of the Linux kernel
>> development, I'd appreciate if some kernel developer could try that (all
>> I have done is check that it gives the same results as before) and if it
>> works submit it for inclusion into the kernel?
>
> I'll stick it in my queue and feed it to the robots.
>
I did a mpc885_ads_defconfig build with your patch. That's far better, even better than with gcc 9
without the patch.
I only have two instances of get_order() in vmlinux, one of it is used twice, the other is never user.
With -Winline, the reason for not inlining is for both because "the call is unlikely and the code
size would grow"
Christophe
next prev parent reply other threads:[~2020-10-21 18:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-21 13:27 ilog2 vs. GCC inlining heuristics Jakub Jelinek
2020-10-21 13:36 ` Christophe Leroy
2020-10-21 13:45 ` Jakub Jelinek
2020-10-21 15:19 ` Peter Zijlstra
2020-10-21 18:40 ` Christophe Leroy [this message]
2020-10-22 4:01 ` Randy Dunlap
2020-10-22 7:12 ` Jakub Jelinek
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=21556974-eea1-ed6a-ea6f-3e97a6eea4bc@csgroup.eu \
--to=christophe.leroy@csgroup.eu \
--cc=jakub@redhat.com \
--cc=linux-toolchains@vger.kernel.org \
--cc=peterz@infradead.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 NNTP newsgroup(s).