From ff2a43ac19954ff487e62928dd9e5267b472401a Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Thu, 6 Oct 2011 09:20:50 -0700 Subject: [PATCH] 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. --- opt.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/opt.cpp b/opt.cpp index 337031bc..fd4f1709 100644 --- a/opt.cpp +++ b/opt.cpp @@ -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 {