class GISelObserverWrapper

Declaration

class GISelObserverWrapper : public Delegate,
                             public GISelChangeObserver { /* full declaration omitted */ };

Description

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.

Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelChangeObserver.h:66

Inherits from: MachineFunction::Delegate, GISelChangeObserver

Member Variables

private SmallVector<llvm::GISelChangeObserver*, 4> Observers

Method Overview

Inherited from GISelChangeObserver:

Inherited from MachineFunction::Delegate:

Methods

GISelObserverWrapper()

Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelChangeObserver.h:71

GISelObserverWrapper(
    ArrayRef<llvm::GISelChangeObserver*> Obs)

Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelChangeObserver.h:72

Parameters

ArrayRef<llvm::GISelChangeObserver*> Obs

void MF_HandleInsertion(llvm::MachineInstr& MI)

Description

Callback after an insertion. This should not modify the MI directly.

Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelChangeObserver.h:101

Parameters

llvm::MachineInstr& MI

void MF_HandleRemoval(llvm::MachineInstr& MI)

Description

Callback before a removal. This should not modify the MI directly.

Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelChangeObserver.h:102

Parameters

llvm::MachineInstr& MI

void addObserver(llvm::GISelChangeObserver* O)

Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelChangeObserver.h:75

Parameters

llvm::GISelChangeObserver* O

void changedInstr(llvm::MachineInstr& MI)

Description

This instruction was mutated in some way.

Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelChangeObserver.h:96

Parameters

llvm::MachineInstr& MI

void changingInstr(llvm::MachineInstr& MI)

Description

This instruction is about to be mutated in some way.

Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelChangeObserver.h:92

Parameters

llvm::MachineInstr& MI

void createdInstr(llvm::MachineInstr& MI)

Description

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.

Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelChangeObserver.h:88

Parameters

llvm::MachineInstr& MI

void erasingInstr(llvm::MachineInstr& MI)

Description

An instruction is about to be erased.

Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelChangeObserver.h:84

Parameters

llvm::MachineInstr& MI

void removeObserver(llvm::GISelChangeObserver* O)

Declared at: llvm/include/llvm/CodeGen/GlobalISel/GISelChangeObserver.h:78

Parameters

llvm::GISelChangeObserver* O