mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
Run codegen dce pass for all targets at all optimization levels. Previously it's
only run for x86 with fastisel. I've found it being very effective in eliminating some obvious dead code as result of formal parameter lowering especially when tail call optimization eliminated the need for some of the loads from fixed frame objects. It also shrinks a number of the tests. A couple of tests no longer make sense and are now eliminated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95493 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -291,6 +291,12 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM,
|
||||
printAndVerify(PM, "After Instruction Selection",
|
||||
/* allowDoubleDefs= */ true);
|
||||
|
||||
|
||||
// Delete dead machine instructions regardless of optimization level.
|
||||
PM.add(createDeadMachineInstructionElimPass());
|
||||
printAndVerify(PM, "After codegen DCE pass",
|
||||
/* allowDoubleDefs= */ true);
|
||||
|
||||
if (OptLevel != CodeGenOpt::None) {
|
||||
PM.add(createOptimizeExtsPass());
|
||||
if (!DisableMachineLICM)
|
||||
|
Reference in New Issue
Block a user