[Attributor][NFC] Fix dependency type in AAUndefinedBehaviorImpl::updateImpl
authorShinji Okumura <okuraofvegetable@gmail.com>
Sun, 30 Aug 2020 03:34:50 +0000 (12:34 +0900)
committerShinji Okumura <okuraofvegetable@gmail.com>
Sun, 30 Aug 2020 03:34:50 +0000 (12:34 +0900)
This patch fixes wrong dependency type in AAUB.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D86842

llvm/lib/Transforms/IPO/AttributorAttributes.cpp

index 5c4754c..83bb834 100644 (file)
@@ -2024,11 +2024,12 @@ struct AAUndefinedBehaviorImpl : public AAUndefinedBehavior {
         IRPosition CalleeArgumentIRP = IRPosition::callsite_argument(CB, idx);
         if (!CalleeArgumentIRP.hasAttr({Attribute::NoUndef}))
           continue;
-        auto &NonNullAA = A.getAAFor<AANonNull>(*this, CalleeArgumentIRP);
+        auto &NonNullAA = A.getAAFor<AANonNull>(*this, CalleeArgumentIRP,
+                                                /* TrackDependence */ false);
         if (!NonNullAA.isKnownNonNull())
           continue;
-        const auto &ValueSimplifyAA =
-            A.getAAFor<AAValueSimplify>(*this, IRPosition::value(*ArgVal));
+        const auto &ValueSimplifyAA = A.getAAFor<AAValueSimplify>(
+            *this, IRPosition::value(*ArgVal), /* TrackDependence */ false);
         Optional<Value *> SimplifiedVal =
             ValueSimplifyAA.getAssumedSimplifiedValue(A);
 
@@ -2071,7 +2072,8 @@ struct AAUndefinedBehaviorImpl : public AAUndefinedBehavior {
           } else {
             if (isa<ConstantPointerNull>(V)) {
               auto &NonNullAA = A.getAAFor<AANonNull>(
-                  *this, IRPosition::returned(*getAnchorScope()));
+                  *this, IRPosition::returned(*getAnchorScope()),
+                  /* TrackDependence */ false);
               if (NonNullAA.isKnownNonNull())
                 FoundUB = true;
             }