[LLVMdev] GetElementPtr

Eli Friedman eli.friedman at gmail.com
Thu Dec 8 14:54:29 PST 2011

> On Thu, Dec 8, 2011 at 2:37 PM, Ryan Taylor <ryta1203 at gmail.com> wrote:
>> Thanks.
>> So basically then this operation is not target-independent like the docs
>> suggest?

It is target-independent in the sense that a frontend can generate
code using GEP's without worrying about how a given target actually
lays out structures.  It isn't target-independent in the sense that
the actual computed offset in bytes isn't the same for every target.
See also http://nondot.org/sabre/LLVMNotes/SizeOf-OffsetOf-VariableSizedStructs.txt


More information about the llvm-dev mailing list