Fast isel no longer needs DeadMachineInstrElim to clean up after it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107381 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman
2010-07-01 03:49:59 +00:00
parent 7fbcc98f20
commit a528bc0e8a

View File

@ -329,10 +329,7 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM,
if (OptLevel != CodeGenOpt::None) if (OptLevel != CodeGenOpt::None)
PM.add(createOptimizePHIsPass()); PM.add(createOptimizePHIsPass());
// Delete dead machine instructions regardless of optimization level. if (OptLevel != CodeGenOpt::None) {
//
// At -O0, fast-isel frequently creates dead instructions.
//
// With optimization, dead code should already be eliminated. However // With optimization, dead code should already be eliminated. However
// there is one known exception: lowered code for arguments that are only // there is one known exception: lowered code for arguments that are only
// used by tail calls, where the tail calls reuse the incoming stack // used by tail calls, where the tail calls reuse the incoming stack
@ -341,7 +338,6 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM,
printAndVerify(PM, "After codegen DCE pass", printAndVerify(PM, "After codegen DCE pass",
/* allowDoubleDefs= */ true); /* allowDoubleDefs= */ true);
if (OptLevel != CodeGenOpt::None) {
PM.add(createOptimizeExtsPass()); PM.add(createOptimizeExtsPass());
if (!DisableMachineLICM) if (!DisableMachineLICM)
PM.add(createMachineLICMPass()); PM.add(createMachineLICMPass());