return (Value & ImpreciseBit) == 0;
}
+ // Convenience method to check if this LocationSize's value is 0.
+ bool isZero() const { return hasValue() && getValue() == 0; }
+
bool operator==(const LocationSize &Other) const {
return Value == Other.Value;
}
const Value *O1, const Value *O2) {
// If either of the memory references is empty, it doesn't matter what the
// pointer values are.
- if (V1Size == 0 || V2Size == 0)
+ if (V1Size.isZero() || V2Size.isZero())
return NoAlias;
// Strip off any casts if they exist.
// If either of the memory references is empty, it doesn't matter what the
// pointer values are. This allows the code below to ignore this special
// case.
- if (LocA.Size == 0 || LocB.Size == 0)
+ if (LocA.Size.isZero() || LocB.Size.isZero())
return NoAlias;
// This is SCEVAAResult. Get the SCEVs!
Value *BO = GetBaseValue(BS);
if ((AO && AO != LocA.Ptr) || (BO && BO != LocB.Ptr))
if (alias(MemoryLocation(AO ? AO : LocA.Ptr,
- AO ? +MemoryLocation::UnknownSize : LocA.Size,
+ AO ? LocationSize::unknown() : LocA.Size,
AO ? AAMDNodes() : LocA.AATags),
MemoryLocation(BO ? BO : LocB.Ptr,
- BO ? +MemoryLocation::UnknownSize : LocB.Size,
+ BO ? LocationSize::unknown() : LocB.Size,
BO ? AAMDNodes() : LocB.AATags)) == NoAlias)
return NoAlias;