LLVM 20.0.0git
|
This class observes instruction insertions/removals. More...
Public Member Functions | |
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 | createdInstr (MachineInstr &MI) override |
An instruction has been created and inserted into the function. | |
void | erasingInstr (MachineInstr &MI) override |
An instruction is about to be erased. | |
void | reportFullyCreatedInstrs () |
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. | |
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 77 of file InstructionSelect.cpp.
|
inlineoverridevirtual |
This instruction was mutated in some way.
Implements llvm::GISelChangeObserver.
Definition at line 87 of file InstructionSelect.cpp.
References llvm_unreachable.
|
inlineoverridevirtual |
This instruction is about to be mutated in some way.
Implements llvm::GISelChangeObserver.
Definition at line 84 of file InstructionSelect.cpp.
References llvm_unreachable.
|
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 91 of file InstructionSelect.cpp.
References llvm::dbgs(), llvm::SetVector< T, Vector, Set, N >::insert(), LLVM_DEBUG, and MI.
|
inlineoverridevirtual |
An instruction is about to be erased.
Implements llvm::GISelChangeObserver.
Definition at line 95 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 106 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 82 of file InstructionSelect.cpp.
Referenced by llvm::InstructionSelect::MIIteratorMaintainer::erasingInstr(), and llvm::InstructionSelect::selectMachineFunction().