Add jump threading to liblto.
llvm-svn: 50028
diff --git a/llvm/tools/lto2/LTOCodeGenerator.cpp b/llvm/tools/lto2/LTOCodeGenerator.cpp
index 4c5850a..b7962be 100644
--- a/llvm/tools/lto2/LTOCodeGenerator.cpp
+++ b/llvm/tools/lto2/LTOCodeGenerator.cpp
@@ -370,7 +370,7 @@
// The IPO passes may leave cruft around. Clean up after them.
passes.add(createInstructionCombiningPass());
-
+ passes.add(createJumpThreadingPass()); // Thread jumps.
passes.add(createScalarReplAggregatesPass()); // Break up allocas
// Run a few AA driven optimizations here and now, to cleanup the code.
@@ -384,6 +384,8 @@
// Cleanup and simplify the code after the scalar optimizations.
passes.add(createInstructionCombiningPass());
+ passes.add(createJumpThreadingPass()); // Thread jumps.
+
// Delete basic blocks, which optimization passes may have killed...
passes.add(createCFGSimplificationPass());