class GISelChangeObserver
Declaration
class 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/GISelChangeObserver.h:29
Member Variables
- private SmallPtrSet<llvm::MachineInstr*, 4> ChangingAllUsesOfReg
Method Overview
- public virtual void changedInstr(llvm::MachineInstr & MI)
- public void changingAllUsesOfReg(const llvm::MachineRegisterInfo & MRI, llvm::Register Reg)
- public virtual void changingInstr(llvm::MachineInstr & MI)
- public virtual void createdInstr(llvm::MachineInstr & MI)
- public virtual void erasingInstr(llvm::MachineInstr & MI)
- public void finishedChangingAllUsesOfReg()
- public virtual ~GISelChangeObserver()
Methods
¶virtual void changedInstr(llvm::MachineInstr& MI)
virtual void changedInstr(llvm::MachineInstr& MI)
Description
This instruction was mutated in some way.
Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelChangeObserver.h:49
Parameters
¶void changingAllUsesOfReg(
const llvm::MachineRegisterInfo& MRI,
llvm::Register Reg)
void changingAllUsesOfReg(
const llvm::MachineRegisterInfo& MRI,
llvm::Register Reg)
Description
All the instructions using the given register are being changed. For convenience, finishedChangingAllUsesOfReg() will report the completion of the changes. The use list may change between this call and finishedChangingAllUsesOfReg().
Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelChangeObserver.h:55
Parameters
- const llvm::MachineRegisterInfo& MRI
- llvm::Register Reg
¶virtual void changingInstr(llvm::MachineInstr& MI)
virtual void changingInstr(llvm::MachineInstr& MI)
Description
This instruction is about to be mutated in some way.
Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelChangeObserver.h:46
Parameters
¶virtual void createdInstr(llvm::MachineInstr& MI)
virtual 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/GISelChangeObserver.h:43
Parameters
¶virtual void erasingInstr(llvm::MachineInstr& MI)
virtual void erasingInstr(llvm::MachineInstr& MI)
Description
An instruction is about to be erased.
Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelChangeObserver.h:36
Parameters
¶void finishedChangingAllUsesOfReg()
void finishedChangingAllUsesOfReg()
Description
All instructions reported as changing by changingAllUsesOfReg() have finished being changed.
Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelChangeObserver.h:58
¶virtual ~GISelChangeObserver()
virtual ~GISelChangeObserver()
Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelChangeObserver.h:33