[PATCH] D53836: [AliasSetTracker] Cleanup addPointer interface. [NFCI]
Alina Sbirlea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 29 15:28:22 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL345548: [AliasSetTracker] Cleanup addPointer interface. [NFCI] (authored by asbirlea, committed by ).
Repository:
rL LLVM
https://reviews.llvm.org/D53836
Files:
llvm/trunk/include/llvm/Analysis/AliasSetTracker.h
llvm/trunk/lib/Analysis/AliasSetTracker.cpp
Index: llvm/trunk/include/llvm/Analysis/AliasSetTracker.h
===================================================================
--- llvm/trunk/include/llvm/Analysis/AliasSetTracker.h
+++ llvm/trunk/include/llvm/Analysis/AliasSetTracker.h
@@ -441,12 +441,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<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);
Index: llvm/trunk/lib/Analysis/AliasSetTracker.cpp
===================================================================
--- llvm/trunk/lib/Analysis/AliasSetTracker.cpp
+++ llvm/trunk/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);
}
}
@@ -612,10 +613,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)) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53836.171591.patch
Type: text/x-patch
Size: 2267 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181029/ef9b7df0/attachment.bin>
More information about the llvm-commits
mailing list