Reuse code. Directly use runOnFunction().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32370 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2006-12-08 19:03:05 +00:00
parent f8463a38bf
commit 97856ceeab

View File

@ -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<Pass *>::iterator itr = passVectorBegin(),
e = passVectorEnd(); itr != e; ++itr) {
Pass *P = *itr;
FunctionPass *FP = dynamic_cast<FunctionPass*>(P);
Changed |= FP->runOnFunction(*I);
removeNotPreservedAnalysis(P);
recordAvailableAnalysis(P);
removeDeadPasses(P);
}
this->runOnFunction(*I);
return Changed;
}