28std::vector<std::unique_ptr<View>>
31 return std::vector<std::unique_ptr<View>>();
34std::vector<std::unique_ptr<View>>
37 return std::vector<std::unique_ptr<View>>();
40std::vector<std::unique_ptr<View>>
43 return std::vector<std::unique_ptr<View>>();
53 for (
const auto I : IVec) {
64 for (
const auto I : IVec) {
67 if (LatInst->hasValue()) {
68 unsigned Latency = LatInst->getLatency();
70 for (
auto &W :
ID.Writes)
82 return std::make_unique<LatencyInstrument>(
Data);
84 return std::make_unique<Instrument>(
Desc,
Data);
This file defines the base class CustomBehaviour which can be inherited from by specific targets (ex.
Legalize the Machine IR a function s Machine IR
This file defines abstractions used by the Pipeline to model register reads, register writes and inst...
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
This is an instance of a target assembly language printer that converts an MCInst to valid target ass...
Instances of this class represent a single low-level machine instruction.
unsigned getOpcode() const
Interface to description of machine instruction set.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
The instances of the Type class are immutable: once they are created, they are never changed.
virtual std::vector< std::unique_ptr< View > > getEndViews(llvm::MCInstPrinter &IP, llvm::ArrayRef< llvm::MCInst > Insts)
Return a vector of Views that will be added after all other Views.
virtual unsigned checkCustomHazard(ArrayRef< InstRef > IssuedInst, const InstRef &IR)
Before the llvm-mca pipeline dispatches an instruction, it first checks for any register or resource ...
virtual ~CustomBehaviour()
virtual std::vector< std::unique_ptr< View > > getPostInstrInfoViews(llvm::MCInstPrinter &IP, llvm::ArrayRef< llvm::MCInst > Insts)
Return a vector of Views that will be added after the InstructionInfoView.
virtual std::vector< std::unique_ptr< View > > getStartViews(llvm::MCInstPrinter &IP, llvm::ArrayRef< llvm::MCInst > Insts)
Return a vector of Views that will be added before all other Views.
An InstRef contains both a SourceMgr index and Instruction pair.
virtual bool canCustomize(const ArrayRef< Instrument * > IVec) const
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 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 bool supportsInstrumentType(StringRef Type) const
virtual void customize(const ArrayRef< Instrument * > IVec, llvm::mca::InstrDesc &Desc) const
static const StringRef DESC_NAME
std::unique_ptr< Instrument > UniqueInstrument
char InstructionError< T >::ID
This is an optimization pass for GlobalISel generic memory operations.
class LLVM_GSL_OWNER SmallVector
Forward declaration of SmallVector so that calculateSmallVectorDefaultInlinedElements can reference s...
FunctionAddr VTableAddr uintptr_t uintptr_t Data
An instruction descriptor.