[LLVMdev] Question on sret
Eli Friedman
eli.friedman at gmail.com
Wed Jul 14 08:58:14 PDT 2010
On Wed, Jul 14, 2010 at 8:49 AM, John Criswell <criswell at uiuc.edu> wrote:
> Dear All,
>
> What is the purpose of the sret function parameter attribute? Does it
> affect the calling convention used during code generation, is it a hint
> to optimizations, or is it used for something else?
Both of the above; see LangRef.
> I'm currently working on automatic pool allocation; this transform
> clones a function and adds extra parameters to the beginning of the
> function's parameter list. This means that I have to remove the sret
> attribute from the original first parameter. Is removing sret safe?
Removing sret changes the calling convention, but otherwise it's safe.
-Eli
More information about the llvm-dev
mailing list