LLVM 20.0.0git
|
#include "llvm/CodeGen/GlobalISel/LostDebugLocObserver.h"
Public Member Functions | |
LostDebugLocObserver (StringRef DebugType) | |
unsigned | getNumLostDebugLocs () const |
void | checkpoint (bool CheckDebugLocs=true) |
Call this to indicate that it's a good point to assess whether locations have been lost. | |
void | createdInstr (MachineInstr &MI) override |
An instruction has been created and inserted into the function. | |
void | erasingInstr (MachineInstr &MI) override |
An instruction is about to be erased. | |
void | changingInstr (MachineInstr &MI) override |
This instruction is about to be mutated in some way. | |
void | changedInstr (MachineInstr &MI) override |
This instruction was mutated in some way. | |
Public Member Functions inherited from llvm::GISelChangeObserver | |
virtual | ~GISelChangeObserver ()=default |
virtual void | erasingInstr (MachineInstr &MI)=0 |
An instruction is about to be erased. | |
virtual void | createdInstr (MachineInstr &MI)=0 |
An instruction has been created and inserted into the function. | |
virtual void | changingInstr (MachineInstr &MI)=0 |
This instruction is about to be mutated in some way. | |
virtual void | changedInstr (MachineInstr &MI)=0 |
This instruction was mutated in some way. | |
void | changingAllUsesOfReg (const MachineRegisterInfo &MRI, Register Reg) |
All the instructions using the given register are being changed. | |
void | finishedChangingAllUsesOfReg () |
All instructions reported as changing by changingAllUsesOfReg() have finished being changed. | |
Definition at line 19 of file LostDebugLocObserver.h.
|
inline |
Definition at line 26 of file LostDebugLocObserver.h.
|
overridevirtual |
This instruction was mutated in some way.
Implements llvm::GISelChangeObserver.
Definition at line 111 of file LostDebugLocObserver.cpp.
References MI.
|
overridevirtual |
This instruction is about to be mutated in some way.
Implements llvm::GISelChangeObserver.
Definition at line 102 of file LostDebugLocObserver.cpp.
References irTranslatorNeverAddsLocations(), and MI.
Call this to indicate that it's a good point to assess whether locations have been lost.
Typically this will be when a logical change has been completed such as the caller has finished replacing some instructions with alternatives. When CheckDebugLocs is true, the locations will be checked to see if any have been lost since the last checkpoint. When CheckDebugLocs is false, it will just reset ready for the next checkpoint without checking anything. This can be helpful to limit the detection to easy-to-fix portions of an algorithm before allowing more difficult ones.
Definition at line 70 of file LostDebugLocObserver.cpp.
Referenced by llvm::createLibcall(), llvm::createMemLibcall(), llvm::Legalizer::legalizeMachineFunction(), and llvm::saveUsesAndErase().
|
overridevirtual |
An instruction has been created and inserted into the function.
Note that the instruction might not be a fully fledged instruction at this point and won't be if the MachineFunction::Delegate is calling it. This is because the delegate only sees the construction of the MachineInstr before operands have been added.
Implements llvm::GISelChangeObserver.
Definition at line 77 of file LostDebugLocObserver.cpp.
References MI.
|
overridevirtual |
An instruction is about to be erased.
Implements llvm::GISelChangeObserver.
Definition at line 93 of file LostDebugLocObserver.cpp.
References irTranslatorNeverAddsLocations(), and MI.
|
inline |
Definition at line 28 of file LostDebugLocObserver.h.
Referenced by llvm::Legalizer::runOnMachineFunction().