[cfe-dev] no capture

shreyas krishnan shreyas76 at gmail.com
Thu Jul 15 10:09:42 PDT 2010


Thanks Anton..

Can I enforce this from C source ?
__attribute__(( nocaptue )) gets ignored by clang.

My goal is I would like some of the parameters to be directly passed
as arguments instead of through the stack. Is there a source level way
to do it ?

thanks
shrey

On Thu, Jul 15, 2010 at 6:00 AM, Anton Korobeynikov
<anton at korobeynikov.info> wrote:
>>   I am wondering when does clang generate the no capture attribute
>> for the arguments. One of its impacts seems to be that then the
>> argument is passed directly without storing in the stack. Is that
>> right?
> From http://llvm.org/docs/LangRef.html#paramattrs :
> "nocapture
>  This indicates that the callee does not make any copies of the
> pointer that outlive the callee itself. This is not a valid attribute
> for return values."
>
> --
> With best regards, Anton Korobeynikov
> Faculty of Mathematics and Mechanics, Saint Petersburg State University
>




More information about the cfe-dev mailing list