Revert r108794, "Separate PassInfo into two classes: a constructor-free
superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo).", it is
breaking teh everything.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108805 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/AliasAnalysisCounter.cpp b/lib/Analysis/AliasAnalysisCounter.cpp
index 7d90860..1053955 100644
--- a/lib/Analysis/AliasAnalysisCounter.cpp
+++ b/lib/Analysis/AliasAnalysisCounter.cpp
@@ -87,7 +87,7 @@
     /// an analysis interface through multiple inheritance.  If needed, it
     /// should override this to adjust the this pointer as needed for the
     /// specified pass info.
-    virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) {
+    virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) {
       if (PI->isPassID(&AliasAnalysis::ID))
         return (AliasAnalysis*)this;
       return this;
diff --git a/lib/Analysis/AliasDebugger.cpp b/lib/Analysis/AliasDebugger.cpp
index 578bc68..bc2d9c5 100644
--- a/lib/Analysis/AliasDebugger.cpp
+++ b/lib/Analysis/AliasDebugger.cpp
@@ -83,7 +83,7 @@
     /// an analysis interface through multiple inheritance.  If needed, it
     /// should override this to adjust the this pointer as needed for the
     /// specified pass info.
-    virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) {
+    virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) {
       if (PI->isPassID(&AliasAnalysis::ID))
         return (AliasAnalysis*)this;
       return this;
diff --git a/lib/Analysis/BasicAliasAnalysis.cpp b/lib/Analysis/BasicAliasAnalysis.cpp
index 91a17e5..4f53a6d 100644
--- a/lib/Analysis/BasicAliasAnalysis.cpp
+++ b/lib/Analysis/BasicAliasAnalysis.cpp
@@ -172,7 +172,7 @@
     /// an analysis interface through multiple inheritance.  If needed, it should
     /// override this to adjust the this pointer as needed for the specified pass
     /// info.
-    virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) {
+    virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) {
       if (PI->isPassID(&AliasAnalysis::ID))
         return (AliasAnalysis*)this;
       return this;
@@ -243,7 +243,7 @@
     /// an analysis interface through multiple inheritance.  If needed, it should
     /// override this to adjust the this pointer as needed for the specified pass
     /// info.
-    virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) {
+    virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) {
       if (PI->isPassID(&AliasAnalysis::ID))
         return (AliasAnalysis*)this;
       return this;
diff --git a/lib/Analysis/IPA/CallGraph.cpp b/lib/Analysis/IPA/CallGraph.cpp
index fc0d33d..65c7c6e 100644
--- a/lib/Analysis/IPA/CallGraph.cpp
+++ b/lib/Analysis/IPA/CallGraph.cpp
@@ -86,7 +86,7 @@
   /// an analysis interface through multiple inheritance.  If needed, it should
   /// override this to adjust the this pointer as needed for the specified pass
   /// info.
-  virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) {
+  virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) {
     if (PI->isPassID(&CallGraph::ID))
       return (CallGraph*)this;
     return this;
diff --git a/lib/Analysis/IPA/GlobalsModRef.cpp b/lib/Analysis/IPA/GlobalsModRef.cpp
index 7e328ef..f13deea 100644
--- a/lib/Analysis/IPA/GlobalsModRef.cpp
+++ b/lib/Analysis/IPA/GlobalsModRef.cpp
@@ -149,7 +149,7 @@
     /// an analysis interface through multiple inheritance.  If needed, it
     /// should override this to adjust the this pointer as needed for the
     /// specified pass info.
-    virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) {
+    virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) {
       if (PI->isPassID(&AliasAnalysis::ID))
         return (AliasAnalysis*)this;
       return this;
diff --git a/lib/Analysis/ProfileEstimatorPass.cpp b/lib/Analysis/ProfileEstimatorPass.cpp
index a06d0fc..da4ce47 100644
--- a/lib/Analysis/ProfileEstimatorPass.cpp
+++ b/lib/Analysis/ProfileEstimatorPass.cpp
@@ -59,7 +59,7 @@
     /// an analysis interface through multiple inheritance.  If needed, it
     /// should override this to adjust the this pointer as needed for the
     /// specified pass info.
-    virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) {
+    virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) {
       if (PI->isPassID(&ProfileInfo::ID))
         return (ProfileInfo*)this;
       return this;
diff --git a/lib/Analysis/ProfileInfoLoaderPass.cpp b/lib/Analysis/ProfileInfoLoaderPass.cpp
index 90f4040..8ea4ecf 100644
--- a/lib/Analysis/ProfileInfoLoaderPass.cpp
+++ b/lib/Analysis/ProfileInfoLoaderPass.cpp
@@ -67,7 +67,7 @@
     /// an analysis interface through multiple inheritance.  If needed, it
     /// should override this to adjust the this pointer as needed for the
     /// specified pass info.
-    virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) {
+    virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) {
       if (PI->isPassID(&ProfileInfo::ID))
         return (ProfileInfo*)this;
       return this;
diff --git a/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp b/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp
index 11885b2..58711b8 100644
--- a/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp
+++ b/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp
@@ -40,7 +40,7 @@
     /// an analysis interface through multiple inheritance.  If needed, it
     /// should override this to adjust the this pointer as needed for the
     /// specified pass info.
-    virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) {
+    virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) {
       if (PI->isPassID(&AliasAnalysis::ID))
         return (AliasAnalysis*)this;
       return this;
diff --git a/lib/VMCore/Pass.cpp b/lib/VMCore/Pass.cpp
index f78e855..efd98af 100644
--- a/lib/VMCore/Pass.cpp
+++ b/lib/VMCore/Pass.cpp
@@ -75,7 +75,7 @@
 /// Registration templates, but can be overloaded directly.
 ///
 const char *Pass::getPassName() const {
-  if (const StaticPassInfo *PI = getPassInfo())
+  if (const PassInfo *PI = getPassInfo())
     return PI->getPassName();
   return "Unnamed pass: implement Pass::getPassName()";
 }
@@ -101,7 +101,7 @@
   // By default, don't do anything.
 }
 
