diff options
author | Dan Gohman <gohman@apple.com> | 2010-07-01 12:15:30 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-07-01 12:15:30 +0000 |
commit | d2965c10a1b64c6678cccd4708efe12f0f78bfeb (patch) | |
tree | 935082193406f6402b9ef3c6d8cd4560a333788e /llvm/lib/CodeGen/LLVMTargetMachine.cpp | |
parent | 1b30951f2f849860f9118e2c5c338b700efbfddd (diff) | |
download | bcm5719-llvm-d2965c10a1b64c6678cccd4708efe12f0f78bfeb.tar.gz bcm5719-llvm-d2965c10a1b64c6678cccd4708efe12f0f78bfeb.zip |
Temporarily disable on-demand fast-isel.
llvm-svn: 107393
Diffstat (limited to 'llvm/lib/CodeGen/LLVMTargetMachine.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LLVMTargetMachine.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp index bf3137e4953..d437370031d 100644 --- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp +++ b/llvm/lib/CodeGen/LLVMTargetMachine.cpp @@ -329,15 +329,19 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM, if (OptLevel != CodeGenOpt::None) PM.add(createOptimizePHIsPass()); - if (OptLevel != CodeGenOpt::None) { - // With optimization, dead code should already be eliminated. However - // there is one known exception: lowered code for arguments that are only - // used by tail calls, where the tail calls reuse the incoming stack - // arguments directly (see t11 in test/CodeGen/X86/sibcall.ll). - PM.add(createDeadMachineInstructionElimPass()); - printAndVerify(PM, "After codegen DCE pass", - /* allowDoubleDefs= */ true); + // Delete dead machine instructions regardless of optimization level. + // + // At -O0, fast-isel frequently creates dead instructions. + // + // With optimization, dead code should already be eliminated. However + // there is one known exception: lowered code for arguments that are only + // used by tail calls, where the tail calls reuse the incoming stack + // arguments directly (see t11 in test/CodeGen/X86/sibcall.ll). + PM.add(createDeadMachineInstructionElimPass()); + printAndVerify(PM, "After codegen DCE pass", + /* allowDoubleDefs= */ true); + if (OptLevel != CodeGenOpt::None) { PM.add(createOptimizeExtsPass()); if (!DisableMachineLICM) PM.add(createMachineLICMPass()); |