[LLVMdev] GetElementPtr

Ryan Taylor ryta1203 at gmail.com
Thu Dec 8 15:29:21 PST 2011


Ok, thanks, this makes sense. But there is no way to get the SelectionDAG
to do it for me via something like visitGetElementrPtr?

On Thu, Dec 8, 2011 at 2:54 PM, Eli Friedman <eli.friedman at gmail.com> wrote:

> > 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
> .
>
> -Eli
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111208/4aefbbeb/attachment.html>


More information about the llvm-dev mailing list