diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp index 64585f93995..6b6921cedde 100644 --- a/lib/VMCore/PassManager.cpp +++ b/lib/VMCore/PassManager.cpp @@ -844,16 +844,8 @@ bool FunctionPassManagerImpl_New::runOnModule(Module &M) { initializeAnalysisInfo(); for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) - for (std::vector::iterator itr = passVectorBegin(), - e = passVectorEnd(); itr != e; ++itr) { - Pass *P = *itr; - - FunctionPass *FP = dynamic_cast(P); - Changed |= FP->runOnFunction(*I); - removeNotPreservedAnalysis(P); - recordAvailableAnalysis(P); - removeDeadPasses(P); - } + this->runOnFunction(*I); + return Changed; }