LLVM 20.0.0git
|
This class observes instruction insertions/removals. More...
Public Member Functions | |
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. | |
void | reportFullyCreatedInstrs () |
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 Attributes | |
MachineBasicBlock::reverse_iterator | MII |
This class observes instruction insertions/removals.
InstructionSelect stores an iterator of the instruction prior to the one that is currently being selected to determine which instruction to select next. Previously this meant that selecting multiple instructions at once was illegal behavior due to potential invalidation of this iterator. This is a non-obvious limitation for selector implementers. Therefore, to allow deletion of arbitrary instructions, we detect this case and continue selection with the predecessor of the deleted instruction.
Definition at line 78 of file InstructionSelect.cpp.
|
inlineoverridevirtual |
Callback after an insertion. This should not modify the MI directly.
Implements llvm::MachineFunction::Delegate.
Definition at line 86 of file InstructionSelect.cpp.
References llvm::dbgs(), llvm::SetVector< T, Vector, Set, N >::insert(), LLVM_DEBUG, and MI.
|
inlineoverridevirtual |
Callback before a removal. This should not modify the MI directly.
Implements llvm::MachineFunction::Delegate.
Definition at line 90 of file InstructionSelect.cpp.
References llvm::dbgs(), llvm::MachineInstrBundleIterator< Ty, IsReverse >::getInstrIterator(), LLVM_DEBUG, MI, llvm::InstructionSelect::MIIteratorMaintainer::MII, and llvm::SetVector< T, Vector, Set, N >::remove().
|
inline |
Definition at line 101 of file InstructionSelect.cpp.
References llvm::SetVector< T, Vector, Set, N >::clear(), llvm::SetVector< T, Vector, Set, N >::empty(), and LLVM_DEBUG.
Referenced by llvm::InstructionSelect::selectMachineFunction().
MachineBasicBlock::reverse_iterator llvm::InstructionSelect::MIIteratorMaintainer::MII |
Definition at line 84 of file InstructionSelect.cpp.
Referenced by llvm::InstructionSelect::MIIteratorMaintainer::MF_HandleRemoval(), and llvm::InstructionSelect::selectMachineFunction().