LLVM 20.0.0git
|
Itinerary data supplied by a subtarget to be used by a target. More...
#include "llvm/MC/MCInstrItineraries.h"
Public Member Functions | |
InstrItineraryData ()=default | |
InstrItineraryData (const MCSchedModel &SM, const InstrStage *S, const unsigned *OS, const unsigned *F) | |
bool | isEmpty () const |
Returns true if there are no itineraries. | |
bool | isEndMarker (unsigned ItinClassIndx) const |
Returns true if the index is for the end marker itinerary. | |
const InstrStage * | beginStage (unsigned ItinClassIndx) const |
Return the first stage of the itinerary. | |
const InstrStage * | endStage (unsigned ItinClassIndx) const |
Return the last+1 stage of the itinerary. | |
unsigned | getStageLatency (unsigned ItinClassIndx) const |
Return the total stage latency of the given class. | |
std::optional< unsigned > | getOperandCycle (unsigned ItinClassIndx, unsigned OperandIdx) const |
Return the cycle for the given class and operand. | |
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 UseClasses so that value produced by an instruction of itinerary class DefClass, operand index DefIdx can be bypassed when it's read by an instruction of itinerary class UseClass, operand index UseIdx. | |
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 is produced by an instruction of the specified itinerary class and def operand index. | |
int | getNumMicroOps (unsigned ItinClassIndx) const |
Return the number of micro-ops that the given class decodes to. | |
Public Attributes | |
MCSchedModel | SchedModel |
Basic machine properties. | |
const InstrStage * | Stages = nullptr |
Array of stages selected. | |
const unsigned * | OperandCycles = nullptr |
Array of operand cycles selected. | |
const unsigned * | Forwardings = nullptr |
Array of pipeline forwarding paths. | |
const InstrItinerary * | Itineraries |
Array of itineraries selected. | |
Itinerary data supplied by a subtarget to be used by a target.
Definition at line 110 of file MCInstrItineraries.h.
|
default |
|
inline |
Definition at line 121 of file MCInstrItineraries.h.
|
inline |
Return the first stage of the itinerary.
Definition at line 136 of file MCInstrItineraries.h.
References llvm::InstrItinerary::FirstStage, Itineraries, and Stages.
Referenced by llvm::ScoreboardHazardRecognizer::EmitInstruction(), llvm::ScoreboardHazardRecognizer::getHazardType(), llvm::MCSchedModel::getReciprocalThroughput(), getStageLatency(), llvm::HexagonPacketizerList::ignorePseudoInstruction(), and llvm::ScoreboardHazardRecognizer::ScoreboardHazardRecognizer().
|
inline |
Return the last+1 stage of the itinerary.
Definition at line 142 of file MCInstrItineraries.h.
References Itineraries, llvm::InstrItinerary::LastStage, and Stages.
Referenced by llvm::ScoreboardHazardRecognizer::EmitInstruction(), llvm::ScoreboardHazardRecognizer::getHazardType(), llvm::MCSchedModel::getReciprocalThroughput(), getStageLatency(), and llvm::ScoreboardHazardRecognizer::ScoreboardHazardRecognizer().
|
inline |
Return the number of micro-ops that the given class decodes to.
Return -1 for classes that require dynamic lookup via TargetInstrInfo.
Definition at line 232 of file MCInstrItineraries.h.
References isEmpty(), Itineraries, and llvm::InstrItinerary::NumMicroOps.
Referenced by llvm::ARMBaseInstrInfo::getNumMicroOps(), llvm::TargetSchedModel::getNumMicroOps(), and getNumMicroOpsSwiftLdSt().
|
inline |
Return the cycle for the given class and operand.
Return std::nullopt if the information is not available for the operand.
Definition at line 168 of file MCInstrItineraries.h.
References llvm::InstrItinerary::FirstOperandCycle, isEmpty(), Itineraries, llvm::InstrItinerary::LastOperandCycle, and OperandCycles.
Referenced by llvm::TargetSchedModel::computeOperandLatency(), llvm::PPCInstrInfo::getInstrLatency(), getItineraryLatency(), llvm::TargetInstrInfo::getOperandLatency(), llvm::ARMBaseInstrInfo::getOperandLatency(), getOperandLatency(), llvm::ARMTargetLowering::getSchedulingPreference(), and llvm::TargetInstrInfo::hasLowDefLatency().
|
inline |
Compute and return the use operand latency of a given itinerary class and operand index if the value is produced by an instruction of the specified itinerary class and def operand index.
Return std::nullopt if the information is not available for the operand.
Definition at line 208 of file MCInstrItineraries.h.
References getOperandCycle(), hasPipelineForwarding(), and isEmpty().
Referenced by llvm::TargetInstrInfo::getOperandLatency().
Return the total stage latency of the given class.
The latency is the maximum completion time for any stage in the itinerary. If no stages exist, it defaults to one cycle.
Definition at line 150 of file MCInstrItineraries.h.
References beginStage(), E, endStage(), isEmpty(), and llvm::Latency.
Referenced by llvm::TargetInstrInfo::getInstrLatency(), and llvm::HexagonInstrInfo::getInstrTimingClassLatency().
|
inline |
Return true if there is a pipeline forwarding between instructions of itinerary classes DefClass and UseClasses so that value produced by an instruction of itinerary class DefClass, operand index DefIdx can be bypassed when it's read by an instruction of itinerary class UseClass, operand index UseIdx.
Definition at line 186 of file MCInstrItineraries.h.
References llvm::InstrItinerary::FirstOperandCycle, Forwardings, Itineraries, and llvm::InstrItinerary::LastOperandCycle.
Referenced by getOperandLatency().
|
inline |
Returns true if there are no itineraries.
Definition at line 127 of file MCInstrItineraries.h.
References Itineraries.
Referenced by llvm::ScheduleDAGSDNodes::computeLatency(), llvm::ScoreboardHazardRecognizer::EmitInstruction(), llvm::ScoreboardHazardRecognizer::getHazardType(), llvm::TargetInstrInfo::getInstrLatency(), llvm::TargetInstrInfo::getNumMicroOps(), llvm::ARMBaseInstrInfo::getNumMicroOps(), getNumMicroOps(), getOperandCycle(), llvm::ARMBaseInstrInfo::getOperandLatency(), llvm::TargetInstrInfo::getOperandLatency(), getOperandLatency(), llvm::ARMTargetLowering::getSchedulingPreference(), getStageLatency(), llvm::TargetSchedModel::hasInstrItineraries(), llvm::TargetInstrInfo::hasLowDefLatency(), and llvm::ScoreboardHazardRecognizer::ScoreboardHazardRecognizer().
Returns true if the index is for the end marker itinerary.
Definition at line 130 of file MCInstrItineraries.h.
References Itineraries.
Referenced by llvm::ScoreboardHazardRecognizer::ScoreboardHazardRecognizer().
Array of pipeline forwarding paths.
Definition at line 116 of file MCInstrItineraries.h.
Referenced by hasPipelineForwarding().
const InstrItinerary* llvm::InstrItineraryData::Itineraries |
Array of itineraries selected.
Definition at line 117 of file MCInstrItineraries.h.
Referenced by beginStage(), endStage(), llvm::TargetInstrInfo::getNumMicroOps(), getNumMicroOps(), getOperandCycle(), hasPipelineForwarding(), llvm::HexagonSubtarget::HexagonSubtarget(), isEmpty(), and isEndMarker().
Array of operand cycles selected.
Definition at line 115 of file MCInstrItineraries.h.
Referenced by getOperandCycle().
MCSchedModel llvm::InstrItineraryData::SchedModel |
Basic machine properties.
Definition at line 112 of file MCInstrItineraries.h.
Referenced by llvm::ResourcePriorityQueue::reserveResources(), and llvm::ScoreboardHazardRecognizer::ScoreboardHazardRecognizer().
const InstrStage* llvm::InstrItineraryData::Stages = nullptr |
Array of stages selected.
Definition at line 114 of file MCInstrItineraries.h.
Referenced by beginStage(), and endStage().