16 #ifndef LLVM_CODEGEN_TARGETSCHEDULE_H
17 #define LLVM_CODEGEN_TARGETSCHEDULE_H
26 class TargetRegisterInfo;
27 class TargetSubtargetInfo;
28 class TargetInstrInfo;
41 unsigned MicroOpFactor;
116 return ResourceFactors[ResIdx];
122 return MicroOpFactor;
161 bool UseDefaultDefLatency =
true)
const;
const MCSchedClassDesc * resolveSchedClass(const MachineInstr *MI) const
Return the MCSchedClassDesc for this instruction.
bool hasInstrItineraries() const
Return true if this machine model includes cycle-to-cycle itinerary data.
const MCWriteProcResEntry * getWriteProcResBegin(const MCSchedClassDesc *SC) const
unsigned computeOutputLatency(const MachineInstr *DefMI, unsigned DefIdx, const MachineInstr *DepMI) const
Output dependency latency of a pair of defs of the same register.
unsigned getNumMicroOps(const MachineInstr *MI, const MCSchedClassDesc *SC=0) const
Return the number of issue slots required for this MI.
void init(const MCSchedModel &sm, const TargetSubtargetInfo *sti, const TargetInstrInfo *tii)
Initialize the machine model for instruction scheduling.
unsigned getMicroOpBufferSize() const
Number of micro-ops that may be buffered for OOO execution.
const TargetInstrInfo * getInstrInfo() const
TargetInstrInfo getter.
unsigned getResourceFactor(unsigned ResIdx) const
Multiply the number of units consumed for a resource by this factor to normalize it relative to other...
const MCWriteProcResEntry * getWriteProcResEnd(const MCSchedClassDesc *SC) const
Provide an instruction scheduling machine model to CodeGen passes.
const InstrItineraryData * getInstrItineraries() const
unsigned getLatencyFactor() const
Multiply cycle count by this factor to normalize it relative to other resources. This is the number o...
unsigned getNumProcResourceKinds() const
Get the number of kinds of resources for this target.
const MCProcResourceDesc * getProcResource(unsigned ProcResourceIdx) const
unsigned getNumProcResourceKinds() const
const MCWriteProcResEntry * ProcResIter
ProcResIter getWriteProcResEnd(const MCSchedClassDesc *SC) const
const MCSchedModel * getMCSchedModel() const
bool hasInstrSchedModel() const
Return true if this machine model includes an instruction-level scheduling model. ...
int getResourceBufferSize(unsigned PIdx) const
Number of resource units that may be buffered for OOO execution.
const MCProcResourceDesc * getProcResource(unsigned PIdx) const
Get a processor resource by ID for convenience.
Define a kind of processor resource that will be modeled by the scheduler.
unsigned MicroOpBufferSize
unsigned getProcessorID() const
Identify the processor corresponding to the current subtarget.
unsigned computeOperandLatency(const MachineInstr *DefMI, unsigned DefOperIdx, const MachineInstr *UseMI, unsigned UseOperIdx) const
Compute operand latency based on the available machine model.
unsigned computeInstrLatency(const MachineInstr *MI, bool UseDefaultDefLatency=true) const
Compute the instruction latency based on the available machine model.
unsigned getMicroOpFactor() const
Multiply number of micro-ops by this factor to normalize it relative to other resources.
unsigned getProcessorID() const
unsigned getIssueWidth() const
Maximum number of micro-ops that may be scheduled per cycle.
ProcResIter getWriteProcResBegin(const MCSchedClassDesc *SC) const