[llvm-commits] r55638 - /llvm/trunk/include/llvm/Function.h

Evan Cheng evan.cheng at apple.com
Thu Oct 2 10:24:41 PDT 2008


On Oct 1, 2008, at 9:17 AM, Devang Patel wrote:

>
> On Oct 1, 2008, at 12:54 AM, Duncan Sands wrote:
>
>> On Tuesday 30 September 2008 18:28:58 Devang Patel wrote:
>>>
>>> On Sep 30, 2008, at 12:39 AM, Duncan Sands wrote:
>>>
>>>>> Ignore inliner for a while, and decide what code generator should
>>>>> do
>>>>> for following ?
>>>>>
>>>>> define float @foo(float %a, float %b) x86_no_sse {
>>>>>      %t = mul float %a, %b
>>>>>      ret float %t
>>>>> }
>>>>
>>>> It would use the x86 floating point stack, like it does now
>>>> if you compile with -mattr=-sse.  This is less efficient than
>>>> using sse.
>>>
>>> So, I guess you answered your question.
>>
>> So what you are saying is: if function A is marked no-sse,
>> and it calls function B which is marked sse, than B will
>> not be inlined into A if B contains any floating point
>> operations (for example, a fp multiplication)?
>
> Yes, if performance is important, otherwise let it use less efficient
> floating point stack. So this is a policy decision. I understand that
> you want inliner to not inline B into A in this case.

I don't think we want the passes that make use function notes to guess  
why one function is marked no-see and another is marked sse. It could  
be for performance reason or for correctness reason. And these notes  
don't really tell whether using sse is more efficient or not.

I'd prefer just keeping it simple. If these target function notes  
don't match, do not try to inline one into another.

Evan


>
>
> -
> Devang
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list