[PATCH] D67305: [AliasSetTracker] Update AAInfo check.

Alina Sbirlea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 6 15:33:17 PDT 2019


asbirlea created this revision.
asbirlea added a reviewer: hfinkel.
Herald added a subscriber: sanjoy.google.
Herald added a project: LLVM.

The correction of the AAInfo check in r371139 resolved a bug but may be
too restrictive if existing MDNodes are already null.
Also, AAInfo should either be a tombstone if a mismatch exists or the
old AAInfo otherwise.


Repository:
  rL LLVM

https://reviews.llvm.org/D67305

Files:
  include/llvm/Analysis/AliasSetTracker.h


Index: include/llvm/Analysis/AliasSetTracker.h
===================================================================
--- include/llvm/Analysis/AliasSetTracker.h
+++ include/llvm/Analysis/AliasSetTracker.h
@@ -85,15 +85,11 @@
       if (AAInfo == DenseMapInfo<AAMDNodes>::getEmptyKey())
         // We don't have a AAInfo yet. Set it to NewAAInfo.
         AAInfo = NewAAInfo;
-      else {
-        AAMDNodes Intersection(AAInfo.intersect(NewAAInfo));
-        if (!Intersection.TBAA || !Intersection.Scope ||
-            !Intersection.NoAlias) {
-          // NewAAInfo conflicts with AAInfo.
+      else if (AAInfo.TBAA != NewAAInfo.TBAA ||
+            AAInfo.Scope != NewAAInfo.Scope ||
+            AAInfo.NoAlias != NewAAInfo.NoAlias) {
           AAInfo = DenseMapInfo<AAMDNodes>::getTombstoneKey();
           SizeChanged = true;
-        }
-        AAInfo = Intersection;
       }
       return SizeChanged;
     }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67305.219190.patch
Type: text/x-patch
Size: 923 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190906/9de55eae/attachment.bin>


More information about the llvm-commits mailing list