Go to the documentation of this file.
14 #ifndef LLVM_CODEGEN_GLOBALISEL_GISELCHANGEOBSERVER_H
15 #define LLVM_CODEGEN_GLOBALISEL_GISELCHANGEOBSERVER_H
22 class MachineRegisterInfo;
73 : Observers(Obs.
begin(), Obs.
end()) {}
80 if (It != Observers.end())
85 for (
auto &
O : Observers)
89 for (
auto &
O : Observers)
93 for (
auto &
O : Observers)
97 for (
auto &
O : Observers)
virtual void erasingInstr(MachineInstr &MI)=0
An instruction is about to be erased.
This is an optimization pass for GlobalISel generic memory operations.
iterator erase(const_iterator CI)
~RAIIMFObserverInstaller()
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
amdgpu aa AMDGPU Address space based Alias Analysis Wrapper
void finishedChangingAllUsesOfReg()
All instructions reported as changing by changingAllUsesOfReg() have finished being changed.
Reg
All possible values of the reg field in the ModR/M byte.
void removeObserver(GISelChangeObserver *O)
const_iterator end(StringRef path)
Get end iterator over path.
const_iterator begin(StringRef path, Style style=Style::native)
Get begin iterator over path.
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.
A simple RAII based Observer installer.
void MF_HandleRemoval(MachineInstr &MI) override
Callback before a removal. This should not modify the MI directly.
RAIIDelegateInstaller(MachineFunction &MF, MachineFunction::Delegate *Del)
void createdInstr(MachineInstr &MI) override
An instruction has been created and inserted into the function.
A simple RAII based Delegate installer.
void changingAllUsesOfReg(const MachineRegisterInfo &MRI, Register Reg)
All the instructions using the given register are being changed.
void changingInstr(MachineInstr &MI) override
This instruction is about to be mutated in some way.
GISelObserverWrapper()=default
virtual void changingInstr(MachineInstr &MI)=0
This instruction is about to be mutated in some way.
void changedInstr(MachineInstr &MI) override
This instruction was mutated in some way.
virtual void changedInstr(MachineInstr &MI)=0
This instruction was mutated in some way.
Representation of each machine instruction.
auto find(R &&Range, const T &Val)
Provide wrappers to std::find which take ranges instead of having to pass begin/end explicitly.
~RAIIMFObsDelInstaller()=default
virtual void createdInstr(MachineInstr &MI)=0
An instruction has been created and inserted into the function.
void MF_HandleInsertion(MachineInstr &MI) override
Callback after an insertion. This should not modify the MI directly.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Abstract class that contains various methods for clients to notify about changes.
unsigned const MachineRegisterInfo * MRI
Wrapper class representing virtual and physical registers.
GISelObserverWrapper(ArrayRef< GISelChangeObserver * > Obs)
void addObserver(GISelChangeObserver *O)
RAIIMFObserverInstaller(MachineFunction &MF, GISelChangeObserver &Observer)
Simple wrapper observer that takes several observers, and calls each one for each event.
RAIIMFObsDelInstaller(MachineFunction &MF, GISelObserverWrapper &Wrapper)
void erasingInstr(MachineInstr &MI) override
An instruction is about to be erased.
virtual ~GISelChangeObserver()=default
Class to install both of the above.