[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp
Devang Patel
dpatel at apple.com
Fri Nov 10 17:31:22 PST 2006
Changes in directory llvm/lib/VMCore:
PassManager.cpp updated: 1.14 -> 1.15
---
Log message:
Move CommonPassManagerImpl from PassManager.h to PassManager.cpp
---
Diffs of the changes: (+39 -0)
PassManager.cpp | 39 +++++++++++++++++++++++++++++++++++++++
1 files changed, 39 insertions(+)
Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.14 llvm/lib/VMCore/PassManager.cpp:1.15
--- llvm/lib/VMCore/PassManager.cpp:1.14 Fri Nov 10 19:24:55 2006
+++ llvm/lib/VMCore/PassManager.cpp Fri Nov 10 19:31:05 2006
@@ -14,11 +14,50 @@
#include "llvm/PassManager.h"
#include "llvm/Module.h"
+#include <vector>
+#include <set>
using namespace llvm;
namespace llvm {
+/// CommonPassManagerImpl helps pass manager analysis required by
+/// the managed passes. It provides methods to add/remove analysis
+/// available and query if certain analysis is available or not.
+class CommonPassManagerImpl : public Pass {
+
+public:
+
+ /// Return true IFF pass P's required analysis set does not required new
+ /// manager.
+ bool manageablePass(Pass *P);
+
+ /// Return true IFF AnalysisID AID is currently available.
+ bool analysisCurrentlyAvailable(AnalysisID AID);
+
+ /// Augment RequiredAnalysis by adding analysis required by pass P.
+ void noteDownRequiredAnalysis(Pass *P);
+
+ /// Augment AvailableAnalysis by adding analysis made available by pass P.
+ void noteDownAvailableAnalysis(Pass *P);
+
+ /// Remove AnalysisID from the RequiredSet
+ void removeAnalysis(AnalysisID AID);
+
+ /// Remove Analysis that is not preserved by the pass
+ void removeNotPreservedAnalysis(Pass *P);
+
+ /// Remove dead passes
+ void removeDeadPasses() { /* TODO : Implement */ }
+
+private:
+ // Analysis required by the passes managed by this manager
+ std::vector<AnalysisID> RequiredAnalysis;
+
+ // set of available Analysis
+ std::set<AnalysisID> AvailableAnalysis;
+};
+
/// BasicBlockPassManager_New manages BasicBlockPass. It batches all the
/// pass together and sequence them to process one basic block before
/// processing next basic block.
More information about the llvm-commits
mailing list