run the jump threading pass in llvm-ld also
authorChris Lattner <sabre@nondot.org>
Mon, 21 Apr 2008 04:28:40 +0000 (04:28 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 21 Apr 2008 04:28:40 +0000 (04:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50027 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-ld/Optimize.cpp

index aff228d3ea427367e5b8ecb994dece0f4f536020..5a22ea1394f6d4d55682c6f175afa56f6915021d 100644 (file)
@@ -162,7 +162,7 @@ void Optimize(Module* M) {
 
     // The IPO passes may leave cruft around.  Clean up after them.
     addPass(Passes, createInstructionCombiningPass());
-
+    addPass(Passes, createJumpThreadingPass());        // Thread jumps.
     addPass(Passes, createScalarReplAggregatesPass()); // Break up allocas
 
     // Run a few AA driven optimizations here and now, to cleanup the code.
@@ -176,6 +176,8 @@ void Optimize(Module* M) {
     // Cleanup and simplify the code after the scalar optimizations.
     addPass(Passes, createInstructionCombiningPass());
 
+    addPass(Passes, createJumpThreadingPass());        // Thread jumps.
+
     // Delete basic blocks, which optimization passes may have killed...
     addPass(Passes, createCFGSimplificationPass());