-void *Pass::getAdjustedAnalysisPointer(const StaticPassInfo *) {
+void *Pass::getAdjustedAnalysisPointer(const PassInfo *) {
   return this;
 }
 
@@ -243,35 +243,35 @@
 
   /// PassInfoMap - Keep track of the passinfo object for each registered llvm
   /// pass.
-  typedef std::map<intptr_t, const StaticPassInfo*> MapType;
+  typedef std::map<intptr_t, const PassInfo*> MapType;
   MapType PassInfoMap;
 
-  typedef StringMap<const StaticPassInfo*> StringMapType;
+  typedef StringMap<const PassInfo*> StringMapType;
   StringMapType PassInfoStringMap;
   
   /// AnalysisGroupInfo - Keep track of information for each analysis group.
   struct AnalysisGroupInfo {
-    std::set<const StaticPassInfo *> Implementations;
+    std::set<const PassInfo *> Implementations;
   };
   
   /// AnalysisGroupInfoMap - Information for each analysis group.
-  std::map<const StaticPassInfo *, AnalysisGroupInfo> AnalysisGroupInfoMap;
+  std::map<const PassInfo *, AnalysisGroupInfo> AnalysisGroupInfoMap;
 
 public:
   
-  const StaticPassInfo *GetPassInfo(intptr_t TI) const {
+  const PassInfo *GetPassInfo(intptr_t TI) const {
     sys::SmartScopedLock<true> Guard(Lock);
     MapType::const_iterator I = PassInfoMap.find(TI);
     return I != PassInfoMap.end() ? I->second : 0;
   }
   
-  const StaticPassInfo *GetPassInfo(StringRef Arg) const {
+  const PassInfo *GetPassInfo(StringRef Arg) const {
     sys::SmartScopedLock<true> Guard(Lock);
     StringMapType::const_iterator I = PassInfoStringMap.find(Arg);
     return I != PassInfoStringMap.end() ? I->second : 0;
   }
   
-  void RegisterPass(const StaticPassInfo &PI) {
+  void RegisterPass(const PassInfo &PI) {
     sys::SmartScopedLock<true> Guard(Lock);
     bool Inserted =
       PassInfoMap.insert(std::make_pair(PI.getTypeInfo(),&PI)).second;
@@ -279,7 +279,7 @@
     PassInfoStringMap[PI.getPassArgument()] = &PI;
   }
   
-  void UnregisterPass(const StaticPassInfo &PI) {
+  void UnregisterPass(const PassInfo &PI) {
     sys::SmartScopedLock<true> Guard(Lock);
     MapType::iterator I = PassInfoMap.find(PI.getTypeInfo());
     assert(I != PassInfoMap.end() && "Pass registered but not in map!");
@@ -298,8 +298,8 @@
   
   
   /// Analysis Group Mechanisms.
-  void RegisterAnalysisGroup(StaticPassInfo *InterfaceInfo,
-                             const StaticPassInfo *ImplementationInfo,
+  void RegisterAnalysisGroup(PassInfo *InterfaceInfo,
+                             const PassInfo *ImplementationInfo,
                              bool isDefault) {
     sys::SmartScopedLock<true> Guard(Lock);
     AnalysisGroupInfo &AGI = AnalysisGroupInfoMap[InterfaceInfo];
@@ -363,15 +363,15 @@
 
 // getPassInfo - Return the PassInfo data structure that corresponds to this
 // pass...
-const StaticPassInfo *Pass::getPassInfo() const {
+const PassInfo *Pass::getPassInfo() const {
   return lookupPassInfo(PassID);
 }
 
-const StaticPassInfo *Pass::lookupPassInfo(intptr_t TI) {
+const PassInfo *Pass::lookupPassInfo(intptr_t TI) {
   return getPassRegistrar()->GetPassInfo(TI);
 }
 
-const StaticPassInfo *Pass::lookupPassInfo(StringRef Arg) {
+const PassInfo *Pass::lookupPassInfo(StringRef Arg) {
   return getPassRegistrar()->GetPassInfo(Arg);
 }
 
@@ -390,7 +390,7 @@
   getPassRegistrar()->UnregisterPass(*this);
 }
 
-Pass *StaticPassInfo::createPass() const {
+Pass *PassInfo::createPass() const {
   assert((!isAnalysisGroup() || NormalCtor) &&
          "No default implementation found for analysis group!");
   assert(NormalCtor &&
@@ -408,8 +408,8 @@
                                intptr_t PassID, bool isDefault)
   : PassInfo(Name, InterfaceID) {
 
-  StaticPassInfo *InterfaceInfo =
-    const_cast<StaticPassInfo*>(Pass::lookupPassInfo(InterfaceID));
+  PassInfo *InterfaceInfo =
+    const_cast<PassInfo*>(Pass::lookupPassInfo(InterfaceID));
   if (InterfaceInfo == 0) {
     // First reference to Interface, register it now.
     registerPass();
@@ -419,13 +419,13 @@
          "Trying to join an analysis group that is a normal pass!");
 
   if (PassID) {
-    const StaticPassInfo *ImplementationInfo = Pass::lookupPassInfo(PassID);
+    const PassInfo *ImplementationInfo = Pass::lookupPassInfo(PassID);
     assert(ImplementationInfo &&
            "Must register pass before adding to AnalysisGroup!");
 
     // Make sure we keep track of the fact that the implementation implements
     // the interface.
-    StaticPassInfo *IIPI = const_cast<StaticPassInfo*>(ImplementationInfo);
+    PassInfo *IIPI = const_cast<PassInfo*>(ImplementationInfo);
     IIPI->addInterfaceImplemented(InterfaceInfo);
     
     getPassRegistrar()->RegisterAnalysisGroup(InterfaceInfo, IIPI, isDefault);
@@ -479,7 +479,7 @@
     VectorType &CFGOnlyList;
     GetCFGOnlyPasses(VectorType &L) : CFGOnlyList(L) {}
     
-    void passEnumerate(const StaticPassInfo *P) {
+    void passEnumerate(const PassInfo *P) {
       if (P->isCFGOnlyPass())
         CFGOnlyList.push_back(P);
     }
diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp
index 9e0be3b..4cf5501 100644
--- a/lib/VMCore/PassManager.cpp
+++ b/lib/VMCore/PassManager.cpp
@@ -332,8 +332,7 @@
   /// Return function pass corresponding to PassInfo PI, that is 
   /// required by module pass MP. Instantiate analysis pass, by using
   /// its runOnFunction() for function F.
-  virtual Pass* getOnTheFlyPass(Pass *MP, const StaticPassInfo *PI,
-                                Function &F);
+  virtual Pass* getOnTheFlyPass(Pass *MP, const PassInfo *PI, Function &F);
 
   virtual const char *getPassName() const {
     return "Module Pass Manager";
@@ -633,7 +632,7 @@
 
   for (SmallVector<ImmutablePass *, 8>::iterator I = ImmutablePasses.begin(),
          E = ImmutablePasses.end(); P == NULL && I != E; ++I) {
-    const StaticPassInfo *PI = (*I)->getPassInfo();
+    const PassInfo *PI = (*I)->getPassInfo();
     if (PI == AID)
       P = *I;
 
@@ -729,7 +728,7 @@
 
 /// Augement AvailableAnalysis by adding analysis made available by pass P.
 void PMDataManager::recordAvailableAnalysis(Pass *P) {
-  const StaticPassInfo *PI = P->getPassInfo();
+  const PassInfo *PI = P->getPassInfo();
   if (PI == 0) return;
   
   AvailableAnalysis[PI] = P;
@@ -868,7 +867,7 @@
     P->releaseMemory();
   }
 
-  if (const StaticPassInfo *PI = P->getPassInfo()) {
+  if (const PassInfo *PI = P->getPassInfo()) {
     // Remove the pass itself (if it is not already removed).
     AvailableAnalysis.erase(PI);
 
@@ -1052,7 +1051,7 @@
     if (PMDataManager *PMD = (*I)->getAsPMDataManager())
       PMD->dumpPassArguments();
     else
-      if (const StaticPassInfo *PI = (*I)->getPassInfo())
+      if (const PassInfo *PI = (*I)->getPassInfo())
         if (!PI->isAnalysisGroup())
           dbgs() << " -" << PI->getPassArgument();
   }
@@ -1155,8 +1154,7 @@
   llvm_unreachable("Unable to schedule pass");
 }
 
-Pass *PMDataManager::getOnTheFlyPass(Pass *P, const StaticPassInfo *PI,
-                                     Function &F) {
+Pass *PMDataManager::getOnTheFlyPass(Pass *P, const PassInfo *PI, Function &F) {
   assert(0 && "Unable to find on the fly pass");
   return NULL;
 }
@@ -1175,7 +1173,7 @@
   return PM.findAnalysisPass(ID, dir);
 }
 
-Pass *AnalysisResolver::findImplPass(Pass *P, const StaticPassInfo *AnalysisPI, 
+Pass *AnalysisResolver::findImplPass(Pass *P, const PassInfo *AnalysisPI, 
                                      Function &F) {
   return PM.getOnTheFlyPass(P, AnalysisPI, F);
 }
@@ -1570,8 +1568,7 @@
 /// Return function pass corresponding to PassInfo PI, that is 
 /// required by module pass MP. Instantiate analysis pass, by using
 /// its runOnFunction() for function F.
-Pass* MPPassManager::getOnTheFlyPass(Pass *MP, const StaticPassInfo *PI,
-                                     Function &F){
+Pass* MPPassManager::getOnTheFlyPass(Pass *MP, const PassInfo *PI, Function &F){
   FunctionPassManagerImpl *FPP = OnTheFlyManagers[MP];
   assert(FPP && "Unable to find on the fly pass");