15#ifndef LLVM_MC_MCINSTRITINERARIES_H
16#define LLVM_MC_MCINSTRITINERARIES_H
122 const unsigned *
OS,
const unsigned *
F)
131 return ((
Itineraries[ItinClassIndx].FirstStage == UINT16_MAX) &&
132 (
Itineraries[ItinClassIndx].LastStage == UINT16_MAX));
157 unsigned Latency = 0, StartCycle = 0;
159 *
E =
endStage(ItinClassIndx); IS !=
E; ++IS) {
161 StartCycle += IS->getNextCycles();
169 unsigned OperandIdx)
const {
175 if ((FirstIdx + OperandIdx) >= LastIdx)
187 unsigned UseClass,
unsigned UseIdx)
const {
190 if ((FirstDefIdx + DefIdx) >= LastDefIdx)
197 if ((FirstUseIdx + UseIdx) >= LastUseIdx)
210 unsigned UseIdx)
const {
216 if (!DefCycle || !UseCycle)
219 if (UseCycle > *DefCycle + 1)
222 UseCycle = *DefCycle - *UseCycle + 1;
226 UseCycle = *UseCycle - 1;
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
Itinerary data supplied by a subtarget to be used by a target.
int getNumMicroOps(unsigned ItinClassIndx) const
Return the number of micro-ops that the given class decodes to.
std::optional< unsigned > getOperandCycle(unsigned ItinClassIndx, unsigned OperandIdx) const
Return the cycle for the given class and operand.
const InstrStage * Stages
Array of stages selected.
unsigned getStageLatency(unsigned ItinClassIndx) const
Return the total stage latency of the given class.
bool isEndMarker(unsigned ItinClassIndx) const
Returns true if the index is for the end marker itinerary.
std::optional< unsigned > 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 ...
const InstrStage * beginStage(unsigned ItinClassIndx) const
Return the first stage of the itinerary.
MCSchedModel SchedModel
Basic machine properties.
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 ...
InstrItineraryData(const MCSchedModel &SM, const InstrStage *S, const unsigned *OS, const unsigned *F)
const unsigned * Forwardings
Array of pipeline forwarding paths.
InstrItineraryData()=default
const InstrStage * endStage(unsigned ItinClassIndx) const
Return the last+1 stage of the itinerary.
const unsigned * OperandCycles
Array of operand cycles selected.
const InstrItinerary * Itineraries
Array of itineraries selected.
bool isEmpty() const
Returns true if there are no itineraries.
This is an optimization pass for GlobalISel generic memory operations.
An itinerary represents the scheduling information for an instruction.
uint16_t LastOperandCycle
Index of last + 1 operand rd/wr.
uint16_t FirstOperandCycle
Index of first operand rd/wr.
uint16_t FirstStage
Index of first stage in itinerary.
uint16_t LastStage
Index of last + 1 stage in itinerary.
These values represent a non-pipelined step in the execution of an instruction.
uint64_t FuncUnits
Bitmask representing a set 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...
FuncUnits getUnits() const
Returns the choice of FUs.
ReservationKinds getReservationKind() const
FuncUnits Units_
Choice of functional units.
unsigned Cycles_
Length of stage in machine cycles.
unsigned getCycles() const
Returns the number of cycles the stage is occupied.
int NextCycles_
Number of machine cycles to next stage.
ReservationKinds Kind_
Kind of the FU reservation.
Machine model for scheduling, bundling, and heuristics.
static const MCSchedModel Default
Returns the default initialized model.