Move FunctionPassManagerImpl's dumpArguments and dumpPasses calls
authorDan Gohman <gohman@apple.com>
Mon, 23 Nov 2009 16:24:18 +0000 (16:24 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 23 Nov 2009 16:24:18 +0000 (16:24 +0000)
out of its run function and into its doInitialization method, so
that it does the dump once instead of once per function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89660 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/PassManager.cpp

index d3d61f5a5eb5061afd37e28538ae020d0ce270b5..ae418a0b128f77e41c16886e346f151a901fcd76 100644 (file)
@@ -1231,6 +1231,9 @@ bool FunctionPassManager::doFinalization() {
 bool FunctionPassManagerImpl::doInitialization(Module &M) {
   bool Changed = false;
 
+  dumpArguments();
+  dumpPasses();
+
   for (unsigned Index = 0; Index < getNumContainedManagers(); ++Index)
     Changed |= getContainedManager(Index)->doInitialization(M);
 
@@ -1274,9 +1277,6 @@ bool FunctionPassManagerImpl::run(Function &F) {
   bool Changed = false;
   TimingInfo::createTheTimeInfo();
 
-  dumpArguments();
-  dumpPasses();
-
   initializeAllAnalysisInfo();
   for (unsigned Index = 0; Index < getNumContainedManagers(); ++Index)
     Changed |= getContainedManager(Index)->runOnFunction(F);