[llvm] r179925 - Add CodeGen support for functions that always return arguments via a new parameter attribute 'returned', which is taken advantage of in target-independent tail call opportunity detection and in ARM call lowering (when placed on an integral first parameter).

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed Apr 24 11:56:21 PDT 2013


On Apr 24, 2013, at 6:16 AM, Stephen Lin <stephenwlin at gmail.com> wrote:

> To be clear, the only cases supportable would be:
> 
> 1) no extension at all (i.e the type is the same size as the register
> used to pass it)
> 2) both the 'returned' parameter and return value are zero-extended
> 3) both the 'returned' parameter and return value are sign-extended

Hi Stephen,

I don't think it is important to enable the optimization for other cases than the ones you list above. Just make sure it gets disabled in other cases so we don't miscompute the code.

The 'returned' parameters are usually pointers, AFAICT.

/jakob




More information about the llvm-commits mailing list