[llvm-commits] [llvm-gcc-4.2] r51608 - /llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp

Chris Lattner clattner at apple.com
Wed May 28 11:19:25 PDT 2008


On May 28, 2008, at 11:11 AM, Dale Johannesen wrote:

>
> On May 28, 2008, at 10:55 AM, Evan Cheng wrote:
>>>> We want to run llvm inliner pass only when
>>>> flag_inline_trees > 1.
>>>
>>> To get the same effect as gcc in a way that works for all languages,
>>> I think we need to run the inliner if flag_inline_trees != 0 and add
>>> all functions with !DECL_INLINE to llvm.noinline.  Or would that be
>>> too expensive?
>>
>> That doesn't seem like the right solution to me. llvm language  
>> doesn't
>> have the "inline" keyword. Can we just say llvm ignore the inline
>> hint?
>
> I don't think that's a good idea; the hint should be added to the IR.
> Compilers are not at the point where they can make better decisions
> than an intelligent user about which things are good to inline,

Too bad there aren't more intelligent users out there.

> And honoring no-inline and always-inline is needed for correctness
> (assuming we accept GCC extensions as part of the language).

Right.

-Chris




More information about the llvm-commits mailing list