This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Sigh. Inlining heuristics.
- To: Mark Mitchell <mark at codesourcery dot com>
- Subject: Re: Sigh. Inlining heuristics.
- From: Daniel Berlin <dan at cgsoftware dot com>
- Date: Tue, 10 Jul 2001 13:12:27 -0400
- Cc: Daniel Berlin <dan at cgsoftware dot com>,Linus Torvalds <torvalds at transmeta dot com>,"gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- References: <6570000.994750249@warlock.codesourcery.com>
Mark Mitchell <mark@codesourcery.com> writes:
>>
>> However, we'll still mark it to be inlined *anyway*. Observe:
>>
>> #include <stdio.h>
>> struct S { void f(); };
>> void S::f() {
>> printf ("blah\n");
>> }
>>
>> int main(void)
>> {
>> S a;
>> a.f();
>> }
>
> Yes, we should not inline `S::f' here. But, we don't, using
> the 3.0 build I have on i686-pc-linux-gnu, with -O2. What is
> different?
I'm using -O3.
At -O2, it doesn't inline it.
>
> --
> Mark Mitchell mark@codesourcery.com
> CodeSourcery, LLC http://www.codesourcery.com
--
"I used to be a waiter, but I was fired for clearing tables. I
was clearing them for take off. I had them all lined up
outside. People thought it was an outdoor cafe. I said, "No,
these are leaving at 3." They were going to fire me anyway,
because I told them I thought they should put the wrapper on the
inside of the straw since that's the part you don't want to get
dirty.
"-Steven Wright