Wrapper that forwards each change event to a list of observers.

Synopsis

Declared in <llvm/CodeGen/GlobalISel/GISelChangeObserver.h>

class GISelObserverWrapper
    : public MachineFunction::Delegate
    , public GISelChangeObserver

Description

If there are multiple observers (say CSE, Legalizer, Combiner), it's sufficient to register this to the machine function as the delegate.

Base Classes

Name

Description

MachineFunction::Delegate

Callback interface notified when instructions are inserted or removed.

GISelChangeObserver

Abstract base for clients that observe GlobalISel instruction changes.

Member Functions

Name

Description

GISelObserverWrapper [constructor]

Constructors

MF_HandleChangeDesc [virtual]

Callback before changing MCInstrDesc. This should not modify the MI directly.

MF_HandleInsertion [virtual]

MachineFunction::Delegate hook that treats insertion as createdInstr.

MF_HandleRemoval [virtual]

MachineFunction::Delegate hook that treats removal as erasingInstr.

addObserver

Add an observer to the list.

changedInstr [virtual]

Forward a changed notification to every registered observer.

changingAllUsesOfReg

Notify that all instructions using Reg are being changed.

changingInstr [virtual]

Forward a changing notification to every registered observer.

clearObservers

Remove all observers from the list.

createdInstr [virtual]

Forward a create notification to every registered observer.

erasingInstr [virtual]

Forward an erase notification to every registered observer.

finishedChangingAllUsesOfReg

All instructions reported as changing by changingAllUsesOfReg() have finished being changed.

removeObserver

Remove an observer from the list if present.

Created with MrDocs