LLVM 22.0.0git
llvm::Combiner::WorkListMaintainer Class Referenceabstract

This class acts as the glue that joins the CombinerHelper to the overall Combine algorithm. More...

Inheritance diagram for llvm::Combiner::WorkListMaintainer:
[legend]

Public Member Functions

virtual ~WorkListMaintainer ()=default
void reportFullyCreatedInstrs ()
virtual void reset ()=0
virtual void appliedCombine ()=0
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.
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.

Static Public Member Functions

static std::unique_ptr< WorkListMaintainercreate (Level Lvl, WorkListTy &WorkList, MachineRegisterInfo &MRI)

Protected Types

using Level = CombinerInfo::ObserverLevel

Protected Attributes

SmallSetVector< const MachineInstr *, 32 > CreatedInstrs
 The instructions that have been created but we want to report once they have their operands.

Detailed Description

This class acts as the glue that joins the CombinerHelper to the overall Combine algorithm.

The CombinerHelper is intended to report the modifications it makes to the MIR to the GISelChangeObserver and the observer subclass will act on these events.

Definition at line 52 of file Combiner.cpp.

Member Typedef Documentation

◆ Level

Constructor & Destructor Documentation

◆ ~WorkListMaintainer()

virtual llvm::Combiner::WorkListMaintainer::~WorkListMaintainer ( )
virtualdefault

Member Function Documentation

◆ appliedCombine()

virtual void llvm::Combiner::WorkListMaintainer::appliedCombine ( )
pure virtual

◆ create()

std::unique_ptr< Combiner::WorkListMaintainer > llvm::Combiner::WorkListMaintainer::create ( Level Lvl,
WorkListTy & WorkList,
MachineRegisterInfo & MRI )
static

Definition at line 209 of file Combiner.cpp.

References llvm_unreachable, and llvm::Combiner::MRI.

◆ reportFullyCreatedInstrs()

void llvm::Combiner::WorkListMaintainer::reportFullyCreatedInstrs ( )
inline

Definition at line 67 of file Combiner.cpp.

References CreatedInstrs, llvm::dbgs(), LLVM_DEBUG, and MI.

◆ reset()

virtual void llvm::Combiner::WorkListMaintainer::reset ( )
pure virtual

Member Data Documentation

◆ CreatedInstrs

SmallSetVector<const MachineInstr *, 32> llvm::Combiner::WorkListMaintainer::CreatedInstrs
protected

The instructions that have been created but we want to report once they have their operands.

This is only maintained if debug output is requested.

Definition at line 57 of file Combiner.cpp.

Referenced by llvm::Combiner::WorkListMaintainerImpl< Lvl >::createdInstr(), llvm::Combiner::WorkListMaintainerImpl< Lvl >::erasingInstr(), and reportFullyCreatedInstrs().


The documentation for this class was generated from the following file: