[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
Wed Jun 1 09:28:11 PDT 2016


If you can  please remove the whitespace changes, and update the diff, i'll
commit it.

I get apply failures due to them.


@@ -904,7 +938,7 @@
     // Because they cannot partially overlap and because fields in an array
     // cannot overlap, if we can prove the final indices are different between
     // GEP1 and GEP2, we can conclude GEP1 and GEP2 don't alias.
-
+
     // If the last indices are constants, we've already checked they don't
     // equal each other so we can exit early.
     if (C1 && C2)
@@ -977,7 +1011,7 @@
 // the highest %f1 can be is (%alloca + 3). This means %random can
not be higher
 // than (%alloca - 1), and so is not inbounds, a contradiction.
 bool BasicAAResult::isGEPBaseAtNegativeOffset(const GEPOperator *GEPOp,
-      const DecomposedGEP &DecompGEP, const DecomposedGEP &DecompAlloca,
+      const DecomposedGEP &DecompGEP, const DecomposedGEP &DecompAlloca,
       uint64_t AllocaAccessSize) {
   // If the alloca access size is unknown, or the GEP isn't inbounds, bail.
   if (AllocaAccessSize == MemoryLocation::UnknownSize || !GEPOp->isInBounds())



It


On Wed, Jun 1, 2016 at 9:18 AM, Taewook Oh <twoh at fb.com> wrote:

> twoh added a comment.
>
> @dberlin, thank you for accepting the diff. It would be great if someone
> can commit this diff for me as I don't have the privilege yet.
>
>
> http://reviews.llvm.org/D20665
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160601/88795041/attachment.html>


More information about the llvm-commits mailing list