[llvm-branch-commits] [llvm] 3c707d7 - [NewGVN] Remove for_each_found (NFC)

Kazu Hirata via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Dec 22 20:18:42 PST 2020


Author: Kazu Hirata
Date: 2020-12-22T20:13:27-08:00
New Revision: 3c707d73f26f4189a21e610210d01c0059f4fd01

URL: https://github.com/llvm/llvm-project/commit/3c707d73f26f4189a21e610210d01c0059f4fd01
DIFF: https://github.com/llvm/llvm-project/commit/3c707d73f26f4189a21e610210d01c0059f4fd01.diff

LOG: [NewGVN] Remove for_each_found (NFC)

The last use of the function was removed on Sep 30, 2017 in commit
9b926e90d33e0f71c16618365333fc7b330b6bb5.

Added: 
    

Modified: 
    llvm/lib/Transforms/Scalar/NewGVN.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Scalar/NewGVN.cpp b/llvm/lib/Transforms/Scalar/NewGVN.cpp
index 958014fcb1ed..ee26c299c88c 100644
--- a/llvm/lib/Transforms/Scalar/NewGVN.cpp
+++ b/llvm/lib/Transforms/Scalar/NewGVN.cpp
@@ -802,8 +802,6 @@ class NewGVN {
                             const BasicBlock *) const;
 
   // Various instruction touch utilities
-  template <typename Map, typename KeyType, typename Func>
-  void for_each_found(Map &, const KeyType &, Func);
   template <typename Map, typename KeyType>
   void touchAndErase(Map &, const KeyType &);
   void markUsersTouched(Value *);
@@ -1991,16 +1989,6 @@ NewGVN::performSymbolicEvaluation(Value *V,
   return E;
 }
 
-// Look up a container in a map, and then call a function for each thing in the
-// found container.
-template <typename Map, typename KeyType, typename Func>
-void NewGVN::for_each_found(Map &M, const KeyType &Key, Func F) {
-  const auto Result = M.find_as(Key);
-  if (Result != M.end())
-    for (typename Map::mapped_type::value_type Mapped : Result->second)
-      F(Mapped);
-}
-
 // Look up a container of values/instructions in a map, and touch all the
 // instructions in the container.  Then erase value from the map.
 template <typename Map, typename KeyType>


        


More information about the llvm-branch-commits mailing list