LLVM  8.0.1
Public Member Functions | Public Attributes | List of all members
llvm::InstrItineraryData Class Reference

Itinerary data supplied by a subtarget to be used by a target. More...

#include "llvm/MC/MCInstrItineraries.h"

Collaboration diagram for llvm::InstrItineraryData:
Collaboration graph
[legend]

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. More...
 
bool isEndMarker (unsigned ItinClassIndx) const
 Returns true if the index is for the end marker itinerary. More...
 
const InstrStagebeginStage (unsigned ItinClassIndx) const
 Return the first stage of the itinerary. More...
 
const InstrStageendStage (unsigned ItinClassIndx) const
 Return the last+1 stage of the itinerary. More...
 
unsigned getStageLatency (unsigned ItinClassIndx) const
 Return the total stage latency of the given class. More...
 
int getOperandCycle (unsigned ItinClassIndx, unsigned OperandIdx) const
 Return the cycle for the given class and operand. More...
 
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. More...
 
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 is produced by an instruction of the specified itinerary class and def operand index. More...
 
int getNumMicroOps (unsigned ItinClassIndx) const
 Return the number of micro-ops that the given class decodes to. More...
 

Public Attributes

MCSchedModel SchedModel
 Basic machine properties. More...
 
const InstrStageStages = nullptr
 Array of stages selected. More...
 
const unsignedOperandCycles = nullptr
 Array of operand cycles selected. More...
 
const unsignedForwardings = nullptr
 Array of pipeline forwarding paths. More...
 
const InstrItineraryItineraries
 Array of itineraries selected. More...
 

Detailed Description

Itinerary data supplied by a subtarget to be used by a target.

Definition at line 107 of file MCInstrItineraries.h.

Constructor & Destructor Documentation

◆ InstrItineraryData() [1/2]

llvm::InstrItineraryData::InstrItineraryData ( )
default

◆ InstrItineraryData() [2/2]

llvm::InstrItineraryData::InstrItineraryData ( const MCSchedModel SM,
const InstrStage S,
const unsigned OS,
const unsigned F 
)
inline

Definition at line 118 of file MCInstrItineraries.h.

Member Function Documentation

◆ beginStage()

const InstrStage* llvm::InstrItineraryData::beginStage ( unsigned  ItinClassIndx) const
inline

◆ endStage()

const InstrStage* llvm::InstrItineraryData::endStage ( unsigned  ItinClassIndx) const
inline

◆ getNumMicroOps()

int llvm::InstrItineraryData::getNumMicroOps ( unsigned  ItinClassIndx) const
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 226 of file MCInstrItineraries.h.

References llvm::InstrItinerary::NumMicroOps.

Referenced by llvm::TargetSchedModel::getNumMicroOps(), llvm::ARMBaseInstrInfo::getNumMicroOps(), getNumMicroOpsSwiftLdSt(), and llvm::ARMBaseInstrInfo::getOperandLatency().

◆ getOperandCycle()

int llvm::InstrItineraryData::getOperandCycle ( unsigned  ItinClassIndx,
unsigned  OperandIdx 
) const
inline

◆ getOperandLatency()

int llvm::InstrItineraryData::getOperandLatency ( unsigned  DefClass,
unsigned  DefIdx,
unsigned  UseClass,
unsigned  UseIdx 
) const
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.

Definition at line 203 of file MCInstrItineraries.h.

Referenced by llvm::ARMBaseInstrInfo::getLDMVariableDefsSize(), and llvm::TargetInstrInfo::getOperandLatency().

◆ getStageLatency()

unsigned llvm::InstrItineraryData::getStageLatency ( unsigned  ItinClassIndx) const
inline

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 147 of file MCInstrItineraries.h.

References E, llvm::Latency, and llvm::max().

Referenced by llvm::TargetInstrInfo::getInstrLatency(), llvm::HexagonInstrInfo::getInstrTimingClassLatency(), and llvm::ARMBaseInstrInfo::getOperandLatency().

◆ hasPipelineForwarding()

bool llvm::InstrItineraryData::hasPipelineForwarding ( unsigned  DefClass,
unsigned  DefIdx,
unsigned  UseClass,
unsigned  UseIdx 
) const
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 182 of file MCInstrItineraries.h.

References llvm::InstrItinerary::FirstOperandCycle, and llvm::InstrItinerary::LastOperandCycle.

Referenced by llvm::ARMBaseInstrInfo::getLDMVariableDefsSize().

◆ isEmpty()

bool llvm::InstrItineraryData::isEmpty ( ) const
inline

◆ isEndMarker()

bool llvm::InstrItineraryData::isEndMarker ( unsigned  ItinClassIndx) const
inline

Returns true if the index is for the end marker itinerary.

Definition at line 127 of file MCInstrItineraries.h.

Referenced by llvm::ScoreboardHazardRecognizer::ScoreboardHazardRecognizer().

Member Data Documentation

◆ Forwardings

const unsigned* llvm::InstrItineraryData::Forwardings = nullptr

Array of pipeline forwarding paths.

Definition at line 113 of file MCInstrItineraries.h.

◆ Itineraries

const InstrItinerary* llvm::InstrItineraryData::Itineraries
Initial value:
=
nullptr

Array of itineraries selected.

Definition at line 114 of file MCInstrItineraries.h.

Referenced by llvm::TargetInstrInfo::getNumMicroOps(), and llvm::HexagonSubtarget::HexagonSubtarget().

◆ OperandCycles

const unsigned* llvm::InstrItineraryData::OperandCycles = nullptr

Array of operand cycles selected.

Definition at line 112 of file MCInstrItineraries.h.

◆ SchedModel

MCSchedModel llvm::InstrItineraryData::SchedModel

◆ Stages

const InstrStage* llvm::InstrItineraryData::Stages = nullptr

Array of stages selected.

Definition at line 111 of file MCInstrItineraries.h.


The documentation for this class was generated from the following file: