aboutsummaryrefslogtreecommitdiffstats
path: root/tools/llvm-ld/Optimize.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-04-21 04:28:40 +0000
committerChris Lattner <sabre@nondot.org>2008-04-21 04:28:40 +0000
commite38bd539448d95b47e54e088746ac5a74c638119 (patch)
tree3b90fd2248bad83eb32b97b626d25fb251c056fc /tools/llvm-ld/Optimize.cpp
parentdc303126ff480903c83d393e430bf37302350359 (diff)
downloadexternal_llvm-e38bd539448d95b47e54e088746ac5a74c638119.zip
external_llvm-e38bd539448d95b47e54e088746ac5a74c638119.tar.gz
external_llvm-e38bd539448d95b47e54e088746ac5a74c638119.tar.bz2
run the jump threading pass in llvm-ld also
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50027 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-ld/Optimize.cpp')
-rw-r--r--tools/llvm-ld/Optimize.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/llvm-ld/Optimize.cpp b/tools/llvm-ld/Optimize.cpp
index aff228d..5a22ea1 100644
--- a/tools/llvm-ld/Optimize.cpp
+++ b/tools/llvm-ld/Optimize.cpp
@@ -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());