LLVM 22.0.0git
|
This class allows targets to optionally customize the logic that resolves scheduling class IDs. More...
#include "llvm/MCA/CustomBehaviour.h"
Protected Attributes | |
const MCSubtargetInfo & | STI |
const MCInstrInfo & | MCII |
bool | EnableInstruments |
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 161 of file CustomBehaviour.h.
|
inline |
Definition at line 168 of file CustomBehaviour.h.
References EnableInstruments, MCII, and STI.
Referenced by llvm::mca::RISCVInstrumentManager::RISCVInstrumentManager().
|
virtualdefault |
|
virtual |
Definition at line 52 of file CustomBehaviour.cpp.
References llvm::mca::LatencyInstrument::DESC_NAME, llvm::mca::LatencyInstrument::hasValue(), and I.
|
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 78 of file CustomBehaviour.cpp.
References llvm::Data, llvm::mca::LatencyInstrument::DESC_NAME, and EnableInstruments.
|
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 88 of file CustomBehaviour.cpp.
References llvm::SmallVector.
|
virtual |
Definition at line 62 of file CustomBehaviour.cpp.
References llvm::mca::LatencyInstrument::DESC_NAME, I, llvm::mca::InstructionError< T >::ID, and llvm::Latency.
|
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 92 of file CustomBehaviour.cpp.
References llvm::MCInst::getOpcode(), and MCII.
|
inlinevirtual |
Returns true if llvm-mca should ignore instruments.
Reimplemented in llvm::mca::RISCVInstrumentManager.
Definition at line 175 of file CustomBehaviour.h.
References EnableInstruments.
Reimplemented in llvm::mca::RISCVInstrumentManager.
Definition at line 48 of file CustomBehaviour.cpp.
References llvm::mca::LatencyInstrument::DESC_NAME, and EnableInstruments.
|
protected |
Definition at line 165 of file CustomBehaviour.h.
Referenced by createInstrument(), InstrumentManager(), shouldIgnoreInstruments(), and supportsInstrumentType().
|
protected |
Definition at line 164 of file CustomBehaviour.h.
Referenced by getSchedClassID(), llvm::mca::RISCVInstrumentManager::getSchedClassID(), InstrumentManager(), and llvm::mca::RISCVInstrumentManager::RISCVInstrumentManager().
|
protected |
Definition at line 163 of file CustomBehaviour.h.
Referenced by InstrumentManager(), and llvm::mca::RISCVInstrumentManager::RISCVInstrumentManager().