LLVM: llvm::GISelCSEInfo Class Reference (original) (raw)

The CSE Analysis object. More...

#include "[llvm/CodeGen/GlobalISel/CSEInfo.h](CSEInfo%5F8h%5Fsource.html)"

Public Member Functions
GISelCSEInfo ()=default
~GISelCSEInfo () override
void setMF (MachineFunction &MF)
-----— GISelCSEInfo ----------—//
Error verify ()
void recordNewInstruction (MachineInstr *MI)
Records a newly created inst in a list and lazily insert it to the CSEMap.
void handleRecordedInst (MachineInstr *MI)
Use this callback to inform CSE about a newly fully created instruction.
void handleRecordedInsts ()
Use this callback to insert all the recorded instructions.
void handleRemoveInst (MachineInstr *MI)
Remove this inst from the CSE map.
void releaseMemory ()
void setCSEConfig (std::unique_ptr< CSEConfigBase > Opt)
bool shouldCSE (unsigned Opc) const
void analyze (MachineFunction &MF)
void countOpcodeHit (unsigned Opc)
void print ()
void erasingInstr (MachineInstr &MI) override
An instruction is about to be erased.
void createdInstr (MachineInstr &MI) override
An instruction has been created and inserted into the function.
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.
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.
Friends
class CSEMIRBuilder

The CSE Analysis object.

This installs itself as a delegate to the MachineFunction to track new instructions as well as deletions. It however will not be able to track instruction mutations. In such cases, recordNewInstruction should be called (for eg inside MachineIRBuilder::recordInsertion). Also because of how just the instruction can be inserted without adding any operands to the instruction, instructions are uniqued and inserted lazily. CSEInfo should assert when trying to enter an incomplete instruction into the CSEMap. There is Opcode level granularity on which instructions can be CSE'd and for now, only Generic instructions are CSEable.

Definition at line 71 of file CSEInfo.h.

llvm::GISelCSEInfo::GISelCSEInfo ( ) default

~GISelCSEInfo()

GISelCSEInfo::~GISelCSEInfo ( ) overridedefault

analyze()

changedInstr()

void GISelCSEInfo::changedInstr ( MachineInstr & MI) overridevirtual

changingInstr()

void GISelCSEInfo::changingInstr ( MachineInstr & MI) overridevirtual

countOpcodeHit()

void GISelCSEInfo::countOpcodeHit ( unsigned Opc )

createdInstr()

void GISelCSEInfo::createdInstr ( MachineInstr & MI) overridevirtual

erasingInstr()

void GISelCSEInfo::erasingInstr ( MachineInstr & MI) overridevirtual

handleRecordedInst()

handleRecordedInsts()

void GISelCSEInfo::handleRecordedInsts ( )

Use this callback to insert all the recorded instructions.

At this point, all of these insts need to be fully constructed and should not be missing any operands.

Definition at line 226 of file CSEInfo.cpp.

References handleRecordedInst(), and MI.

Referenced by verify(), and ~GISelCSEInfo().

handleRemoveInst()

print()

void GISelCSEInfo::print ( )

recordNewInstruction()

void GISelCSEInfo::recordNewInstruction ( MachineInstr * MI )

releaseMemory()

void GISelCSEInfo::releaseMemory ( )

setCSEConfig()

void llvm::GISelCSEInfo::setCSEConfig ( std::unique_ptr< CSEConfigBase > Opt) inline

setMF()

shouldCSE()

verify()

Error GISelCSEInfo::verify ( )

CSEMIRBuilder


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