[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:24:31 PDT 2024
================
@@ -926,10 +933,101 @@ struct AA::PointerInfo::State : public AbstractState {
BooleanState BS;
};
+AAPointerInfo::Access::AccessPathSetTy *
+AA::PointerInfo::State::findAllAccessPaths(
+ AAPointerInfo::OffsetInfoMapTy &OffsetInfoMap, Instruction *LocalI) {
+
+ AAPointerInfo::Access::AccessPathSetTy *AccessPathsSet =
+ new AAPointerInfo::Access::AccessPathSetTy();
+
+ // Store the instruction and its storage (i.e, which path it belongs to)
+ // on the stack.
+ // We also store the visited map on the stack.
+ // Since we want to find new paths, we want to make sure an instruction is
+ // not visited twice on the same path. However, we can visit the same
+ // instruction more that once if it exists on different paths.
+ SmallVector<std::tuple<Value *, AAPointerInfo::Access::AccessPathTy *,
+ SmallPtrSet<Value *, 4>>,
+ 16>
+ Stack;
----------------
shiltian wrote:
This trunk of code is really not pretty...
https://github.com/llvm/llvm-project/pull/96526
More information about the llvm-commits
mailing list