[LLVMdev] promotion of return value.

Dale Johannesen dalej at apple.com
Thu Mar 12 11:44:37 PDT 2009


On Mar 12, 2009, at 11:31 AMPDT, Andrew Haley wrote:

> Rafael Espindola wrote:
>>>> 1) The return value promotion will be removed from llvm backend and
>>>>  implemented in both front-ends (clang and llvm-gcc)
>>>>
>>>> 2) The promotions are only applied to the return value in the body
>>>>  of the function.
>>>>  Return value of function definition and declaration will not be
>>>> promoted
>>
>> You might want to look at bug http://llvm.org/bugs/show_bug.cgi?id=3779 
>> .
>>
>> If I understand what you are proposing, it is exactly the opposite of
>> what gcc does, which would be annoying for someone trying to link gcc
>> and llvm compiled code.
>
> That's right.  In gcc we used to do this in the front-ends but we
> stopped.  This required quite a lot of discussion with the Linux ABI
> standardization people.

Yes, I trust we're taking into account that some ABIs have  
requirements about this.
For example, ARM AAPCS requires the caller promote arguments, and the  
callee
promote return values.




More information about the llvm-dev mailing list