14 #ifndef LLVM_CODEGEN_GLOBALISEL_GISELCHANGEOBSERVER_H 15 #define LLVM_CODEGEN_GLOBALISEL_GISELCHANGEOBSERVER_H 22 class MachineRegisterInfo;
66 : Observers(Obs.
begin(), Obs.
end()) {}
73 if (It != Observers.
end())
78 for (
auto &
O : Observers)
82 for (
auto &
O : Observers)
86 for (
auto &
O : Observers)
90 for (
auto &
O : Observers)
A simple RAII based CSEInfo installer.
const_iterator end(StringRef path)
Get end iterator over path.
void MF_HandleRemoval(MachineInstr &MI) override
Callback before a removal. This should not modify the MI directly.
const_iterator begin(StringRef path, Style style=Style::native)
Get begin iterator over path.
This class represents lattice values for constants.
void push_back(const T &Elt)
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.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
virtual ~GISelChangeObserver()
void MF_HandleInsertion(MachineInstr &MI) override
Callback after an insertion. This should not modify the MI directly.
void finishedChangingAllUsesOfReg()
All instructions reported as changing by changingAllUsesOfReg() have finished being changed...
Abstract class that contains various methods for clients to notify about changes. ...
unsigned const MachineRegisterInfo * MRI
LLVM_ATTRIBUTE_ALWAYS_INLINE iterator begin()
virtual void createdInstr(MachineInstr &MI)=0
An instruction was created and inserted into the function.
void createdInstr(MachineInstr &MI) override
An instruction was created and inserted into the function.
GISelObserverWrapper(ArrayRef< GISelChangeObserver *> Obs)
void changedInstr(MachineInstr &MI) override
This instruction was mutated in some way.
virtual void erasingInstr(MachineInstr &MI)=0
An instruction is about to be erased.
iterator erase(const_iterator CI)
auto find(R &&Range, const T &Val) -> decltype(adl_begin(Range))
Provide wrappers to std::find which take ranges instead of having to pass begin/end explicitly...
void changingAllUsesOfReg(const MachineRegisterInfo &MRI, unsigned Reg)
All the instructions using the given register are being changed.
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
virtual void changingInstr(MachineInstr &MI)=0
This instruction is about to be mutated in some way.
MachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
Representation of each machine instruction.
void addObserver(GISelChangeObserver *O)
LLVM_ATTRIBUTE_ALWAYS_INLINE iterator end()
void removeObserver(GISelChangeObserver *O)
Simple wrapper observer that takes several observers, and calls each one for each event...
virtual void changedInstr(MachineInstr &MI)=0
This instruction was mutated in some way.