diff options
-rw-r--r-- | llvm/include/llvm/Analysis/AliasSetTracker.h | 7 | ||||
-rw-r--r-- | llvm/lib/Analysis/AliasSetTracker.cpp | 12 |
2 files changed, 7 insertions, 12 deletions
diff --git a/llvm/include/llvm/Analysis/AliasSetTracker.h b/llvm/include/llvm/Analysis/AliasSetTracker.h index cf4981d1eb2..d24453749fe 100644 --- a/llvm/include/llvm/Analysis/AliasSetTracker.h +++ b/llvm/include/llvm/Analysis/AliasSetTracker.h @@ -441,12 +441,7 @@ private: return *Entry; } - AliasSet &addPointer(Value *P, LocationSize Size, const AAMDNodes &AAInfo, - AliasSet::AccessLattice E); - AliasSet &addPointer(MemoryLocation Loc, - AliasSet::AccessLattice E) { - return addPointer(const_cast<Value*>(Loc.Ptr), Loc.Size, Loc.AATags, E); - } + AliasSet &addPointer(MemoryLocation Loc, AliasSet::AccessLattice E); AliasSet *mergeAliasSetsForPointer(const Value *Ptr, LocationSize Size, const AAMDNodes &AAInfo); diff --git a/llvm/lib/Analysis/AliasSetTracker.cpp b/llvm/lib/Analysis/AliasSetTracker.cpp index 66544c51446..22c8ae20113 100644 --- a/llvm/lib/Analysis/AliasSetTracker.cpp +++ b/llvm/lib/Analysis/AliasSetTracker.cpp @@ -383,7 +383,7 @@ AliasSet &AliasSetTracker::getAliasSetFor(const MemoryLocation &MemLoc) { void AliasSetTracker::add(Value *Ptr, LocationSize Size, const AAMDNodes &AAInfo) { - addPointer(Ptr, Size, AAInfo, AliasSet::NoAccess); + addPointer(MemoryLocation(Ptr, Size, AAInfo), AliasSet::NoAccess); } void AliasSetTracker::add(LoadInst *LI) { @@ -518,8 +518,9 @@ void AliasSetTracker::add(const AliasSetTracker &AST) { // Loop over all of the pointers in this alias set. for (AliasSet::iterator ASI = AS.begin(), E = AS.end(); ASI != E; ++ASI) - addPointer(ASI.getPointer(), ASI.getSize(), ASI.getAAInfo(), - (AliasSet::AccessLattice)AS.Access); + addPointer( + MemoryLocation(ASI.getPointer(), ASI.getSize(), ASI.getAAInfo()), + (AliasSet::AccessLattice)AS.Access); } } @@ -612,10 +613,9 @@ AliasSet &AliasSetTracker::mergeAllAliasSets() { return *AliasAnyAS; } -AliasSet &AliasSetTracker::addPointer(Value *P, LocationSize Size, - const AAMDNodes &AAInfo, +AliasSet &AliasSetTracker::addPointer(MemoryLocation Loc, AliasSet::AccessLattice E) { - AliasSet &AS = getAliasSetFor(MemoryLocation(P, Size, AAInfo)); + AliasSet &AS = getAliasSetFor(Loc); AS.Access |= E; if (!AliasAnyAS && (TotalMayAliasSetSize > SaturationThreshold)) { |