[llvm-commits] CVS: llvm/lib/VMCore/PassManagerT.h

Chris Lattner lattner at cs.uiuc.edu
Wed Sep 25 17:27:01 PDT 2002


Changes in directory llvm/lib/VMCore:

PassManagerT.h updated: 1.28 -> 1.29

---
Log message:

* Fix ugly bug in previous checkin where I reused the name 'i' one too many times
* Print out immutable passes in the -debug-pass=Structure report.



---
Diffs of the changes:

Index: llvm/lib/VMCore/PassManagerT.h
diff -u llvm/lib/VMCore/PassManagerT.h:1.28 llvm/lib/VMCore/PassManagerT.h:1.29
--- llvm/lib/VMCore/PassManagerT.h:1.28	Wed Sep 25 16:59:11 2002
+++ llvm/lib/VMCore/PassManagerT.h	Wed Sep 25 17:26:52 2002
@@ -173,15 +173,16 @@
     CurrentAnalyses.clear();
 
     // Add any immutable passes to the CurrentAnalyses set...
-    for (unsigned i = 0, e = ImmutablePasses.size(); i != e; ++i)
-      if (const PassInfo *PI = ImmutablePasses[i]->getPassInfo()) {
-        CurrentAnalyses[PI] = ImmutablePasses[i];
+    for (unsigned i = 0, e = ImmutablePasses.size(); i != e; ++i) {
+      ImmutablePass *IPass = ImmutablePasses[i];
+      if (const PassInfo *PI = IPass->getPassInfo()) {
+        CurrentAnalyses[PI] = IPass;
 
         const std::vector<const PassInfo*> &II = PI->getInterfacesImplemented();
         for (unsigned i = 0, e = II.size(); i != e; ++i)
-          CurrentAnalyses[II[i]] = ImmutablePasses[i];
+          CurrentAnalyses[II[i]] = IPass;
       }
-
+    }
 
     // LastUserOf - This contains the inverted LastUseOfMap...
     std::map<Pass *, std::vector<Pass*> > LastUserOf;
@@ -297,6 +298,10 @@
 
   // dumpPassStructure - Implement the -debug-passes=PassStructure option
   virtual void dumpPassStructure(unsigned Offset = 0) {
+    // Print out the immutable passes...
+    for (unsigned i = 0, e = ImmutablePasses.size(); i != e; ++i)
+      ImmutablePasses[i]->dumpPassStructure(0);
+
     std::cerr << std::string(Offset*2, ' ') << Traits::getPMName()
               << " Pass Manager\n";
     for (typename std::vector<PassClass*>::iterator





More information about the llvm-commits mailing list