diff --git a/tools/llvm-ld/Optimize.cpp b/tools/llvm-ld/Optimize.cpp index 0dc38570171..a3f1986b243 100644 --- a/tools/llvm-ld/Optimize.cpp +++ b/tools/llvm-ld/Optimize.cpp @@ -148,7 +148,8 @@ void Optimize(Module* M) { addPass(Passes, createInstructionCombiningPass()); addPass(Passes, createJumpThreadingPass()); // Thread jumps. - + addPass(Passes, createPromoteMemoryToRegisterPass()); // Cleanup jumpthread. + // Delete basic blocks, which optimization passes may have killed... addPass(Passes, createCFGSimplificationPass());