@@ -1685,7 +1685,10 @@ static int64_t getKnownNonNullAndDerefBytesForUse(
1685
1685
1686
1686
unsigned ArgNo = ICS.getArgumentNo (U);
1687
1687
IRPosition IRP = IRPosition::callsite_argument (ICS, ArgNo);
1688
- auto &DerefAA = A.getAAFor <AADereferenceable>(QueryingAA, IRP);
1688
+ // As long as we only use known information there is no need to track
1689
+ // dependences here.
1690
+ auto &DerefAA = A.getAAFor <AADereferenceable>(QueryingAA, IRP,
1691
+ /* TrackDependence */ false );
1689
1692
IsNonNull |= DerefAA.isKnownNonNull ();
1690
1693
return DerefAA.getKnownDereferenceableBytes ();
1691
1694
}
@@ -1718,8 +1721,10 @@ static int64_t getKnownNonNullAndDerefBytesForUse(
1718
1721
GetPointerBaseWithConstantOffset (UseV, Offset, DL,
1719
1722
/* AllowNonInbounds*/ false )) {
1720
1723
if (Base == &AssociatedValue) {
1721
- auto &DerefAA =
1722
- A.getAAFor <AADereferenceable>(QueryingAA, IRPosition::value (*Base));
1724
+ // As long as we only use known information there is no need to track
1725
+ // dependences here.
1726
+ auto &DerefAA = A.getAAFor <AADereferenceable>(
1727
+ QueryingAA, IRPosition::value (*Base), /* TrackDependence */ false );
1723
1728
IsNonNull |= (!NullPointerIsDefined && DerefAA.isKnownNonNull ());
1724
1729
IsNonNull |= (!NullPointerIsDefined && (Offset != 0 ));
1725
1730
int64_t DerefBytes = DerefAA.getKnownDereferenceableBytes ();
0 commit comments