LLVM: llvm::mca::InstrumentManager Class Reference (original) (raw)

This class allows targets to optionally customize the logic that resolves scheduling class IDs. More...

#include "[llvm/MCA/CustomBehaviour.h](CustomBehaviour%5F8h%5Fsource.html)"

Public Member Functions
InstrumentManager (const MCSubtargetInfo &STI, const MCInstrInfo &MCII, bool EnableInstruments=true)
virtual ~InstrumentManager ()=default
virtual bool shouldIgnoreInstruments () const
Returns true if llvm-mca should ignore instruments.
virtual bool supportsInstrumentType (StringRef Type) const
virtual UniqueInstrument createInstrument (StringRef Desc, StringRef Data)
Allocate an Instrument, and return a unique pointer to it.
virtual SmallVector< UniqueInstrument > createInstruments (const MCInst &Inst)
Return a list of unique pointers to Instruments, where each Instrument is allocated by this function.
virtual unsigned getSchedClassID (const MCInstrInfo &MCII, const MCInst &MCI, const SmallVector< Instrument * > &IVec) const
Given an MCInst and a vector of Instrument, a target can return a SchedClassID.
virtual bool canCustomize (const ArrayRef< Instrument * > IVec) const
virtual void customize (const ArrayRef< Instrument * > IVec, llvm::mca::InstrDesc &Desc) const

This class allows targets to optionally customize the logic that resolves scheduling class IDs.

Targets can use information encoded in Instrument objects to make more informed scheduling decisions.

Definition at line 160 of file CustomBehaviour.h.

~InstrumentManager()

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

canCustomize()

createInstrument()

createInstruments()

customize()

getSchedClassID()

Given an MCInst and a vector of Instrument, a target can return a SchedClassID.

This can be used by a subtarget to return a PseudoInstruction SchedClassID instead of the one that belongs to the BaseInstruction This can be useful when a BaseInstruction does not convey the correct scheduling information without additional data. By default, it returns the SchedClassID that belongs to MCI.

Reimplemented in llvm::mca::RISCVInstrumentManager.

Definition at line 92 of file CustomBehaviour.cpp.

References llvm::MCInst::getOpcode(), and MCII.

shouldIgnoreInstruments()

virtual bool llvm::mca::InstrumentManager::shouldIgnoreInstruments ( ) const inlinevirtual

supportsInstrumentType()

bool llvm::mca::InstrumentManager::supportsInstrumentType ( StringRef Type) const virtual

EnableInstruments

bool llvm::mca::InstrumentManager::EnableInstruments protected

MCII

STI


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