[LLVMdev] Troubling promotion of return value to Integer ...

Matthijs Kooijman matthijs at stdin.nl
Fri May 30 00:45:45 PDT 2008


Hi,

> 4) There will be 4 new function attributes:
>    sign_ext_from_i8, sign_ext_from_i16
>    zero_ext_from_i8, zero_ext_from_i16
>    These attributes will be placed on the function CALL node by front-end to
>    inform the backend about such promotions and enable optimization of
>    return value. This should be sufficient for direct and indirect call.
>    (syntax of these attributes to be defined)
How will these attributes work with functions returning multiple values? AFAIK
it is currently not possible to have seperate attributes for each of the
return values (since multiple return values are actually one struct).

Even though our C frontends will probably not be generated functions that
return multiple values, a later optimization pass might introduce extra return
values. In this case, can these attributes be preserved in some way, or
perhaps just thrown away (causing only slower code, not miscompilation)?

Gr.

Matthijs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080530/2086e901/attachment.sig>


More information about the llvm-dev mailing list