aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/LLVMTargetMachine.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-07-01 12:15:30 +0000
committerDan Gohman <gohman@apple.com>2010-07-01 12:15:30 +0000
commit21baf9a969a3edf80b3bc5206308963ee7ed93fb (patch)
tree664962c6bed00a6cc4d1f70bec8ec1819955d848 /lib/CodeGen/LLVMTargetMachine.cpp
parentfa0879fabd13d4600547d4cdbbffd3c09aedf14d (diff)
downloadexternal_llvm-21baf9a969a3edf80b3bc5206308963ee7ed93fb.tar.gz
external_llvm-21baf9a969a3edf80b3bc5206308963ee7ed93fb.tar.bz2
external_llvm-21baf9a969a3edf80b3bc5206308963ee7ed93fb.zip
Temporarily disable on-demand fast-isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107393 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LLVMTargetMachine.cpp')
-rw-r--r--lib/CodeGen/LLVMTargetMachine.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/lib/CodeGen/LLVMTargetMachine.cpp b/lib/CodeGen/LLVMTargetMachine.cpp
index bf3137e495..d437370031 100644
--- a/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/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());