diff options
Diffstat (limited to 'contrib/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp')
-rw-r--r-- | contrib/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp b/contrib/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp index b11b497..0b8dc7a 100644 --- a/contrib/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp +++ b/contrib/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp @@ -42,6 +42,11 @@ namespace { initializeDeadMachineInstructionElimPass(*PassRegistry::getPassRegistry()); } + void getAnalysisUsage(AnalysisUsage &AU) const override { + AU.setPreservesCFG(); + MachineFunctionPass::getAnalysisUsage(AU); + } + private: bool isDead(const MachineInstr *MI) const; }; @@ -90,7 +95,7 @@ bool DeadMachineInstructionElim::isDead(const MachineInstr *MI) const { } bool DeadMachineInstructionElim::runOnMachineFunction(MachineFunction &MF) { - if (skipOptnoneFunction(*MF.getFunction())) + if (skipFunction(*MF.getFunction())) return false; bool AnyChanges = false; |