mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
[Analysis] More LocationSize cleanup; NFC
Keeping these patches super small so they're easily post-commit verifiable, as requested in D44748. llvm-svn: 350008
This commit is contained in:
parent
654eb909d7
commit
283d33e193
@ -135,6 +135,9 @@ public:
|
||||
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;
|
||||
}
|
||||
|
@ -1644,7 +1644,7 @@ AliasResult BasicAAResult::aliasCheck(const Value *V1, LocationSize V1Size,
|
||||
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.
|
||||
|
@ -27,7 +27,7 @@ AliasResult SCEVAAResult::alias(const MemoryLocation &LocA,
|
||||
// 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!
|
||||
@ -82,10 +82,10 @@ AliasResult SCEVAAResult::alias(const MemoryLocation &LocA,
|
||||
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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user