[llvm] [Attributor]: AApointerInfo - store the full chain of instructions that make up the access (PR #96526)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 8 08:22:49 PDT 2024
================
@@ -6078,11 +6222,56 @@ struct AAPointerInfo : public AbstractAttribute {
}
}
+ void mergeAccessPaths(const AccessPathSetTy *AccessPathsNew) const {
+
+ for (auto *Path : *AccessPathsNew)
+ if (!existsChain(Path))
+ AccessPaths->insert(Path);
+ }
+
+ bool checkAccessPathsAreSame(const AccessPathSetTy *AccessPathsR) const {
+
+ bool IsSame = true;
+
+ if (AccessPaths->size() != AccessPathsR->size())
+ return false;
+
+ for (auto *Path : *AccessPathsR) {
+ if (!existsChain(Path))
+ IsSame = false;
+ }
+ return IsSame;
+ }
+
+ bool existsChain(const AccessPathTy *NewPath) const {
+
----------------
shiltian wrote:
```suggestion
```
https://github.com/llvm/llvm-project/pull/96526
More information about the llvm-commits
mailing list