diff options
author | Chris Lattner <sabre@nondot.org> | 2006-01-04 07:47:13 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-01-04 07:47:13 +0000 |
commit | 7f7b730d79c27390ea06aa4bfeb542baf4f8892d (patch) | |
tree | bd7ff66e31b15bc2736c8256eb033494556593c2 /lib/VMCore/Pass.cpp | |
parent | 51d6e76ff4cf950b759be389d23e9383a29b1dc9 (diff) | |
download | external_llvm-7f7b730d79c27390ea06aa4bfeb542baf4f8892d.zip external_llvm-7f7b730d79c27390ea06aa4bfeb542baf4f8892d.tar.gz external_llvm-7f7b730d79c27390ea06aa4bfeb542baf4f8892d.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25085 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Pass.cpp')
-rw-r--r-- | lib/VMCore/Pass.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/VMCore/Pass.cpp b/lib/VMCore/Pass.cpp index dc547ae..94b1d47 100644 --- a/lib/VMCore/Pass.cpp +++ b/lib/VMCore/Pass.cpp @@ -78,7 +78,7 @@ void AnalysisUsage::setPreservesCFG() { // PassManager implementation - The PassManager class is a simple Pimpl class // that wraps the PassManagerT template. // -PassManager::PassManager() : PM(new PassManagerT<Module>()) {} +PassManager::PassManager() : PM(new ModulePassManager()) {} PassManager::~PassManager() { delete PM; } void PassManager::add(Pass *P) { ModulePass *MP = dynamic_cast<ModulePass*>(P); @@ -93,7 +93,7 @@ bool PassManager::run(Module &M) { return PM->runOnModule(M); } // is like PassManager, but only deals in FunctionPasses. // FunctionPassManager::FunctionPassManager(ModuleProvider *P) : - PM(new PassManagerT<Function>()), MP(P) {} + PM(new FunctionPassManagerT()), MP(P) {} FunctionPassManager::~FunctionPassManager() { delete PM; } void FunctionPassManager::add(FunctionPass *P) { PM->add(P); } void FunctionPassManager::add(ImmutablePass *IP) { PM->add(IP); } @@ -194,7 +194,7 @@ void PMDebug::PrintAnalysisSetInfo(unsigned Depth, const char *Msg, // Pass Implementation // -void ModulePass::addToPassManager(PassManagerT<Module> *PM, AnalysisUsage &AU) { +void ModulePass::addToPassManager(ModulePassManager *PM, AnalysisUsage &AU) { PM->addPass(this, AU); } @@ -231,7 +231,7 @@ void Pass::dump() const { //===----------------------------------------------------------------------===// // ImmutablePass Implementation // -void ImmutablePass::addToPassManager(PassManagerT<Module> *PM, +void ImmutablePass::addToPassManager(ModulePassManager *PM, AnalysisUsage &AU) { PM->addPass(this, AU); } @@ -264,12 +264,12 @@ bool FunctionPass::run(Function &F) { return Changed | doFinalization(*F.getParent()); } -void FunctionPass::addToPassManager(PassManagerT<Module> *PM, +void FunctionPass::addToPassManager(ModulePassManager *PM, AnalysisUsage &AU) { PM->addPass(this, AU); } -void FunctionPass::addToPassManager(PassManagerT<Function> *PM, +void FunctionPass::addToPassManager(FunctionPassManagerT *PM, AnalysisUsage &AU) { PM->addPass(this, AU); } @@ -302,12 +302,12 @@ bool BasicBlockPass::runPass(BasicBlock &BB) { return Changed; } -void BasicBlockPass::addToPassManager(PassManagerT<Function> *PM, +void BasicBlockPass::addToPassManager(FunctionPassManagerT *PM, AnalysisUsage &AU) { PM->addPass(this, AU); } -void BasicBlockPass::addToPassManager(PassManagerT<BasicBlock> *PM, +void BasicBlockPass::addToPassManager(BasicBlockPassManager *PM, AnalysisUsage &AU) { PM->addPass(this, AU); } |