[llvm] r231181 - Document the LLVM "thunk" attribute added back in r226708

Hal Finkel hfinkel at anl.gov
Tue Mar 3 16:39:50 PST 2015


----- Original Message -----
> From: "Reid Kleckner" <reid at kleckner.net>
> To: llvm-commits at cs.uiuc.edu
> Sent: Tuesday, March 3, 2015 6:08:57 PM
> Subject: [llvm] r231181 - Document the LLVM "thunk" attribute added back in	r226708
> 
> Author: rnk
> Date: Tue Mar  3 18:08:56 2015
> New Revision: 231181
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=231181&view=rev
> Log:
> Document the LLVM "thunk" attribute added back in r226708
> 
> Modified:
>     llvm/trunk/docs/LangRef.rst
> 
> Modified: llvm/trunk/docs/LangRef.rst
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.rst?rev=231181&r1=231180&r2=231181&view=diff
> ==============================================================================
> --- llvm/trunk/docs/LangRef.rst (original)
> +++ llvm/trunk/docs/LangRef.rst Tue Mar  3 18:08:56 2015
> @@ -1369,6 +1369,11 @@ example:
>      If a function that has an ``sspstrong`` attribute is inlined
>      into a
>      function that doesn't have an ``sspstrong`` attribute, then the
>      resulting function will have an ``sspstrong`` attribute.
> +``"thunk"``
> +    This attribute indicates that the function will delegate to some
> other
> +    function with a tail call. The prototype of a thunk should not
> be used for
> +    optimization purposes.

I find this wording, "should not be used for optimization purposes", to be confusing. What kinds of things may not be done? Can you please provide an example?

Thanks again,
Hal

> The caller is expected to cast the thunk
> prototype to
> +    match the thunk target prototype.
>  ``uwtable``
>      This attribute indicates that the ABI being targeted requires
>      that
>      an unwind table entry be produce for this function even if we
>      can
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory



More information about the llvm-commits mailing list