LLVM 22.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 |
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.
References llvm::mca::InstrumentManager::InstrumentManager(), llvm::mca::InstrumentManager::MCII, and llvm::mca::InstrumentManager::STI.
|
overridevirtual |
Create a Instrument for RISC-V target.
Reimplemented from llvm::mca::InstrumentManager.
Definition at line 93 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 118 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::RISCVVType::LMUL_1, llvm::RISCVVType::LMUL_2, llvm::RISCVVType::LMUL_4, llvm::RISCVVType::LMUL_8, llvm::RISCVVType::LMUL_F2, llvm::RISCVVType::LMUL_F4, llvm::RISCVVType::LMUL_F8, llvm::RISCVVType::LMUL_RESERVED, and llvm::SmallVector.
|
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 234 of file RISCVCustomBehaviour.cpp.
References llvm::dbgs(), llvm::mca::RISCVLMULInstrument::DESC_NAME, llvm::mca::RISCVSEWInstrument::DESC_NAME, llvm::mca::Instrument::getData(), llvm::mca::getEEWAndEMUL(), llvm::mca::RISCVLMULInstrument::getLMUL(), llvm::MCInst::getOpcode(), I, LLVM_DEBUG, llvm::mca::InstrumentManager::MCII, llvm::mca::opcodeHasEEWAndEMULInfo(), and llvm::RVV.
|
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 86 of file RISCVCustomBehaviour.cpp.
References llvm::mca::RISCVLMULInstrument::DESC_NAME, and llvm::mca::RISCVSEWInstrument::DESC_NAME.