public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Michel LESPINASSE <walken@zoy.org>
To: Carlo Wood <carlo@alinoe.com>
Cc: gcc@gcc.gnu.org
Subject: Re: issues with inlining
Date: Thu, 09 Jan 2003 21:40:00 -0000	[thread overview]
Message-ID: <20030109193921.GB31311@zoy.org> (raw)
In-Reply-To: <20021219012212.GA26426@alinoe.com>

Hi Carlo,

On Thu, Dec 19, 2002 at 02:22:12AM +0100, Carlo Wood wrote:
> The following problems have been spotted:

[quoted below]

Did you get any replies to your email ? I've complained about just the
same issues previously without much success... issues 1) and 2) being
the most important for me.

Cheers,

> 1) -Winline doesn't give me a warning when a function is
>    not inlined, even while I am using the inline keyword
>    for it.
> 2) g++ 3.2.1 seems to totally ignore the inline keyword
>    and do as it pleases when being used with -O3.  
>    Unfortunately, I know better than the compiler what
>    should be inlined - so, ignoring the inline keyword
>    and inlining other functions results in much slower
>    code.
> 3) Apparently gcc is still inlining "top down", meaning
>    that when a() calls b() which calls c() which calls d(),
>    then b() is inlined into a(), c() is inlined into
>    d() and when then the function becomes too big, it
>    stops.  THIS IS HORRIBLE!!!  This *definitely* needs
>    to be changed into that d() is inlined into c(),
>    and if the function isn't getting too big, then c()
>    into b() etc.
> 4) The instruction limit that can be set with -finline-limit
>    seems to count instructions before optimization...
>    This means that I need to give a limit of 8000 instructions
>    before everything is inlined - although after optimization
>    hardly anything is left (maybe 50 to 100 instructions, way
>    below the default 600 threshold).
>    By the time I get my inner functions inlined this way,
>    EVERYTHING is inlined (I get one big function call of
>    120,000 instructions :/ (after compiling 60 minutes)).

-- 
Michel "Walken" LESPINASSE
Is this the best that god can do ? Then I'm not impressed.

  reply	other threads:[~2003-01-09 19:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-18 18:32 Carlo Wood
2003-01-09 21:40 ` Michel LESPINASSE [this message]
2003-01-09 21:50   ` Andrew Haley
2003-01-09 22:52     ` Michel LESPINASSE
2003-01-10  0:15       ` Carlo Wood
2003-01-19 19:16         ` Alexandre Oliva
2003-01-19 20:49           ` Diego Novillo

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=20030109193921.GB31311@zoy.org \
    --to=walken@zoy.org \
    --cc=carlo@alinoe.com \
    --cc=gcc@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).