[LLVMdev] RFC: Indexing of structs vs arrays in getelementpointer

Chandler Carruth chandlerc at google.com
Thu May 22 20:04:27 PDT 2014


On Thu, May 22, 2014 at 8:19 PM, Hal Finkel <hfinkel at anl.gov> wrote:

> > While clearly we can make this transform safely for homogenous
> > structs, doing so seriously weakens the IR's guarantees. I'd not
> > like to see us go that direction.
>
> To what guarantees are you referring?


That we can (verifier) reject arbitrarily invalid sequences of indices in
GEPs into structs because we know which struct we're GEPing into and what
potential indices would be valid. This in turn simplifies the interfaces of
code dealing with struct GEP indices.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140522/eb22725c/attachment.html>


More information about the llvm-dev mailing list