From 3c707d73f26f4189a21e610210d01c0059f4fd01 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Tue, 22 Dec 2020 20:13:27 -0800 Subject: [PATCH] [NewGVN] Remove for_each_found (NFC) The last use of the function was removed on Sep 30, 2017 in commit 9b926e90d33e0f71c16618365333fc7b330b6bb5. --- llvm/lib/Transforms/Scalar/NewGVN.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/llvm/lib/Transforms/Scalar/NewGVN.cpp b/llvm/lib/Transforms/Scalar/NewGVN.cpp index 958014f..ee26c29 100644 --- a/llvm/lib/Transforms/Scalar/NewGVN.cpp +++ b/llvm/lib/Transforms/Scalar/NewGVN.cpp @@ -802,8 +802,6 @@ private: const BasicBlock *) const; // Various instruction touch utilities - template - void for_each_found(Map &, const KeyType &, Func); template 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 -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 -- 2.7.4