[LLVMdev] inlining hint

Evan Cheng evan.cheng at apple.com
Wed Aug 26 16:20:29 PDT 2009


On Aug 26, 2009, at 4:05 PM, Eli Friedman wrote:

> On Wed, Aug 26, 2009 at 3:57 PM, Evan Cheng<evan.cheng at apple.com>  
> wrote:
>>
>> On Aug 26, 2009, at 2:31 PM, David Vandevoorde wrote:
>>
>>>
>>>
>>>> I know/hope that the proposal isn't for the inlinehint to be a
>>>> synonym
>>>> for "force inline", it would just raise the threshold to increase  
>>>> the
>>>> likeliness that it would be inlined.  The question is whether
>>>> "something being c++ inline" in any way is really trustworthy,  
>>>> and if
>>>> so, whether we should look at syntactic vs semantic inline.
>>>
>>>
>>> FWIW, I've been involved in a couple of attempts by commercial
>>> compilers to relegate "inline" to the same status as "register" --  
>>> an
>>> obsolete hint ignored by the compiler -- and so far that always  
>>> proved
>>> to be unpractical because some critical calls that were previously
>>> inlined were no longer being inlined after the change.  (That's just
>>> annecdotal, of course: LLVM may have gotten good enough to make it
>>> practical.  If that's the case, I still think it's too early to
>>> write C
>>> ++ code with that assumption.)
>>
>> It's actually the other way around. llvm has always ignored the
>> "inline" keyword and now we are finding out we are missing some
>> important cases.
>
> It would help this discussion if you could post some examples.

We know for a fact WebKit suffered when we turned off gcc inliner:  
pr2353. Dale is looking at this. Unfortunately it's a huge code base,  
it has not been easy to extract out smaller test cases. It's all part  
of the investigation that's going on right now.

Evan

>
> -Eli




More information about the llvm-dev mailing list