[LLVMdev] inlining hint

Eli Friedman eli.friedman at gmail.com
Wed Aug 26 16:05:50 PDT 2009


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.

-Eli




More information about the llvm-dev mailing list