14#ifndef LLVM_CODEGEN_GLOBALISEL_GISELCHANGEOBSERVER_H
15#define LLVM_CODEGEN_GLOBALISEL_GISELCHANGEOBSERVER_H
22class MachineRegisterInfo;
79 if (It != Observers.
end())
87 for (
auto &O : Observers)
91 for (
auto &O : Observers)
95 for (
auto &O : Observers)
99 for (
auto &O : Observers)
unsigned const MachineRegisterInfo * MRI
amdgpu aa AMDGPU Address space based Alias Analysis Wrapper
This file defines the SmallPtrSet class.
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.
virtual void changingInstr(MachineInstr &MI)=0
This instruction is about to be mutated in some way.
void finishedChangingAllUsesOfReg()
All instructions reported as changing by changingAllUsesOfReg() have finished being changed.
virtual void changedInstr(MachineInstr &MI)=0
This instruction was mutated in some way.
virtual ~GISelChangeObserver()=default
virtual void createdInstr(MachineInstr &MI)=0
An instruction has been created and inserted into the function.
virtual void erasingInstr(MachineInstr &MI)=0
An instruction is about to be erased.
void changingAllUsesOfReg(const MachineRegisterInfo &MRI, Register Reg)
All the instructions using the given register are being changed.
Simple wrapper observer that takes several observers, and calls each one for each event.
void MF_HandleInsertion(MachineInstr &MI) override
Callback after an insertion. This should not modify the MI directly.
void removeObserver(GISelChangeObserver *O)
void changedInstr(MachineInstr &MI) override
This instruction was mutated in some way.
void MF_HandleRemoval(MachineInstr &MI) override
Callback before a removal. This should not modify the MI directly.
void changingInstr(MachineInstr &MI) override
This instruction is about to be mutated in some way.
void createdInstr(MachineInstr &MI) override
An instruction has been created and inserted into the function.
GISelObserverWrapper()=default
void erasingInstr(MachineInstr &MI) override
An instruction is about to be erased.
void addObserver(GISelChangeObserver *O)
GISelObserverWrapper(ArrayRef< GISelChangeObserver * > Obs)
Representation of each machine instruction.
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
A simple RAII based Delegate installer.
Class to install both of the above.
RAIIMFObsDelInstaller(MachineFunction &MF, GISelObserverWrapper &Wrapper)
~RAIIMFObsDelInstaller()=default
A simple RAII based Observer installer.
~RAIIMFObserverInstaller()
A simple RAII based Observer installer.
~RAIITemporaryObserverInstaller()
Wrapper class representing virtual and physical registers.
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.
iterator erase(const_iterator CI)
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
This is an optimization pass for GlobalISel generic memory operations.
auto find(R &&Range, const T &Val)
Provide wrappers to std::find which take ranges instead of having to pass begin/end explicitly.