Start using the new function cloning header
[oota-llvm.git] / lib / VMCore / PassManagerT.h
index bde97ba3a34fe5d372a43442049c032347604fff..53ce19f2e1f1fd15e402b68e6c29b7805a9617c2 100644 (file)
@@ -97,12 +97,14 @@ public:
   }
 
   void passStarted(Pass *P) {
+    if (dynamic_cast<AnalysisResolver*>(P)) return;
     std::map<Pass*, Timer>::iterator I = TimingData.find(P);
     if (I == TimingData.end())
-      I = TimingData.insert(std::make_pair(P, Timer(P->getPassName()))).first;
+      I=TimingData.insert(std::make_pair(P, Timer(P->getPassName(), TG))).first;
     I->second.startTimer();
   }
   void passEnded(Pass *P) {
+    if (dynamic_cast<AnalysisResolver*>(P)) return;
     std::map<Pass*, Timer>::iterator I = TimingData.find(P);
     assert (I != TimingData.end() && "passStarted/passEnded not nested right!");
     I->second.stopTimer();
@@ -250,7 +252,7 @@ public:
 
 
       // Erase all analyses not in the preserved set...
-      if (!AnUsage.preservesAll()) {
+      if (!AnUsage.getPreservesAll()) {
         const std::vector<AnalysisID> &PreservedSet = AnUsage.getPreservedSet();
         for (std::map<AnalysisID, Pass*>::iterator I = CurrentAnalyses.begin(),
                E = CurrentAnalyses.end(); I != E; )
@@ -356,7 +358,7 @@ public:
     return 0;
   }
 
-  // {start/end}Pass - Called when a pass is started, it just propogates
+  // {start/end}Pass - Called when a pass is started, it just propagates
   // information up to the top level PassManagerT object to tell it that a pass
   // has started or ended.  This is used to gather timing information about
   // passes.
@@ -382,7 +384,7 @@ public:
       LastUseOf[I->second] = User;    // Local pass, extend the lifetime
     } else {
       // Pass not in current available set, must be a higher level pass
-      // available to us, propogate to parent pass manager...  We tell the
+      // available to us, propagate to parent pass manager...  We tell the
       // parent that we (the passmanager) are using the analysis so that it
       // frees the analysis AFTER this pass manager runs.
       //
@@ -470,7 +472,7 @@ private:
       markPassUsed(*I, P);     // Mark *I as used by P
 
     // Erase all analyses not in the preserved set...
-    if (!AnUsage.preservesAll()) {
+    if (!AnUsage.getPreservesAll()) {
       const std::vector<AnalysisID> &PreservedSet = AnUsage.getPreservedSet();
       for (std::map<AnalysisID, Pass*>::iterator I = CurrentAnalyses.begin(),
              E = CurrentAnalyses.end(); I != E; ) {