Run the CFG simplification pass even when optimization is disabled.

This fixes an issue with undefined SVML symbols with code that called
transcendental functions in the stdandard library, even when the SVML
math library hadn't been selected.
This commit is contained in:
Matt Pharr
2011-10-06 09:20:50 -07:00
parent 9feea32471
commit ff2a43ac19

View File

@@ -204,6 +204,7 @@ Optimize(llvm::Module *module, int optLevel) {
optPM.add(CreateIsCompileTimeConstantPass(true));
optPM.add(llvm::createFunctionInliningPass());
optPM.add(CreateMakeInternalFuncsStaticPass());
optPM.add(llvm::createCFGSimplificationPass());
optPM.add(llvm::createGlobalDCEPass());
}
else {