[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp

Devang Patel dpatel at apple.com
Mon Mar 5 17:06:38 PST 2007

Changes in directory llvm/lib/VMCore:

PassManager.cpp updated: 1.142 -> 1.143
Log message:

Add preparePassManager() hook. This allows each pass to check whether
current active pass manager is appropriate or not. 

A loop pass may consider current LPPassManager in appropraite if loop
pass is not preserving analysis information that is used by other 
passes managed by current LPPassManager. In such situation, loop pass
can pop current LPPassManager from the PMStack using this  hook 
and use new LPPassManager for itself.

Diffs of the changes:  (+3 -0)

 PassManager.cpp |    3 +++
 1 files changed, 3 insertions(+)

Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.142 llvm/lib/VMCore/PassManager.cpp:1.143
--- llvm/lib/VMCore/PassManager.cpp:1.142	Mon Mar  5 16:57:49 2007
+++ llvm/lib/VMCore/PassManager.cpp	Mon Mar  5 19:06:16 2007
@@ -385,6 +385,9 @@
   if (findAnalysisPass(P->getPassInfo()))
+  // Give pass a chance to prepare the stage.
+  P->preparePassManager(activeStack);
   AnalysisUsage AnUsage;
   const std::vector<AnalysisID> &RequiredSet = AnUsage.getRequiredSet();

More information about the llvm-commits mailing list