From: Devang Patel Date: Tue, 9 Sep 2008 17:56:50 +0000 (+0000) Subject: Simplify. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0938f7424261cb99abaac4e5325487886e213dfb;p=oota-llvm.git Simplify. Fix outdated comment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55993 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp index 42b33ff66b1..20fc68c4748 100644 --- a/lib/VMCore/PassManager.cpp +++ b/lib/VMCore/PassManager.cpp @@ -1590,7 +1590,7 @@ void ModulePass::assignPassManager(PMStack &PMS, void FunctionPass::assignPassManager(PMStack &PMS, PassManagerType PreferredType) { - // Find Module Pass Manager (TODO : Or Call Graph Pass Manager) + // Find Module Pass Manager while(!PMS.empty()) { if (PMS.top()->getPassManagerType() > PMT_FunctionPassManager) PMS.pop(); @@ -1614,13 +1614,7 @@ void FunctionPass::assignPassManager(PMStack &PMS, // [3] Assign manager to manage this new manager. This may create // and push new managers into PMS - - // If Call Graph Pass Manager is active then use it to manage - // this new Function Pass manager. - if (PMD->getPassManagerType() == PMT_CallGraphPassManager) - FPP->assignPassManager(PMS, PMT_CallGraphPassManager); - else - FPP->assignPassManager(PMS); + FPP->assignPassManager(PMS, PMD->getPassManagerType()); // [4] Push new manager into PMS PMS.push(FPP);