aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-04-21 04:31:40 +0000
committerChris Lattner <sabre@nondot.org>2008-04-21 04:31:40 +0000
commit1d40281ae65bb27445c1b75fc244af6b3a5b5af6 (patch)
tree36922cf703068742c6b28b059bce4975518f329b
parente12d8e422d81b52e04b0c3f2efd603e1ccb5f7a9 (diff)
Add jump threading to liblto.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50028 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--tools/lto2/LTOCodeGenerator.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/lto2/LTOCodeGenerator.cpp b/tools/lto2/LTOCodeGenerator.cpp
index 4c5850acb4..b7962be50b 100644
--- a/tools/lto2/LTOCodeGenerator.cpp
+++ b/tools/lto2/LTOCodeGenerator.cpp
@@ -370,7 +370,7 @@ bool LTOCodeGenerator::generateAssemblyCode(std::ostream& out, std::string& errM
// 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 @@ bool LTOCodeGenerator::generateAssemblyCode(std::ostream& out, std::string& errM
// 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());