[llvm-commits] [llvm] r80450 - in /llvm/trunk: include/llvm/PassSupport.h lib/VMCore/Pass.cpp
Dan Gohman
gohman at apple.com
Sat Aug 29 16:34:14 PDT 2009
Author: djg
Date: Sat Aug 29 18:34:14 2009
New Revision: 80450
URL: http://llvm.org/viewvc/llvm-project?rev=80450&view=rev
Log:
Remove some unused fields.
Modified:
llvm/trunk/include/llvm/PassSupport.h
llvm/trunk/lib/VMCore/Pass.cpp
Modified: llvm/trunk/include/llvm/PassSupport.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/PassSupport.h?rev=80450&r1=80449&r2=80450&view=diff
==============================================================================
--- llvm/trunk/include/llvm/PassSupport.h (original)
+++ llvm/trunk/include/llvm/PassSupport.h Sat Aug 29 18:34:14 2009
@@ -190,14 +190,11 @@
/// a nice name with the interface.
///
class RegisterAGBase : public PassInfo {
- PassInfo *InterfaceInfo;
- const PassInfo *ImplementationInfo;
- bool isDefaultImplementation;
protected:
- explicit RegisterAGBase(const char *Name,
- intptr_t InterfaceID,
- intptr_t PassID = 0,
- bool isDefault = false);
+ RegisterAGBase(const char *Name,
+ intptr_t InterfaceID,
+ intptr_t PassID = 0,
+ bool isDefault = false);
};
template<typename Interface, bool Default = false>
Modified: llvm/trunk/lib/VMCore/Pass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Pass.cpp?rev=80450&r1=80449&r2=80450&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Pass.cpp (original)
+++ llvm/trunk/lib/VMCore/Pass.cpp Sat Aug 29 18:34:14 2009
@@ -132,9 +132,7 @@
/// AnalysisGroupInfo - Keep track of information for each analysis group.
struct AnalysisGroupInfo {
- const PassInfo *DefaultImpl;
std::set<const PassInfo *> Implementations;
- AnalysisGroupInfo() : DefaultImpl(0) {}
};
/// AnalysisGroupInfoMap - Information for each analysis group.
@@ -177,11 +175,10 @@
"Cannot add a pass to the same analysis group more than once!");
AGI.Implementations.insert(ImplementationInfo);
if (isDefault) {
- assert(AGI.DefaultImpl == 0 && InterfaceInfo->getNormalCtor() == 0 &&
+ assert(InterfaceInfo->getNormalCtor() == 0 &&
"Default implementation for analysis group already specified!");
assert(ImplementationInfo->getNormalCtor() &&
"Cannot specify pass as default if it does not have a default ctor");
- AGI.DefaultImpl = ImplementationInfo;
InterfaceInfo->setNormalCtor(ImplementationInfo->getNormalCtor());
}
}
@@ -253,10 +250,10 @@
//
RegisterAGBase::RegisterAGBase(const char *Name, intptr_t InterfaceID,
intptr_t PassID, bool isDefault)
- : PassInfo(Name, InterfaceID),
- ImplementationInfo(0), isDefaultImplementation(isDefault) {
+ : PassInfo(Name, InterfaceID) {
- InterfaceInfo = const_cast<PassInfo*>(Pass::lookupPassInfo(InterfaceID));
+ PassInfo *InterfaceInfo =
+ const_cast<PassInfo*>(Pass::lookupPassInfo(InterfaceID));
if (InterfaceInfo == 0) {
// First reference to Interface, register it now.
registerPass();
@@ -266,7 +263,7 @@
"Trying to join an analysis group that is a normal pass!");
if (PassID) {
- ImplementationInfo = Pass::lookupPassInfo(PassID);
+ const PassInfo *ImplementationInfo = Pass::lookupPassInfo(PassID);
assert(ImplementationInfo &&
"Must register pass before adding to AnalysisGroup!");
More information about the llvm-commits
mailing list