summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LLVMTargetMachine.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-06-24 23:41:59 +0000
committerDan Gohman <gohman@apple.com>2010-06-24 23:41:59 +0000
commit5f0bf64c0c562824e78fcf104070f69d12199e7e (patch)
tree3a1fe27a22b09ea1e68edd964c21b87c3aefa51f /llvm/lib/CodeGen/LLVMTargetMachine.cpp
parent447735aa98a21b7d09916c095ab2cac4f855451d (diff)
downloadbcm5719-llvm-5f0bf64c0c562824e78fcf104070f69d12199e7e.tar.gz
bcm5719-llvm-5f0bf64c0c562824e78fcf104070f69d12199e7e.zip
Add some comments.
llvm-svn: 106809
Diffstat (limited to 'llvm/lib/CodeGen/LLVMTargetMachine.cpp')
-rw-r--r--llvm/lib/CodeGen/LLVMTargetMachine.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
index 7f1a7c4f259..d437370031d 100644
--- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
@@ -330,6 +330,13 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM,
PM.add(createOptimizePHIsPass());
// 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);
OpenPOWER on IntegriCloud