16 #ifndef LLVM_MC_MCINSTRITINERARIES_H
17 #define LLVM_MC_MCINSTRITINERARIES_H
123 const unsigned *OS,
const unsigned *
F)
132 return ((
Itineraries[ItinClassIndx].FirstStage == ~0U) &&
158 unsigned Latency = 0, StartCycle = 0;
160 *E =
endStage(ItinClassIndx); IS != E; ++IS) {
161 Latency = std::max(Latency, StartCycle + IS->getCycles());
162 StartCycle += IS->getNextCycles();
175 if ((FirstIdx + OperandIdx) >= LastIdx)
187 unsigned UseClass,
unsigned UseIdx)
const {
190 if ((FirstDefIdx + DefIdx) >= LastDefIdx)
197 if ((FirstUseIdx + UseIdx) >= LastUseIdx)
208 unsigned UseClass,
unsigned UseIdx)
const {
220 UseCycle = DefCycle - UseCycle + 1;
const unsigned * OperandCycles
Array of operand cycles selected.
int getNumMicroOps(unsigned ItinClassIndx) const
Return the number of micro-ops that the given class decodes to.
unsigned Units_
Choice of functional units.
InstrItineraryData()
Ctors.
const unsigned * Forwardings
Array of pipeline forwarding pathes.
int NextCycles_
Number of machine cycles to next stage.
unsigned getCycles() const
Returns the number of cycles the stage is occupied.
ReservationKinds getReservationKind() const
bool isEndMarker(unsigned ItinClassIndx) const
Returns true if the index is for the end marker itinerary.
int NumMicroOps
of micro-ops, -1 means it's variable
int getOperandCycle(unsigned ItinClassIndx, unsigned OperandIdx) const
Return the cycle for the given class and operand.
unsigned FirstOperandCycle
Index of first operand rd/wr.
const InstrItinerary * Itineraries
Array of itineraries selected.
const InstrStage * beginStage(unsigned ItinClassIndx) const
Return the first stage of the itinerary.
unsigned getUnits() const
Returns the choice of FUs.
InstrItineraryData(const MCSchedModel &SM, const InstrStage *S, const unsigned *OS, const unsigned *F)
Itinerary data supplied by a subtarget to be used by a target.
unsigned LastOperandCycle
Index of last + 1 operand rd/wr.
unsigned FirstStage
Index of first stage in itinerary.
ReservationKinds Kind_
Kind of the FU reservation.
unsigned getStageLatency(unsigned ItinClassIndx) const
Return the total stage latency of the given class.
unsigned Cycles_
Length of stage in machine cycles.
unsigned getNextCycles() const
Returns the number of cycles from the start of this stage to the start of the next stage in the itine...
const InstrStage * endStage(unsigned ItinClassIndx) const
Return the last+1 stage of the itinerary.
unsigned LastStage
Index of last + 1 stage in itinerary.
int getOperandLatency(unsigned DefClass, unsigned DefIdx, unsigned UseClass, unsigned UseIdx) const
Compute and return the use operand latency of a given itinerary class and operand index if the value ...
MCSchedModel SchedModel
Basic machine properties.
These values represent a non-pipelined step in the execution of an instruction.
bool hasPipelineForwarding(unsigned DefClass, unsigned DefIdx, unsigned UseClass, unsigned UseIdx) const
Return true if there is a pipeline forwarding between instructions of itinerary classes DefClass and ...
const InstrStage * Stages
Array of stages selected.
An itinerary represents the scheduling information for an instruction.
Machine model for scheduling, bundling, and heuristics.
bool isEmpty() const
Returns true if there are no itineraries.