[LLVMdev] Basic AliasAnalysis: Can GEPs with the same base but different constant indices into a struct alias?

Chandler Carruth chandlerc at google.com
Mon Feb 2 10:59:42 PST 2015


On Mon, Feb 2, 2015 at 10:55 AM, Ahmed Bougacha <ahmed.bougacha at gmail.com>
wrote:

> Ah yes, the structs are what make it messy.
>
> How about the more useful constraint:
> - the (identical) base must point to a (possibly multidimensional) array
> of structs.
>
> Then, the above holds, no?  No matter which path you take, you must point
> to a one of the contiguous structs, and if the index is different then the
> pointers can't alias.
>

I don't really know what you're proposing. However, note that I can nest
arrays inside of structs and wrap structs in arrays, so I think I can
essentially almost always arrange to have arrays which I can overflow to
produce aliasing offsets.

What are you really trying to achieve here? Why is just modeling the math
not sufficient here?

>
> Anyway, the help is much appreciated, thanks Chandler & Hal!
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150202/38979253/attachment.html>


More information about the llvm-dev mailing list