LLVM 22.0.0git
llvm::mca::InstrBuilder Class Reference

A builder class that knows how to construct Instruction objects. More...

#include "llvm/MCA/InstrBuilder.h"

Public Member Functions

LLVM_ABI InstrBuilder (const MCSubtargetInfo &STI, const MCInstrInfo &MCII, const MCRegisterInfo &RI, const MCInstrAnalysis *IA, const InstrumentManager &IM, unsigned CallLatency)
void clear ()
void setInstRecycleCallback (InstRecycleCallback CB)
 Set a callback which is invoked to retrieve a recycled mca::Instruction or null if there isn't any.
LLVM_ABI Expected< std::unique_ptr< Instruction > > createInstruction (const MCInst &MCI, const SmallVector< Instrument * > &IVec)

Detailed Description

A builder class that knows how to construct Instruction objects.

Every llvm-mca Instruction is described by an object of class InstrDesc. An InstrDesc describes which registers are read/written by the instruction, as well as the instruction latency and hardware resources consumed.

This class is used by the tool to construct Instructions and instruction descriptors (i.e. InstrDesc objects). Information from the machine scheduling model is used to identify processor resources that are consumed by an instruction.

Definition at line 63 of file InstrBuilder.h.

Constructor & Destructor Documentation

◆ InstrBuilder()

llvm::mca::InstrBuilder::InstrBuilder ( const MCSubtargetInfo & STI,
const MCInstrInfo & MCII,
const MCRegisterInfo & RI,
const MCInstrAnalysis * IA,
const InstrumentManager & IM,
unsigned CallLatency )

Member Function Documentation

◆ clear()

void llvm::mca::InstrBuilder::clear ( )
inline

Definition at line 111 of file InstrBuilder.h.

◆ createInstruction()

◆ setInstRecycleCallback()

void llvm::mca::InstrBuilder::setInstRecycleCallback ( InstRecycleCallback CB)
inline

Set a callback which is invoked to retrieve a recycled mca::Instruction or null if there isn't any.

Definition at line 120 of file InstrBuilder.h.


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