18#ifndef LLVM_MCA_CUSTOMBEHAVIOUR_H
19#define LLVM_MCA_CUSTOMBEHAVIOUR_H
107 virtual std::vector<std::unique_ptr<View>>
110 virtual std::vector<std::unique_ptr<View>>
114 virtual std::vector<std::unique_ptr<View>>
Legalize the Machine IR a function s Machine IR
This file contains abstract class SourceMgr and the default implementation, CircularSourceMgr.
This file defines the SmallVector class.
This file defines the main interface for Views.
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.
Interface to description of machine instruction set.
Generic base class for all target subtargets.
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.
Class which can be overriden by targets to enforce instruction dependencies and behaviours that aren'...
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.
const mca::SourceMgr & SrcMgr
const MCSubtargetInfo & STI
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.
CustomBehaviour(const MCSubtargetInfo &STI, const mca::SourceMgr &SrcMgr, const MCInstrInfo &MCII)
An InstRef contains both a SourceMgr index and Instruction pair.
Class which can be overriden by targets to modify the mca::Instruction objects before the pipeline st...
virtual void postProcessInstruction(std::unique_ptr< Instruction > &Inst, const MCInst &MCI)
This method can be overriden by targets to modify the mca::Instruction object after it has been lower...
virtual ~InstrPostProcess()=default
const MCSubtargetInfo & STI
InstrPostProcess(const MCSubtargetInfo &STI, const MCInstrInfo &MCII)
virtual void resetState()
This class allows targets to optionally customize the logic that resolves scheduling class IDs.
virtual bool supportsInstrumentType(StringRef Type) 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.
InstrumentManager(const MCSubtargetInfo &STI, const MCInstrInfo &MCII)
virtual ~InstrumentManager()=default
virtual bool shouldIgnoreInstruments() const
Returns true if llvm-mca should ignore instruments.
const MCSubtargetInfo & STI
StringRef getData() const
Instrument(StringRef Desc, StringRef Data)
virtual ~Instrument()=default
StringRef getDesc() const
std::unique_ptr< Instrument > UniqueInstrument
This is an optimization pass for GlobalISel generic memory operations.
Abstracting the input code sequence (a sequence of MCInst) and assigning unique identifiers to every ...