[PATCH] D21000: [CFLAA] Cleaned up StratifiedAttrs handling

George Burgess IV via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 6 14:38:56 PDT 2016


george.burgess.iv added inline comments.

================
Comment at: lib/Analysis/CFLAliasAnalysis.cpp:1100
@@ -1098,2 +1099,3 @@
   // argument or global, then we don't have to be as conservative.
-  if (AttrsA.any() && AttrsB.any())
+  if ((AttrsA.none() && AttrsB.any()) || (AttrsA.any() && AttrsB.none()))
+    return NoAlias;
----------------
grievejia wrote:
> george.burgess.iv wrote:
> > This looks a bit subtle. I think we can make it less so if we move the index number check above this. If we do that, it seems that we can simplify this entire if/else chain to something like
> > 
> > ```
> > if (a.none() || b.none() || (a == Escaped && b == Escaped))
> >   return NoAlias;
> > return MayAlias;
> > ```
> > 
> > Right?
> If both a.none() and b.none() are true, we still need to check SetA.Index == SetB.Index, right?
Yup! Which is why I said we should move the index check above this. :)


http://reviews.llvm.org/D21000





More information about the llvm-commits mailing list