[PATCH] D20665: Claim NoAlias if two GEPs index different fields of the same struct

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 14 12:22:15 PDT 2016


So, i'm honestly a bit confused.

Do you mean "what the original language pointer type" was?
Because LLVM does not know enough to know what the language rules are, and
so you'd generally want something lower level, like we have now with !tbaa,
etc.

Do you mean something else?

If your goal is to distinguish whether the original accesses were to
different field offsets, and the language says that means they cna't alias,
you should produce that as metadata.
If your goal is something else, we should start with the goal and try to
design something for it, and hopefully nearby use cases (if any) :)



On Tue, Jun 14, 2016 at 11:39 AM, Taewook Oh <twoh at fb.com> wrote:

> twoh added a comment.
>
> So I'm thinking of adding metadata that indicates the original type of the
> pointer operand to GEP instructions. With metadata, an analysis can tell if
> GEP's pointer operand is transformed from bitcast operation or not. What do
> you think?
>
>
> Repository:
>   rL LLVM
>
> http://reviews.llvm.org/D20665
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160614/8d56bc4a/attachment.html>


More information about the llvm-commits mailing list