#include "llvm/CodeGen/DeadMachineInstructionElim.h"
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/LiveRegUnits.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/InitializePasses.h"
#include "llvm/Pass.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
usingnamespacellvm;
#define DEBUG_TYPE …
STATISTIC(NumDeletes, "Number of dead instructions deleted");
namespace {
class DeadMachineInstructionElimImpl { … };
class DeadMachineInstructionElim : public MachineFunctionPass { … };
}
PreservedAnalyses
DeadMachineInstructionElimPass::run(MachineFunction &MF,
MachineFunctionAnalysisManager &) { … }
char DeadMachineInstructionElim::ID = …;
char &llvm::DeadMachineInstructionElimID = …;
INITIALIZE_PASS(…)
bool DeadMachineInstructionElimImpl::isDead(const MachineInstr *MI) const { … }
bool DeadMachineInstructionElimImpl::runImpl(MachineFunction &MF) { … }
bool DeadMachineInstructionElimImpl::eliminateDeadMI(MachineFunction &MF) { … }