[LLVMdev] structured types as function arguments

Eli Friedman eli.friedman at gmail.com
Mon Aug 15 09:46:20 PDT 2011


On Mon, Aug 15, 2011 at 9:01 AM, Nicolas Ojeda Bar
<nojb at math.harvard.edu> wrote:
> Hi,
>
> When calling a function, does the llvm code generator support passing structured types (arrays, structs, etc.) by _value_? I wrote some small examples, and it seemed
> to work, but I was wondering if anything can go wrong if the structured types are very large...

It should work; the generated code for passing a large struct value
(as opposed to using the byval attribute) gets to be rather
inefficient, but I don't know of any correctness bugs.

-Eli



More information about the llvm-dev mailing list