Go to the documentation of this file.
15 #ifndef LLVM_MC_MCINSTRITINERARIES_H
16 #define LLVM_MC_MCINSTRITINERARIES_H
121 const unsigned *OS,
const unsigned *
F)
130 return ((
Itineraries[ItinClassIndx].FirstStage == UINT16_MAX) &&
131 (
Itineraries[ItinClassIndx].LastStage == UINT16_MAX));
156 unsigned Latency = 0, StartCycle = 0;
158 *
E =
endStage(ItinClassIndx); IS !=
E; ++IS) {
160 StartCycle += IS->getNextCycles();
173 if ((FirstIdx + OperandIdx) >= LastIdx)
185 unsigned UseClass,
unsigned UseIdx)
const {
188 if ((FirstDefIdx + DefIdx) >= LastDefIdx)
195 if ((FirstUseIdx + UseIdx) >= LastUseIdx)
206 unsigned UseClass,
unsigned UseIdx)
const {
218 UseCycle = DefCycle - UseCycle + 1;
237 #endif // LLVM_MC_MCINSTRITINERARIES_H
unsigned getCycles() const
Returns the number of cycles the stage is occupied.
This is an optimization pass for GlobalISel generic memory operations.
int getNumMicroOps(unsigned ItinClassIndx) const
Return the number of micro-ops that the given class decodes to.
const InstrStage * Stages
Array of stages selected.
ReservationKinds Kind_
Kind of the FU reservation.
Expected< ExpressionValue > max(const ExpressionValue &Lhs, const ExpressionValue &Rhs)
unsigned Cycles_
Length of stage in machine cycles.
int getOperandCycle(unsigned ItinClassIndx, unsigned OperandIdx) const
Return the cycle for the given class and operand.
const InstrStage * endStage(unsigned ItinClassIndx) const
Return the last+1 stage of the 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 ...
An itinerary represents the scheduling information for an instruction.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
InstrItineraryData(const MCSchedModel &SM, const InstrStage *S, const unsigned *OS, const unsigned *F)
const InstrItinerary * Itineraries
Array of itineraries selected.
uint64_t FuncUnits
Bitmask representing a set of functional units.
bool isEndMarker(unsigned ItinClassIndx) const
Returns true if the index is for the end marker itinerary.
FuncUnits getUnits() const
Returns the choice of FUs.
FuncUnits Units_
Choice of functional units.
unsigned getNextCycles() const
Returns the number of cycles from the start of this stage to the start of the next stage in the itine...
uint16_t FirstStage
Index of first stage in itinerary.
int NextCycles_
Number of machine cycles to next stage.
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 ...
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
These values represent a non-pipelined step in the execution of an instruction.
static const MCSchedModel & GetDefaultSchedModel()
Returns the default initialized model.
unsigned getStageLatency(unsigned ItinClassIndx) const
Return the total stage latency of the given class.
const unsigned * OperandCycles
Array of operand cycles selected.
InstrItineraryData()=default
ReservationKinds getReservationKind() const
uint16_t FirstOperandCycle
Index of first operand rd/wr.
Machine model for scheduling, bundling, and heuristics.
uint16_t LastOperandCycle
Index of last + 1 operand rd/wr.
uint16_t LastStage
Index of last + 1 stage in itinerary.
const InstrStage * beginStage(unsigned ItinClassIndx) const
Return the first stage of the itinerary.
bool isEmpty() const
Returns true if there are no itineraries.
Itinerary data supplied by a subtarget to be used by a target.
MCSchedModel SchedModel
Basic machine properties.
const unsigned * Forwardings
Array of pipeline forwarding paths.