23static_assert(std::is_trivial_v<MCSchedModel>,
24 "MCSchedModel is required to be a trivial type");
26 DefaultMicroOpBufferSize,
27 DefaultLoopMicroOpBufferSize,
30 DefaultMispredictPenalty,
46 DefIdx != DefEnd; ++DefIdx) {
59 unsigned SchedClass)
const {
71 const MCInst &Inst)
const {
92 std::optional<double> Throughput;
97 if (!
I->ReleaseAtCycle)
100 double Temp = NumUnits * 1.0 /
I->ReleaseAtCycle;
101 Throughput = Throughput ? std::min(*Throughput, Temp) : Temp;
104 return 1.0 / *Throughput;
114 const MCInst &Inst)
const {
138 std::optional<double> Throughput;
141 for (;
I != E; ++
I) {
145 Throughput = Throughput ? std::min(*Throughput, Temp) : Temp;
148 return 1.0 / *Throughput;
157 unsigned WriteResourceID) {
163 if (E.WriteResourceID != WriteResourceID)
165 DelayCycles = std::min(DelayCycles, E.Cycles);
168 return std::abs(DelayCycles);
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Itinerary data supplied by a subtarget to be used by a target.
const InstrStage * beginStage(unsigned ItinClassIndx) const
Return the first stage of the itinerary.
const InstrStage * endStage(unsigned ItinClassIndx) const
Return the last+1 stage of the itinerary.
Instances of this class represent a single low-level machine instruction.
unsigned getOpcode() const
unsigned getSchedClass() const
Return the scheduling class for this instruction.
Interface to description of machine instruction set.
const MCInstrDesc & get(unsigned Opcode) const
Return the machine instruction descriptor that corresponds to the specified instruction opcode.
Generic base class for all target subtargets.
const MCWriteProcResEntry * getWriteProcResEnd(const MCSchedClassDesc *SC) const
virtual unsigned resolveVariantSchedClass(unsigned SchedClass, const MCInst *MI, const MCInstrInfo *MCII, unsigned CPUID) const
Resolve a variant scheduling class for the given MCInst and CPU.
const MCWriteLatencyEntry * getWriteLatencyEntry(const MCSchedClassDesc *SC, unsigned DefIdx) const
const MCWriteProcResEntry * getWriteProcResBegin(const MCSchedClassDesc *SC) const
Return an iterator at the first process resource consumed by the given scheduling class.
const MCSchedModel & getSchedModel() const
Get the machine model for this subtarget's CPU.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
This is an optimization pass for GlobalISel generic memory operations.
int popcount(T Value) noexcept
Count the number of set bits in a value.
These values represent a non-pipelined step in the execution of an instruction.
Specify the number of cycles allowed after instruction issue before a particular use operand reads it...
Summarize the scheduling resources required for an instruction of a particular scheduling class.
uint16_t NumWriteLatencyEntries
Machine model for scheduling, bundling, and heuristics.
static const MCSchedModel Default
Returns the default initialized model.
static unsigned getForwardingDelayCycles(ArrayRef< MCReadAdvanceEntry > Entries, unsigned WriteResourceIdx=0)
Returns the maximum forwarding delay for register reads dependent on writes of scheduling class Write...
const MCSchedClassDesc * getSchedClassDesc(unsigned SchedClassIdx) const
unsigned getProcessorID() const
static int computeInstrLatency(const MCSubtargetInfo &STI, const MCSchedClassDesc &SCDesc)
Returns the latency value for the scheduling class.
const MCProcResourceDesc * getProcResource(unsigned ProcResourceIdx) const
static double getReciprocalThroughput(const MCSubtargetInfo &STI, const MCSchedClassDesc &SCDesc)
static const unsigned DefaultIssueWidth
Specify the latency in cpu cycles for a particular scheduling class and def index.
Identify one of the processor resource kinds consumed by a particular scheduling class for the specif...