- // Try to get the DataLayout for this module. This may be null, in which case
- // the optimizations will be limited.
- const DataLayout *DL = ScanBB->getDataLayout();
-
- // Try to get the store size for the type.
- uint64_t AccessSize = DL ? DL->getTypeStoreSize(AccessTy)
- : AA ? AA->getTypeStoreSize(AccessTy) : 0;
+ // If we're using alias analysis to disambiguate get the size of *Ptr.
+ uint64_t AccessSize = AA ? AA->getTypeStoreSize(AccessTy) : 0;