[llvm] 93b307b - [Analysis] Remove unused AssumptionCacheTracker::lookupAssumptionCache (NFC) (#229327)

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 6 01:10:18 PDT 2026


Author: Kazu Hirata
Date: 2026-10-06T08:10:09Z
New Revision: 93b307b610102a62bdd81deb89aaf4b824dc546b

URL: https://github.com/llvm/llvm-project/commit/93b307b610102a62bdd81deb89aaf4b824dc546b
DIFF: https://github.com/llvm/llvm-project/commit/93b307b610102a62bdd81deb89aaf4b824dc546b.diff

LOG: [Analysis] Remove unused AssumptionCacheTracker::lookupAssumptionCache (NFC) (#229327)

The last caller was removed on August 5, 2026 in commit
8277177456936a77940ecda8e82ad571c66aab1f.

Assisted-by: Antigravity

Added: 
    

Modified: 
    llvm/include/llvm/Analysis/AssumptionCache.h
    llvm/lib/Analysis/AssumptionCache.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Analysis/AssumptionCache.h b/llvm/include/llvm/Analysis/AssumptionCache.h
index e35c22fca68b9..df955432e9360 100644
--- a/llvm/include/llvm/Analysis/AssumptionCache.h
+++ b/llvm/include/llvm/Analysis/AssumptionCache.h
@@ -246,10 +246,6 @@ class LLVM_ABI AssumptionCacheTracker : public ImmutablePass {
   /// existing cache will be returned.
   AssumptionCache &getAssumptionCache(Function &F);
 
-  /// Return the cached assumptions for a function if it has already been
-  /// scanned. Otherwise return nullptr.
-  AssumptionCache *lookupAssumptionCache(Function &F);
-
   AssumptionCacheTracker();
   ~AssumptionCacheTracker() override;
 

diff  --git a/llvm/lib/Analysis/AssumptionCache.cpp b/llvm/lib/Analysis/AssumptionCache.cpp
index d74033468e958..762109f1a7b38 100644
--- a/llvm/lib/Analysis/AssumptionCache.cpp
+++ b/llvm/lib/Analysis/AssumptionCache.cpp
@@ -344,13 +344,6 @@ AssumptionCache &AssumptionCacheTracker::getAssumptionCache(Function &F) {
   return *IP.first->second;
 }
 
-AssumptionCache *AssumptionCacheTracker::lookupAssumptionCache(Function &F) {
-  auto I = AssumptionCaches.find_as(&F);
-  if (I != AssumptionCaches.end())
-    return I->second.get();
-  return nullptr;
-}
-
 void AssumptionCacheTracker::verifyAnalysis() const {
   // FIXME: In the long term the verifier should not be controllable with a
   // flag. We should either fix all passes to correctly update the assumption


        


More information about the llvm-commits mailing list