mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-14 15:28:20 +00:00
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
This commit is contained in:
@@ -162,7 +162,7 @@ void Optimize(Module* M) {
|
|||||||
|
|
||||||
// The IPO passes may leave cruft around. Clean up after them.
|
// The IPO passes may leave cruft around. Clean up after them.
|
||||||
addPass(Passes, createInstructionCombiningPass());
|
addPass(Passes, createInstructionCombiningPass());
|
||||||
|
addPass(Passes, createJumpThreadingPass()); // Thread jumps.
|
||||||
addPass(Passes, createScalarReplAggregatesPass()); // Break up allocas
|
addPass(Passes, createScalarReplAggregatesPass()); // Break up allocas
|
||||||
|
|
||||||
// Run a few AA driven optimizations here and now, to cleanup the code.
|
// 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.
|
// Cleanup and simplify the code after the scalar optimizations.
|
||||||
addPass(Passes, createInstructionCombiningPass());
|
addPass(Passes, createInstructionCombiningPass());
|
||||||
|
|
||||||
|
addPass(Passes, createJumpThreadingPass()); // Thread jumps.
|
||||||
|
|
||||||
// Delete basic blocks, which optimization passes may have killed...
|
// Delete basic blocks, which optimization passes may have killed...
|
||||||
addPass(Passes, createCFGSimplificationPass());
|
addPass(Passes, createCFGSimplificationPass());
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user