From: Chandler Carruth Date: Mon, 6 Oct 2014 00:30:59 +0000 (+0000) Subject: [PM] Remove an unused and rather expensive mapping from an analysis X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=ef68758aa89fa5d4eb3975b81054d25128907fa4;p=oota-llvm.git [PM] Remove an unused and rather expensive mapping from an analysis group's interface to all of the implementations of that analysis group. The groups themselves can and do manage this anyways, the pass registry needn't involve itself. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219097 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/PassRegistry.h b/include/llvm/PassRegistry.h index 6233f24c5fd..8c28ef5e7e6 100644 --- a/include/llvm/PassRegistry.h +++ b/include/llvm/PassRegistry.h @@ -48,12 +48,6 @@ class PassRegistry { typedef StringMap StringMapType; StringMapType PassInfoStringMap; - /// AnalysisGroupInfo - Keep track of information for each analysis group. - struct AnalysisGroupInfo { - SmallPtrSet Implementations; - }; - DenseMap AnalysisGroupInfoMap; - std::vector> ToFree; std::vector Listeners; diff --git a/lib/IR/PassRegistry.cpp b/lib/IR/PassRegistry.cpp index 2cff3ccdc23..b879fef3f4a 100644 --- a/lib/IR/PassRegistry.cpp +++ b/lib/IR/PassRegistry.cpp @@ -101,10 +101,6 @@ void PassRegistry::registerAnalysisGroup(const void *InterfaceID, // the interface. ImplementationInfo->addInterfaceImplemented(InterfaceInfo); - AnalysisGroupInfo &AGI = AnalysisGroupInfoMap[InterfaceInfo]; - assert(AGI.Implementations.count(ImplementationInfo) == 0 && - "Cannot add a pass to the same analysis group more than once!"); - AGI.Implementations.insert(ImplementationInfo); if (isDefault) { assert(InterfaceInfo->getNormalCtor() == nullptr && "Default implementation for analysis group already specified!");