LLVM 22.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 |
LLVM_ABI void | changingAllUsesOfReg (const MachineRegisterInfo &MRI, Register Reg) |
All the instructions using the given register are being changed. | |
LLVM_ABI 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, and MI.
|
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, and MI.
|
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_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_DEBUG, MI, and MII.
|
inline |
Definition at line 106 of file InstructionSelect.cpp.
References llvm::dbgs(), LLVM_DEBUG, and MI.
Referenced by llvm::InstructionSelect::selectMachineFunction().
MachineBasicBlock::reverse_iterator llvm::InstructionSelect::MIIteratorMaintainer::MII |
Definition at line 82 of file InstructionSelect.cpp.
Referenced by erasingInstr(), and llvm::InstructionSelect::selectMachineFunction().