diff --git a/llvm/lib/Transforms/Scalar/NewGVN.cpp b/llvm/lib/Transforms/Scalar/NewGVN.cpp index 958014fcb1ed9..ee26c299c88c6 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 - 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