GetElementPtr.html

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

GetElementPtr.html

Reid Spencer-2
All,

The often misunderstood GetElementPtr (GEP) instruction now has its own
FAQ document. For all of you that have struggled with understanding how
this instruction works, hopefully this document will make it clear and
help you with your use of LLVM. Many thanks to Chris Lattner for setting
me straight on how this instruction works and reviewing the document.

Document Link : http://llvm.org/docs/GetElementPtr.html

Best Regards,

Reid.

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: GetElementPtr.html

Jakob Praher-2
hi Reid,

thanks for the documentation for this. Me too struggled at first with
this concept.

Regarding the page fragment references:

<a href="firstptr">What is the first index of the GEP instruction?</a>
    </li>
    <li><a href="extra_index">Why is the extra 0 index required?</a></li>

    <li><a href="deref">What is dereferenced by GEP?</a></li>
    <li><a href="lead0">Why don't GEP x,0,0,1 and GEP x,1 alias? </a></li>
    <li><a href="trail0">Why do GEP x,1,0,0 and GEP x,1 alias? </a></li>

I think you should put a # in fron of the href values, otherwise my
preferred browser (firefox) thinks it is a website and not a document
fragment.

-- Jakob

Reid Spencer wrote:

> All,
>
> The often misunderstood GetElementPtr (GEP) instruction now has its own
> FAQ document. For all of you that have struggled with understanding how
> this instruction works, hopefully this document will make it clear and
> help you with your use of LLVM. Many thanks to Chris Lattner for setting
> me straight on how this instruction works and reviewing the document.
>
> Document Link : http://llvm.org/docs/GetElementPtr.html
>
> Best Regards,
>
> Reid.

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: GetElementPtr.html

Chandler Carruth
In reply to this post by Reid Spencer-2
Hello,

Reading through this, I found a typo...

In the paragraph after the 3rd code snippet in the 1st question's section:
"The second operand will be the field offset" seems like it should be the third operand? The second is the pointer offset...

HTH! =]
-Chandler Carruth



On 8/15/06, Reid Spencer <[hidden email]> wrote:
All,

The often misunderstood GetElementPtr (GEP) instruction now has its own
FAQ document. For all of you that have struggled with understanding how
this instruction works, hopefully this document will make it clear and
help you with your use of LLVM. Many thanks to Chris Lattner for setting
me straight on how this instruction works and reviewing the document.

Document Link : http://llvm.org/docs/GetElementPtr.html

Best Regards,

Reid.

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev


_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: GetElementPtr.html

Reid Spencer-2
Yup. Fixed. Thanks.

Reid.

On Wed, 2006-08-16 at 00:39 -0400, Chandler Carruth wrote:

> Hello,
>
> Reading through this, I found a typo...
>
> In the paragraph after the 3rd code snippet in the 1st question's
> section:
> "The second operand will be the field offset" seems like it should be
> the third operand? The second is the pointer offset...
>
> HTH! =]
> -Chandler Carruth
>
>
>
> On 8/15/06, Reid Spencer <[hidden email]> wrote:
>         All,
>        
>         The often misunderstood GetElementPtr (GEP) instruction now
>         has its own
>         FAQ document. For all of you that have struggled with
>         understanding how
>         this instruction works, hopefully this document will make it
>         clear and
>         help you with your use of LLVM. Many thanks to Chris Lattner
>         for setting
>         me straight on how this instruction works and reviewing the
>         document.
>        
>         Document Link : http://llvm.org/docs/GetElementPtr.html
>        
>         Best Regards,
>        
>         Reid.
>        
>         _______________________________________________
>         LLVM Developers mailing list
>         [hidden email]         http://llvm.cs.uiuc.edu 
>         http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev