[LLVMdev] Question on sret
criswell at uiuc.edu
Wed Jul 14 09:03:17 PDT 2010
Eli Friedman wrote:
> 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 did read the LangRef; it told me what sret was but not why it exists
or how the compiler utilizes it (or I somehow missed that part of the text).
>> 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.
-- John T.
More information about the llvm-dev