LLVM 20.0.0git
|
#include "Target/RISCV/MCA/RISCVCustomBehaviour.h"
Public Member Functions | |
RISCVInstrumentManager (const MCSubtargetInfo &STI, const MCInstrInfo &MCII) | |
bool | shouldIgnoreInstruments () const override |
Returns true if llvm-mca should ignore instruments. | |
bool | supportsInstrumentType (StringRef Type) const override |
UniqueInstrument | createInstrument (StringRef Desc, StringRef Data) override |
Create a Instrument for RISC-V target. | |
SmallVector< UniqueInstrument > | createInstruments (const MCInst &Inst) override |
Return a list of unique pointers to Instruments, where each Instrument is allocated by this function. | |
unsigned | getSchedClassID (const MCInstrInfo &MCII, const MCInst &MCI, const SmallVector< Instrument * > &IVec) const override |
Using the Instrument, returns a SchedClassID to use instead of the SchedClassID that belongs to the MCI or the original SchedClassID. | |
Public Member Functions inherited from llvm::mca::InstrumentManager | |
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. | |
Additional Inherited Members | |
Protected Attributes inherited from llvm::mca::InstrumentManager | |
const MCSubtargetInfo & | STI |
const MCInstrInfo & | MCII |
Definition at line 53 of file RISCVCustomBehaviour.h.
|
inline |
Definition at line 55 of file RISCVCustomBehaviour.h.
|
overridevirtual |
Create a Instrument for RISC-V target.
Reimplemented from llvm::mca::InstrumentManager.
Definition at line 79 of file RISCVCustomBehaviour.cpp.
References llvm::Data, llvm::dbgs(), llvm::mca::RISCVLMULInstrument::DESC_NAME, llvm::mca::RISCVSEWInstrument::DESC_NAME, llvm::mca::RISCVLMULInstrument::isDataValid(), llvm::mca::RISCVSEWInstrument::isDataValid(), and LLVM_DEBUG.
Referenced by createInstruments().
|
overridevirtual |
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 from llvm::mca::InstrumentManager.
Definition at line 104 of file RISCVCustomBehaviour.cpp.
References createInstrument(), llvm::dbgs(), llvm::mca::RISCVLMULInstrument::DESC_NAME, llvm::mca::RISCVSEWInstrument::DESC_NAME, llvm::SmallVectorImpl< T >::emplace_back(), llvm::MCOperand::getImm(), llvm::MCInst::getOpcode(), llvm::MCInst::getOperand(), llvm::RISCVVType::getSEW(), llvm::RISCVVType::getVLMUL(), LLVM_DEBUG, llvm_unreachable, llvm::RISCVII::LMUL_1, llvm::RISCVII::LMUL_2, llvm::RISCVII::LMUL_4, llvm::RISCVII::LMUL_8, llvm::RISCVII::LMUL_F2, llvm::RISCVII::LMUL_F4, llvm::RISCVII::LMUL_F8, and llvm::RISCVII::LMUL_RESERVED.
|
overridevirtual |
Using the Instrument, returns a SchedClassID to use instead of the SchedClassID that belongs to the MCI or the original SchedClassID.
Reimplemented from llvm::mca::InstrumentManager.
Definition at line 220 of file RISCVCustomBehaviour.cpp.
References llvm::dbgs(), llvm::mca::RISCVLMULInstrument::DESC_NAME, llvm::mca::RISCVSEWInstrument::DESC_NAME, llvm::MCInstrInfo::get(), llvm::mca::Instrument::getData(), llvm::mca::getEEWAndEMUL(), llvm::mca::RISCVLMULInstrument::getLMUL(), llvm::MCInstrInfo::getName(), llvm::MCInst::getOpcode(), llvm::MCInstrDesc::getSchedClass(), I, LLVM_DEBUG, llvm::mca::InstrumentManager::MCII, llvm::mca::opcodeHasEEWAndEMULInfo(), and llvm::RISCVVInversePseudosTable::PseudoInfo::Pseudo.
|
inlineoverridevirtual |
Returns true if llvm-mca should ignore instruments.
Reimplemented from llvm::mca::InstrumentManager.
Definition at line 58 of file RISCVCustomBehaviour.h.
|
overridevirtual |
Reimplemented from llvm::mca::InstrumentManager.
Definition at line 72 of file RISCVCustomBehaviour.cpp.
References llvm::mca::RISCVLMULInstrument::DESC_NAME, and llvm::mca::RISCVSEWInstrument::DESC_NAME.