LLVM 20.0.0git
Public Member Functions | Protected Attributes | List of all members
llvm::mca::InstrPostProcess Class Reference

Class which can be overriden by targets to modify the mca::Instruction objects before the pipeline starts. More...

#include "llvm/MCA/CustomBehaviour.h"

Inheritance diagram for llvm::mca::InstrPostProcess:
Inheritance graph
[legend]

Public Member Functions

 InstrPostProcess (const MCSubtargetInfo &STI, const MCInstrInfo &MCII)
 
virtual ~InstrPostProcess ()=default
 
virtual void postProcessInstruction (std::unique_ptr< Instruction > &Inst, const MCInst &MCI)
 This method can be overriden by targets to modify the mca::Instruction object after it has been lowered from the MCInst.
 
virtual void resetState ()
 

Protected Attributes

const MCSubtargetInfoSTI
 
const MCInstrInfoMCII
 

Detailed Description

Class which can be overriden by targets to modify the mca::Instruction objects before the pipeline starts.

A common usage of this class is to add immediate operands to certain instructions or to remove Defs/Uses from an instruction where the schedulinng model is incorrect.

Definition at line 36 of file CustomBehaviour.h.

Constructor & Destructor Documentation

◆ InstrPostProcess()

llvm::mca::InstrPostProcess::InstrPostProcess ( const MCSubtargetInfo STI,
const MCInstrInfo MCII 
)
inline

Definition at line 42 of file CustomBehaviour.h.

◆ ~InstrPostProcess()

virtual llvm::mca::InstrPostProcess::~InstrPostProcess ( )
virtualdefault

Member Function Documentation

◆ postProcessInstruction()

virtual void llvm::mca::InstrPostProcess::postProcessInstruction ( std::unique_ptr< Instruction > &  Inst,
const MCInst MCI 
)
inlinevirtual

This method can be overriden by targets to modify the mca::Instruction object after it has been lowered from the MCInst.

This is generally a less disruptive alternative to modifying the scheduling model.

Reimplemented in llvm::mca::AMDGPUInstrPostProcess, and llvm::mca::X86InstrPostProcess.

Definition at line 51 of file CustomBehaviour.h.

◆ resetState()

virtual void llvm::mca::InstrPostProcess::resetState ( )
inlinevirtual

Definition at line 57 of file CustomBehaviour.h.

Member Data Documentation

◆ MCII

const MCInstrInfo& llvm::mca::InstrPostProcess::MCII
protected

Definition at line 39 of file CustomBehaviour.h.

◆ STI

const MCSubtargetInfo& llvm::mca::InstrPostProcess::STI
protected

Definition at line 38 of file CustomBehaviour.h.


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