32 #define DEBUG_TYPE "si-debugger-insert-nops" 33 #define PASS_NAME "SI Debugger Insert Nops" 60 return new SIDebuggerInsertNops();
80 for (
auto &MBB : MF) {
81 for (
auto MI = MBB.begin();
MI != MBB.end(); ++
MI) {
83 if (
MI->isDebugInstr() || !
MI->getDebugLoc())
87 auto DL =
MI->getDebugLoc();
88 if (NopInserted.
find(DL.getLine()) == NopInserted.
end()) {
89 BuildMI(MBB, *
MI, DL, TII->get(AMDGPU::S_NOP))
91 NopInserted.
insert(DL.getLine());
AMDGPU specific subclass of TargetSubtarget.
bool hasDebugInfo() const
Returns true if valid debug info is present.
This class represents lattice values for constants.
const SIInstrInfo * getInstrInfo() const override
MachineModuleInfo & getMMI() const
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
const HexagonInstrInfo * TII
bool debuggerInsertNops() const
MachineInstrBuilder BuildMI(MachineFunction &MF, const DebugLoc &DL, const MCInstrDesc &MCID)
Builder interface. Specify how to create the initial instruction itself.
FunctionPass * createSIDebuggerInsertNopsPass()
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
std::pair< iterator, bool > insert(const ValueT &V)
Represent the analysis usage information of a pass.
FunctionPass class - This class is used to implement most global optimizations.
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
void setPreservesCFG()
This function should be called by the pass, iff they do not:
Provides AMDGPU specific target descriptions.
Interface definition for SIInstrInfo.
iterator find(const_arg_type_t< ValueT > V)
StringRef - Represent a constant reference to a string, i.e.
char & SIDebuggerInsertNopsID