From: Kurt Garloff <garloff@suse.de>
To: Andi Kleen <ak@suse.de>
Cc: Andrew Morton <akpm@digeo.com>, linux-kernel@vger.kernel.org
Subject: Re: [patch] work around gcc-3.x inlining bugs
Date: Thu, 6 Mar 2003 22:28:45 +0100 [thread overview]
Message-ID: <20030306212845.GA2292@nbkurt> (raw)
In-Reply-To: <p73fzq067an.fsf@amdsimf.suse.de>
[-- Attachment #1: Type: text/plain, Size: 1857 bytes --]
Hi Andi,
On Thu, Mar 06, 2003 at 12:52:48PM +0100, Andi Kleen wrote:
> Andrew Morton <akpm@digeo.com> writes:
>
> > This patch:
> [...]
>
> I experimented with -finline-limit=<huge number> to get it to obey inline,
> but that doesn't fully work. The only way to get it to work in 3.2 and 3.3
> is to specify various long and weird --param arguments. In 3.0 the only
> way is to change the values in the compiler source and recompile.
--param max-inline-insns-single
The fact that this parameter does not get initialized by using
-finline-limit is a bug. A fix for this has already gone into CVS HEAD
(3.4) and is pending for 3.3.
[... ]
> I think it is the right thing to do. In kernel land when we say inline
> we mean inline. Don't expect the compiler to second guess that,
> especially since it doesn't seem to be very good at that.
The compiler solely judges by the size of the function to be inlined,
no magic involved.
There are two reasons, why this may not be what you expect:
- The allowable size can get smaller if in the function from that
you're calling and the one above and ... were already inlined.
At some moment this recursive inlining has to be stopped to
not results in excessive compile time resource requirements
- When calculating the size of a function, the compiler counts
tree tokens, each estimated to yield 10 RTL instructions.
It does unfortunately not take into account code that will
be eliminated by optimization (constant propagation, dead
code elimination, ...) nor does it have a very good idea
about the size of inline assembly.
Regards,
--
Kurt Garloff <garloff@suse.de> Eindhoven, NL
GPG key: See mail header, key servers SuSE Labs
SuSE Linux AG, Nuernberg, DE SCSI, Security
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2003-03-07 0:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20030306032208.03f1b5e2.akpm@digeo.com.suse.lists.linux.kernel>
2003-03-06 11:52 ` [patch] work around gcc-3.x inlining bugs Andi Kleen
2003-03-06 20:26 ` H. Peter Anvin
2003-03-06 21:28 ` Kurt Garloff [this message]
2003-03-09 22:40 ` Kurt Garloff
2003-03-06 11:22 Andrew Morton
2003-03-06 15:57 ` Jeff Garzik
2003-03-06 20:32 ` Daniel Egger
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=20030306212845.GA2292@nbkurt \
--to=garloff@suse.de \
--cc=ak@suse.de \
--cc=akpm@digeo.com \
--cc=linux-kernel@vger.kernel.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