Add jump threading to liblto.

llvm-svn: 50028
This commit is contained in:
Chris Lattner 2008-04-21 04:31:40 +00:00
parent ba994f7cdf
commit 0645b88852
1 changed files with 3 additions and 1 deletions

View File

@ -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());