[PM] Remove an unused and rather expensive mapping from an analysis
authorChandler Carruth <chandlerc@gmail.com>
Mon, 6 Oct 2014 00:30:59 +0000 (00:30 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Mon, 6 Oct 2014 00:30:59 +0000 (00:30 +0000)
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

include/llvm/PassRegistry.h
lib/IR/PassRegistry.cpp

index 6233f24c5fd8a7c2a70938e6300777192f4f1d69..8c28ef5e7e614e9de71e18eb5462ecb2349eb5ea 100644 (file)
@@ -48,12 +48,6 @@ class PassRegistry {
   typedef StringMap<const PassInfo *> StringMapType;
   StringMapType PassInfoStringMap;
 
-  /// AnalysisGroupInfo - Keep track of information for each analysis group.
-  struct AnalysisGroupInfo {
-    SmallPtrSet<const PassInfo *, 8> Implementations;
-  };
-  DenseMap<const PassInfo *, AnalysisGroupInfo> AnalysisGroupInfoMap;
-
   std::vector<std::unique_ptr<const PassInfo>> ToFree;
   std::vector<PassRegistrationListener *> Listeners;
 
index 2cff3ccdc23390484797d52690600f4536504b3d..b879fef3f4a725128f0fea00b36c91f0c1e9a3dd 100644 (file)
@@ -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!");