summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-10-06 00:30:59 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-10-06 00:30:59 +0000
commitef68758aa89fa5d4eb3975b81054d25128907fa4 (patch)
treec17b32104a50cd478e69510035f5966deb009df5
parent891fb0b4e5feb7bfd0eb81aadd2058226581f02c (diff)
[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
-rw-r--r--include/llvm/PassRegistry.h6
-rw-r--r--lib/IR/PassRegistry.cpp4
2 files changed, 0 insertions, 10 deletions
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<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;
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!");