15 #ifndef LLVM_MC_MCSCHEDULE_H 16 #define LLVM_MC_MCSCHEDULE_H 19 #include "llvm/Config/llvm-config.h" 25 struct InstrItinerary;
26 class MCSubtargetInfo;
29 class InstrItineraryData;
102 && Cycles == Other.
Cycles;
111 static const unsigned short InvalidNumMicroOps = (1U << 14) - 1;
112 static const unsigned short VariantNumMicroOps = InvalidNumMicroOps - 1;
114 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) 128 return NumMicroOps != InvalidNumMicroOps;
131 return NumMicroOps == VariantNumMicroOps;
257 static const unsigned DefaultIssueWidth = 1;
274 static const unsigned DefaultMicroOpBufferSize = 0;
282 static const unsigned DefaultLoopMicroOpBufferSize = 0;
286 static const unsigned DefaultLoadLatency = 4;
293 static const unsigned DefaultHighLatency = 10;
298 static const unsigned DefaultMispredictPenalty = 10;
323 assert(hasExtraProcessorInfo() &&
324 "No extra information available for this model");
325 return *ExtraProcessorInfo;
336 return NumProcResourceKinds;
340 assert(hasInstrSchedModel() &&
"No scheduling machine model");
342 assert(ProcResourceIdx < NumProcResourceKinds &&
"bad proc resource idx");
343 return &ProcResourceTable[ProcResourceIdx];
347 assert(hasInstrSchedModel() &&
"No scheduling machine model");
349 assert(SchedClassIdx < NumSchedClasses &&
"bad scheduling class idx");
350 return &SchedClassTable[SchedClassIdx];
357 int computeInstrLatency(
const MCSubtargetInfo &STI,
unsigned SClass)
const;
359 const MCInst &Inst)
const;
371 const MCInst &Inst)
const;
unsigned MispredictPenalty
unsigned MicroOpBufferSize
This class represents lattice values for constants.
uint16_t NumReadAdvanceEntries
const MCProcResourceDesc * getProcResource(unsigned ProcResourceIdx) const
bool AllowZeroMoveEliminationOnly
unsigned getProcessorID() const
const MCSchedClassDesc * getSchedClassDesc(unsigned SchedClassIdx) const
bool isComplete() const
Return true if this machine model data for all instructions with a scheduling class (itinerary class ...
A register file descriptor.
unsigned NumProcResourceKinds
Specify the cost of a register definition in terms of number of physical register allocated at regist...
bool AllowMoveElimination
uint16_t NumWriteProcResEntries
uint16_t MaxMovesEliminatedPerCycle
Itinerary data supplied by a subtarget to be used by a target.
const InstrItinerary * InstrItineraries
Instances of this class represent a single low-level machine instruction.
static const MCSchedModel & GetDefaultSchedModel()
Returns the default initialized model.
bool operator==(const MCReadAdvanceEntry &Other) const
bool operator==(const MCProcResourceDesc &Other) const
bool hasExtraProcessorInfo() const
const unsigned * SubUnitsIdxBegin
Identify one of the processor resource kinds consumed by a particular scheduling class for the specif...
Summarize the scheduling resources required for an instruction of a particular scheduling class...
Interface to description of machine instruction set.
bool operator==(const MCWriteProcResEntry &Other) const
bool operator==(const MCWriteLatencyEntry &Other) const
bool hasInstrSchedModel() const
Does this machine model include instruction-level scheduling.
Specify the latency in cpu cycles for a particular scheduling class and def index.
Define a kind of processor resource that will be modeled by the scheduler.
static const MCSchedModel Default
bool isOutOfOrder() const
Return true if machine supports out of order execution.
const MCSchedClassDesc * SchedClassTable
unsigned LoopMicroOpBufferSize
Specify the number of cycles allowed after instruction issue before a particular use operand reads it...
Generic base class for all target subtargets.
const MCExtraProcessorInfo & getExtraProcessorInfo() const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
An itinerary represents the scheduling information for an instruction.
uint16_t NumRegisterCostEntries
uint16_t NumWriteLatencyEntries
const MCProcResourceDesc * ProcResourceTable
Machine model for scheduling, bundling, and heuristics.
const MCExtraProcessorInfo * ExtraProcessorInfo
unsigned getNumProcResourceKinds() const
uint16_t RegisterCostEntryIdx