aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/LoopAccessAnalysis.cpp
diff options
context:
space:
mode:
authorBruno De Fraine <brunodf@synopsys.com>2023-12-12 15:24:24 +0100
committerNikita Popov <npopov@redhat.com>2023-12-13 12:15:09 +0100
commitc0307789796150699b550a314be236ea0b1be9ed (patch)
tree31ab751ffbe3f6ea891ba7070d5e3c3485792768 /llvm/lib/Analysis/LoopAccessAnalysis.cpp
parenta8977005b64986139e92b5a43e44cfac2bf81677 (diff)
downloadllvm-c0307789796150699b550a314be236ea0b1be9ed.zip
llvm-c0307789796150699b550a314be236ea0b1be9ed.tar.gz
llvm-c0307789796150699b550a314be236ea0b1be9ed.tar.bz2
[AST] Switch to MemoryLocation in add method (NFC)
Pass MemoryLocation as one argument, instead of passing all its parts separately.
Diffstat (limited to 'llvm/lib/Analysis/LoopAccessAnalysis.cpp')
-rw-r--r--llvm/lib/Analysis/LoopAccessAnalysis.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
index 9a9d06a..0894560 100644
--- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp
+++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
@@ -666,7 +666,7 @@ public:
/// Register a load and whether it is only read from.
void addLoad(MemoryLocation &Loc, Type *AccessTy, bool IsReadOnly) {
Value *Ptr = const_cast<Value*>(Loc.Ptr);
- AST.add(Ptr, LocationSize::beforeOrAfterPointer(), Loc.AATags);
+ AST.add(Loc.getWithNewSize(LocationSize::beforeOrAfterPointer()));
Accesses[MemAccessInfo(Ptr, false)].insert(AccessTy);
if (IsReadOnly)
ReadOnlyPtr.insert(Ptr);
@@ -675,7 +675,7 @@ public:
/// Register a store.
void addStore(MemoryLocation &Loc, Type *AccessTy) {
Value *Ptr = const_cast<Value*>(Loc.Ptr);
- AST.add(Ptr, LocationSize::beforeOrAfterPointer(), Loc.AATags);
+ AST.add(Loc.getWithNewSize(LocationSize::beforeOrAfterPointer()));
Accesses[MemAccessInfo(Ptr, true)].insert(AccessTy);
}