Index: include/llvm/Analysis/AliasSetTracker.h =================================================================== --- include/llvm/Analysis/AliasSetTracker.h +++ include/llvm/Analysis/AliasSetTracker.h @@ -442,12 +442,7 @@ 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(Loc.Ptr), Loc.Size, Loc.AATags, E); - } + AliasSet &addPointer(MemoryLocation Loc, AliasSet::AccessLattice E); AliasSet *mergeAliasSetsForPointer(const Value *Ptr, LocationSize Size, const AAMDNodes &AAInfo); Index: lib/Analysis/AliasSetTracker.cpp =================================================================== --- lib/Analysis/AliasSetTracker.cpp +++ lib/Analysis/AliasSetTracker.cpp @@ -383,7 +383,7 @@ 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 @@ // 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); } } @@ -620,10 +621,9 @@ 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)) {