[LLVMdev] GEPping GEPs and first-class structs
Gordon Henriksen
gordonhenriksen at me.com
Mon Feb 2 11:39:16 PST 2009
On Feb 1, 2009, at 08:38, Jon Harrop 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?
You can't take the address of a register, much less an element
thereof. extractvalue and insertvalue are the instructions to
manipulate aggregate registers.
http://llvm.org/docs/LangRef.html#aggregateops
— Gordon
More information about the llvm-dev
mailing list