class LostDebugLocObserver
Declaration
class LostDebugLocObserver : public GISelChangeObserver { /* full declaration omitted */ };
Description
Abstract class that contains various methods for clients to notify about changes. This should be the preferred way for APIs to notify changes. Typically calling erasingInstr/createdInstr multiple times should not affect the result. The observer would likely need to check if it was already notified earlier (consider using GISelWorkList).
Declared at: llvm/include/llvm/CodeGen/GlobalISel/LostDebugLocObserver.h:19
Inherits from: GISelChangeObserver
Member Variables
- private llvm::StringRef DebugType
- private SmallSet<llvm::DebugLoc, 4> LostDebugLocs
- private SmallPtrSet<llvm::MachineInstr*, 4> PotentialMIsForDebugLocs
- private unsigned int NumLostDebugLocs = 0
Method Overview
- public LostDebugLocObserver(llvm::StringRef DebugType)
- private void analyzeDebugLocations()
- public void changedInstr(llvm::MachineInstr & MI)
- public void changingInstr(llvm::MachineInstr & MI)
- public void checkpoint(bool CheckDebugLocs = true)
- public void createdInstr(llvm::MachineInstr & MI)
- public void erasingInstr(llvm::MachineInstr & MI)
- public unsigned int getNumLostDebugLocs() const
Inherited from GISelChangeObserver:
- public changedInstr
- public changingAllUsesOfReg
- public changingInstr
- public createdInstr
- public erasingInstr
- public finishedChangingAllUsesOfReg
Methods
¶LostDebugLocObserver(llvm::StringRef DebugType)
LostDebugLocObserver(llvm::StringRef DebugType)
Declared at: llvm/include/llvm/CodeGen/GlobalISel/LostDebugLocObserver.h:26
Parameters
- llvm::StringRef DebugType
¶void analyzeDebugLocations()
void analyzeDebugLocations()
Declared at: llvm/include/llvm/CodeGen/GlobalISel/LostDebugLocObserver.h:46
¶void changedInstr(llvm::MachineInstr& MI)
void changedInstr(llvm::MachineInstr& MI)
Description
This instruction was mutated in some way.
Declared at: llvm/include/llvm/CodeGen/GlobalISel/LostDebugLocObserver.h:43
Parameters
¶void changingInstr(llvm::MachineInstr& MI)
void changingInstr(llvm::MachineInstr& MI)
Description
This instruction is about to be mutated in some way.
Declared at: llvm/include/llvm/CodeGen/GlobalISel/LostDebugLocObserver.h:42
Parameters
¶void checkpoint(bool CheckDebugLocs = true)
void checkpoint(bool CheckDebugLocs = true)
Description
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.
Declared at: llvm/include/llvm/CodeGen/GlobalISel/LostDebugLocObserver.h:38
Parameters
- bool CheckDebugLocs = true
¶void createdInstr(llvm::MachineInstr& MI)
void createdInstr(llvm::MachineInstr& MI)
Description
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.
Declared at: llvm/include/llvm/CodeGen/GlobalISel/LostDebugLocObserver.h:40
Parameters
¶void erasingInstr(llvm::MachineInstr& MI)
void erasingInstr(llvm::MachineInstr& MI)
Description
An instruction is about to be erased.
Declared at: llvm/include/llvm/CodeGen/GlobalISel/LostDebugLocObserver.h:41
Parameters
¶unsigned int getNumLostDebugLocs() const
unsigned int getNumLostDebugLocs() const
Declared at: llvm/include/llvm/CodeGen/GlobalISel/LostDebugLocObserver.h:28