[llvm-commits] CVS: llvm/include/llvm/Pass.h PassManager.h
Chris Lattner
lattner at cs.uiuc.edu
Tue Jan 3 23:47:24 PST 2006
Changes in directory llvm/include/llvm:
Pass.h updated: 1.51 -> 1.52
PassManager.h updated: 1.13 -> 1.14
---
Log message:
Patch #6's in Saem's refactor-the-passmanager patch series. From him:
This sanitises the world, blows away the specialisations and adds
traits per passmanager type -- seemed most natural.
---
Diffs of the changes: (+28 -19)
Pass.h | 39 +++++++++++++++++++++++----------------
PassManager.h | 8 +++++---
2 files changed, 28 insertions(+), 19 deletions(-)
Index: llvm/include/llvm/Pass.h
diff -u llvm/include/llvm/Pass.h:1.51 llvm/include/llvm/Pass.h:1.52
--- llvm/include/llvm/Pass.h:1.51 Thu Apr 21 15:11:51 2005
+++ llvm/include/llvm/Pass.h Wed Jan 4 01:47:12 2006
@@ -44,7 +44,10 @@
class AnalysisUsage;
class PassInfo;
class ImmutablePass;
-template<class UnitType> class PassManagerT;
+template<class Trait> class PassManagerT;
+class BasicBlockPassManager;
+class FunctionPassManagerT;
+class ModulePassManager;
struct AnalysisResolver;
// AnalysisID - Use the PassInfo to identify a pass...
@@ -197,9 +200,10 @@
}
private:
- friend class PassManagerT<Module>;
- friend class PassManagerT<Function>;
- friend class PassManagerT<BasicBlock>;
+ template<typename Trait> friend class PassManagerT;
+ friend class ModulePassManager;
+ friend class FunctionPassManagerT;
+ friend class BasicBlockPassManager;
};
inline std::ostream &operator<<(std::ostream &OS, const Pass &P) {
@@ -220,7 +224,7 @@
virtual bool runPass(Module &M) { return runOnModule(M); }
virtual bool runPass(BasicBlock&) { return false; }
- virtual void addToPassManager(PassManagerT<Module> *PM, AnalysisUsage &AU);
+ virtual void addToPassManager(ModulePassManager *PM, AnalysisUsage &AU);
};
@@ -244,8 +248,9 @@
virtual bool runOnModule(Module &M) { return false; }
private:
- friend class PassManagerT<Module>;
- virtual void addToPassManager(PassManagerT<Module> *PM, AnalysisUsage &AU);
+ template<typename Trait> friend class PassManagerT;
+ friend class ModulePassManager;
+ virtual void addToPassManager(ModulePassManager *PM, AnalysisUsage &AU);
};
//===----------------------------------------------------------------------===//
@@ -286,11 +291,12 @@
bool run(Function &F);
private:
- friend class PassManagerT<Module>;
- friend class PassManagerT<Function>;
- friend class PassManagerT<BasicBlock>;
- virtual void addToPassManager(PassManagerT<Module> *PM, AnalysisUsage &AU);
- virtual void addToPassManager(PassManagerT<Function> *PM, AnalysisUsage &AU);
+ template<typename Trait> friend class PassManagerT;
+ friend class ModulePassManager;
+ friend class FunctionPassManagerT;
+ friend class BasicBlockPassManager;
+ virtual void addToPassManager(ModulePassManager *PM, AnalysisUsage &AU);
+ virtual void addToPassManager(FunctionPassManagerT *PM, AnalysisUsage &AU);
};
@@ -344,10 +350,11 @@
virtual bool runPass(BasicBlock &BB);
private:
- friend class PassManagerT<Function>;
- friend class PassManagerT<BasicBlock>;
- virtual void addToPassManager(PassManagerT<Function> *PM, AnalysisUsage &AU);
- virtual void addToPassManager(PassManagerT<BasicBlock> *PM,AnalysisUsage &AU);
+ template<typename Trait> friend class PassManagerT;
+ friend class FunctionPassManagerT;
+ friend class BasicBlockPassManager;
+ virtual void addToPassManager(FunctionPassManagerT *PM, AnalysisUsage &AU);
+ virtual void addToPassManager(BasicBlockPassManager *PM,AnalysisUsage &AU);
};
/// If the user specifies the -time-passes argument on an LLVM tool command line
Index: llvm/include/llvm/PassManager.h
diff -u llvm/include/llvm/PassManager.h:1.13 llvm/include/llvm/PassManager.h:1.14
--- llvm/include/llvm/PassManager.h:1.13 Thu Apr 21 15:11:51 2005
+++ llvm/include/llvm/PassManager.h Wed Jan 4 01:47:12 2006
@@ -23,10 +23,12 @@
class ModulePass;
class Module;
class ModuleProvider;
-template<class UnitType> class PassManagerT;
+class ModulePassManager;
+class FunctionPassManagerT;
+class BasicBlockPassManager;
class PassManager {
- PassManagerT<Module> *PM; // This is a straightforward Pimpl class
+ ModulePassManager *PM; // This is a straightforward Pimpl class
public:
PassManager();
~PassManager();
@@ -49,7 +51,7 @@
class Function;
class FunctionPassManager {
- PassManagerT<Function> *PM; // This is a straightforward Pimpl class
+ FunctionPassManagerT *PM; // This is a straightforward Pimpl class
ModuleProvider *MP;
public:
FunctionPassManager(ModuleProvider *P);
More information about the llvm-commits
mailing list