[llvm] r219097 - [PM] Remove an unused and rather expensive mapping from an analysis
Chandler Carruth
chandlerc at gmail.com
Sun Oct 5 17:30:59 PDT 2014
Author: chandlerc
Date: Sun Oct 5 19:30:59 2014
New Revision: 219097
URL: http://llvm.org/viewvc/llvm-project?rev=219097&view=rev
Log:
[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.
Modified:
llvm/trunk/include/llvm/PassRegistry.h
llvm/trunk/lib/IR/PassRegistry.cpp
Modified: llvm/trunk/include/llvm/PassRegistry.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/PassRegistry.h?rev=219097&r1=219096&r2=219097&view=diff
==============================================================================
--- llvm/trunk/include/llvm/PassRegistry.h (original)
+++ llvm/trunk/include/llvm/PassRegistry.h Sun Oct 5 19:30:59 2014
@@ -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;
Modified: llvm/trunk/lib/IR/PassRegistry.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/PassRegistry.cpp?rev=219097&r1=219096&r2=219097&view=diff
==============================================================================
--- llvm/trunk/lib/IR/PassRegistry.cpp (original)
+++ llvm/trunk/lib/IR/PassRegistry.cpp Sun Oct 5 19:30:59 2014
@@ -101,10 +101,6 @@ void PassRegistry::registerAnalysisGroup
// 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!");
More information about the llvm-commits
mailing list