LLVM 20.0.0git
|
Simple wrapper observer that takes several observers, and calls each one for each event. More...
#include "llvm/CodeGen/GlobalISel/GISelChangeObserver.h"
Public Member Functions | |
GISelObserverWrapper ()=default | |
GISelObserverWrapper (ArrayRef< GISelChangeObserver * > Obs) | |
void | addObserver (GISelChangeObserver *O) |
void | removeObserver (GISelChangeObserver *O) |
void | clearObservers () |
void | erasingInstr (MachineInstr &MI) override |
An instruction is about to be erased. | |
void | createdInstr (MachineInstr &MI) override |
An instruction has been created and inserted into the function. | |
void | changingInstr (MachineInstr &MI) override |
This instruction is about to be mutated in some way. | |
void | changedInstr (MachineInstr &MI) override |
This instruction was mutated in some way. | |
void | MF_HandleInsertion (MachineInstr &MI) override |
Callback after an insertion. This should not modify the MI directly. | |
void | MF_HandleRemoval (MachineInstr &MI) override |
Callback before a removal. This should not modify the MI directly. | |
Public Member Functions inherited from llvm::MachineFunction::Delegate | |
virtual | ~Delegate ()=default |
virtual void | MF_HandleInsertion (MachineInstr &MI)=0 |
Callback after an insertion. This should not modify the MI directly. | |
virtual void | MF_HandleRemoval (MachineInstr &MI)=0 |
Callback before a removal. This should not modify the MI directly. | |
virtual void | MF_HandleChangeDesc (MachineInstr &MI, const MCInstrDesc &TID) |
Callback before changing MCInstrDesc. | |
Public Member Functions inherited from llvm::GISelChangeObserver | |
virtual | ~GISelChangeObserver ()=default |
virtual void | erasingInstr (MachineInstr &MI)=0 |
An instruction is about to be erased. | |
virtual void | createdInstr (MachineInstr &MI)=0 |
An instruction has been created and inserted into the function. | |
virtual void | changingInstr (MachineInstr &MI)=0 |
This instruction is about to be mutated in some way. | |
virtual void | changedInstr (MachineInstr &MI)=0 |
This instruction was mutated in some way. | |
void | changingAllUsesOfReg (const MachineRegisterInfo &MRI, Register Reg) |
All the instructions using the given register are being changed. | |
void | finishedChangingAllUsesOfReg () |
All instructions reported as changing by changingAllUsesOfReg() have finished being changed. | |
Simple wrapper observer that takes several observers, and calls each one for each event.
If there are multiple observers (say CSE, Legalizer, Combiner), it's sufficient to register this to the machine function as the delegate.
Definition at line 66 of file GISelChangeObserver.h.
|
default |
|
inline |
Definition at line 72 of file GISelChangeObserver.h.
|
inline |
Definition at line 74 of file GISelChangeObserver.h.
References llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by llvm::Legalizer::legalizeMachineFunction(), llvm::RAIITemporaryObserverInstaller::RAIITemporaryObserverInstaller(), llvm::IRTranslator::runOnMachineFunction(), and llvm::InstructionSelect::selectMachineFunction().
|
inlineoverridevirtual |
This instruction was mutated in some way.
Implements llvm::GISelChangeObserver.
Definition at line 98 of file GISelChangeObserver.h.
References MI.
Referenced by llvm::LegalizationArtifactCombiner::tryCombineInstruction(), and llvm::LegalizationArtifactCombiner::tryCombineZExt().
|
inlineoverridevirtual |
This instruction is about to be mutated in some way.
Implements llvm::GISelChangeObserver.
Definition at line 94 of file GISelChangeObserver.h.
References MI.
Referenced by llvm::LegalizationArtifactCombiner::tryCombineZExt().
|
inline |
Definition at line 83 of file GISelChangeObserver.h.
References llvm::SmallVectorImpl< T >::clear().
|
inlineoverridevirtual |
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.
Implements llvm::GISelChangeObserver.
Definition at line 90 of file GISelChangeObserver.h.
References MI.
Referenced by MF_HandleInsertion().
|
inlineoverridevirtual |
An instruction is about to be erased.
Implements llvm::GISelChangeObserver.
Definition at line 86 of file GISelChangeObserver.h.
References MI.
Referenced by MF_HandleRemoval().
|
inlineoverridevirtual |
Callback after an insertion. This should not modify the MI directly.
Implements llvm::MachineFunction::Delegate.
Definition at line 103 of file GISelChangeObserver.h.
References createdInstr(), and MI.
|
inlineoverridevirtual |
Callback before a removal. This should not modify the MI directly.
Implements llvm::MachineFunction::Delegate.
Definition at line 104 of file GISelChangeObserver.h.
References erasingInstr(), and MI.
|
inline |
Definition at line 77 of file GISelChangeObserver.h.
References llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::SmallVectorImpl< T >::erase(), and llvm::find().
Referenced by llvm::IRTranslator::runOnMachineFunction(), and llvm::RAIITemporaryObserverInstaller::~RAIITemporaryObserverInstaller().