mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
[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
This commit is contained in:
@ -48,12 +48,6 @@ class PassRegistry {
|
|||||||
typedef StringMap<const PassInfo *> StringMapType;
|
typedef StringMap<const PassInfo *> StringMapType;
|
||||||
StringMapType PassInfoStringMap;
|
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<std::unique_ptr<const PassInfo>> ToFree;
|
||||||
std::vector<PassRegistrationListener *> Listeners;
|
std::vector<PassRegistrationListener *> Listeners;
|
||||||
|
|
||||||
|
@ -101,10 +101,6 @@ void PassRegistry::registerAnalysisGroup(const void *InterfaceID,
|
|||||||
// the interface.
|
// the interface.
|
||||||
ImplementationInfo->addInterfaceImplemented(InterfaceInfo);
|
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) {
|
if (isDefault) {
|
||||||
assert(InterfaceInfo->getNormalCtor() == nullptr &&
|
assert(InterfaceInfo->getNormalCtor() == nullptr &&
|
||||||
"Default implementation for analysis group already specified!");
|
"Default implementation for analysis group already specified!");
|
||||||
|
Reference in New Issue
Block a user