[llvm-commits] CVS: llvm/include/llvm/PassManagers.h

Devang Patel dpatel at apple.com
Fri Feb 16 19:54:05 PST 2007



Changes in directory llvm/include/llvm:

PassManagers.h updated: 1.7 -> 1.8
---
Log message:

Use inverted map to speedup collectLastUses().


---
Diffs of the changes:  (+5 -0)

 PassManagers.h |    5 +++++
 1 files changed, 5 insertions(+)


Index: llvm/include/llvm/PassManagers.h
diff -u llvm/include/llvm/PassManagers.h:1.7 llvm/include/llvm/PassManagers.h:1.8
--- llvm/include/llvm/PassManagers.h:1.7	Thu Feb  1 16:10:12 2007
+++ llvm/include/llvm/PassManagers.h	Fri Feb 16 21:53:44 2007
@@ -120,6 +120,10 @@
   /// Collect passes whose last user is P
   void collectLastUses(std::vector<Pass *> &LastUses, Pass *P);
 
+  // Walk LastUser map and create inverted map. This should be done
+  // after all passes are added and before running first pass.
+  void collectInvertedLU();
+
   /// Find the pass that implements Analysis AID. Search immutable
   /// passes and all pass managers. If desired pass is not found
   /// then return NULL.
@@ -171,6 +175,7 @@
   // Map to keep track of last user of the analysis pass.
   // LastUser->second is the last user of Lastuser->first.
   std::map<Pass *, Pass *> LastUser;
+  std::map<Pass *, std::vector <Pass *> > InvertedLU;
 
   /// Immutable passes are managed by top level manager.
   std::vector<ImmutablePass *> ImmutablePasses;






More information about the llvm-commits mailing list