diff options
author | Nikita Popov <npopov@redhat.com> | 2024-01-24 12:33:57 +0100 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2024-01-24 14:04:21 +0100 |
commit | 89dae798cc77789a43e9a60173f647dae03a65fe (patch) | |
tree | eee27892e66c78af7ff8a21b6720660da7dfbb79 /llvm/lib/Analysis/Lint.cpp | |
parent | 7fdf608cefa0d9051eb3146ee19c3750e237c799 (diff) | |
download | llvm-89dae798cc77789a43e9a60173f647dae03a65fe.zip llvm-89dae798cc77789a43e9a60173f647dae03a65fe.tar.gz llvm-89dae798cc77789a43e9a60173f647dae03a65fe.tar.bz2 |
[Loads] Use BatchAAResults for available value APIs (NFCI)
This allows caching AA queries both within and across the calls,
and enables us to use a custom AAQI configuration.
Diffstat (limited to 'llvm/lib/Analysis/Lint.cpp')
-rw-r--r-- | llvm/lib/Analysis/Lint.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/Lint.cpp b/llvm/lib/Analysis/Lint.cpp index 1ebc593..1663509 100644 --- a/llvm/lib/Analysis/Lint.cpp +++ b/llvm/lib/Analysis/Lint.cpp @@ -657,11 +657,12 @@ Value *Lint::findValueImpl(Value *V, bool OffsetOk, BasicBlock::iterator BBI = L->getIterator(); BasicBlock *BB = L->getParent(); SmallPtrSet<BasicBlock *, 4> VisitedBlocks; + BatchAAResults BatchAA(*AA); for (;;) { if (!VisitedBlocks.insert(BB).second) break; if (Value *U = - FindAvailableLoadedValue(L, BB, BBI, DefMaxInstsToScan, AA)) + FindAvailableLoadedValue(L, BB, BBI, DefMaxInstsToScan, &BatchAA)) return findValueImpl(U, OffsetOk, Visited); if (BBI != BB->begin()) break; |