LLVM 20.0.0git
|
This class allows targets to optionally customize the logic that resolves scheduling class IDs. More...
#include "llvm/MCA/CustomBehaviour.h"
Public Member Functions | |
InstrumentManager (const MCSubtargetInfo &STI, const MCInstrInfo &MCII) | |
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. | |
Protected Attributes | |
const MCSubtargetInfo & | STI |
const MCInstrInfo & | MCII |
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 141 of file CustomBehaviour.h.
|
inline |
Definition at line 147 of file CustomBehaviour.h.
|
virtualdefault |
|
virtual |
Allocate an Instrument, and return a unique pointer to it.
This function may be useful to create instruments coming from comments in the assembly. See createInstruments to create Instruments from MCInst
Reimplemented in llvm::mca::RISCVInstrumentManager.
Definition at line 45 of file CustomBehaviour.cpp.
References llvm::Data.
|
virtual |
Return a list of unique pointers to Instruments, where each Instrument is allocated by this function.
See createInstrument to create Instrument from a description and data.
Reimplemented in llvm::mca::RISCVInstrumentManager.
Definition at line 51 of file CustomBehaviour.cpp.
|
virtual |
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 55 of file CustomBehaviour.cpp.
References llvm::MCInstrInfo::get(), llvm::MCInst::getOpcode(), llvm::MCInstrDesc::getSchedClass(), and MCII.
|
inlinevirtual |
Returns true if llvm-mca should ignore instruments.
Reimplemented in llvm::mca::RISCVInstrumentManager.
Definition at line 153 of file CustomBehaviour.h.
|
inlinevirtual |
Reimplemented in llvm::mca::RISCVInstrumentManager.
Definition at line 157 of file CustomBehaviour.h.
|
protected |
Definition at line 144 of file CustomBehaviour.h.
Referenced by getSchedClassID(), and llvm::mca::RISCVInstrumentManager::getSchedClassID().
|
protected |
Definition at line 143 of file CustomBehaviour.h.