1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00

initialize and finalize function passes, pointed out by Cameron.

llvm-svn: 131843
This commit is contained in:
Chris Lattner 2011-05-22 06:44:19 +00:00
parent 75adf06d44
commit 84d1d4b89c

View File

@ -682,9 +682,12 @@ int main(int argc, char **argv) {
if (OptLevelO3) if (OptLevelO3)
AddOptimizationPasses(Passes, *FPasses, 3); AddOptimizationPasses(Passes, *FPasses, 3);
if (OptLevelO1 || OptLevelO2 || OptLevelO3) if (OptLevelO1 || OptLevelO2 || OptLevelO3) {
FPasses->doInitialization();
for (Module::iterator F = M->begin(), E = M->end(); F != E; ++F) for (Module::iterator F = M->begin(), E = M->end(); F != E; ++F)
FPasses->run(*F); FPasses->run(*F);
FPasses->doFinalization();
}
// Check that the module is well formed on completion of optimization // Check that the module is well formed on completion of optimization
if (!NoVerify && !VerifyEach) if (!NoVerify && !VerifyEach)