[LLVMdev] GEPping GEPs and first-class structs

Andrew Lenharth alenhar2 at uiuc.edu
Mon Feb 2 11:17:21 PST 2009


On Sun, Feb 1, 2009 at 7:38 AM, Jon Harrop <jon at ffconsultancy.com> wrote:
>
> As I understand it, first-class structs will allow structs to be passed as
> function arguments and returned as results (i.e. multiple return values)
> instead of passing pointers to structs. However, the GEP instruction only
> handles pointer types. So I do not understand how you will be able to extract
> the fields of a struct when it is received as a value type.
>
> Will the GEP instruction be altered so that it can be applied to structs
> directly?

No, see:
http://llvm.org/docs/LangRef.html#i_extractvalue

Andrew



More information about the llvm-dev mailing list