LLVM API Documentation

Public Types | Public Member Functions | Public Attributes
llvm::InstrStage Struct Reference

#include <MCInstrItineraries.h>

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

List of all members.

Public Types

enum  ReservationKinds { Required = 0, Reserved = 1 }

Public Member Functions

unsigned getCycles () const
 getCycles - returns the number of cycles the stage is occupied
unsigned getUnits () const
 getUnits - returns the choice of FUs
ReservationKinds getReservationKind () const
unsigned getNextCycles () const

Public Attributes

unsigned Cycles_
 Length of stage in machine cycles.
unsigned Units_
 Choice of functional units.
int NextCycles_
 Number of machine cycles to next stage.
ReservationKinds Kind_
 Kind of the FU reservation.

Detailed Description

Instruction stage - These values represent a non-pipelined step in the execution of an instruction. Cycles represents the number of discrete time slots needed to complete the stage. Units represent the choice of functional units that can be used to complete the stage. Eg. IntUnit1, IntUnit2. NextCycles indicates how many cycles should elapse from the start of this stage to the start of the next stage in the itinerary. A value of -1 indicates that the next stage should start immediately after the current one. For example:

{ 1, x, -1 } indicates that the stage occupies FU x for 1 cycle and that the next stage starts immediately after this one.

{ 2, x|y, 1 } indicates that the stage occupies either FU x or FU y for 2 consecuative cycles and that the next stage starts one cycle after this stage starts. That is, the stage requirements overlap in time.

{ 1, x, 0 } indicates that the stage occupies FU x for 1 cycle and that the next stage starts in this same cycle. This can be used to indicate that the instruction requires multiple stages at the same time.

FU reservation can be of two different kinds:

Definition at line 59 of file MCInstrItineraries.h.


Member Enumeration Documentation

Enumerator:
Required 
Reserved 

Definition at line 60 of file MCInstrItineraries.h.


Member Function Documentation

getCycles - returns the number of cycles the stage is occupied

Definition at line 71 of file MCInstrItineraries.h.

References Cycles_.

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

getNextCycles - returns the number of cycles from the start of this stage to the start of the next stage in the itinerary

Definition at line 86 of file MCInstrItineraries.h.

References Cycles_, and NextCycles_.

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

Definition at line 80 of file MCInstrItineraries.h.

References Kind_.

getUnits - returns the choice of FUs

Definition at line 76 of file MCInstrItineraries.h.

References Units_.

Referenced by llvm::DFAPacketizer::canReserveResources(), llvm::HexagonMCInst::getUnits(), and llvm::DFAPacketizer::reserveResources().


Member Data Documentation

Length of stage in machine cycles.

Definition at line 65 of file MCInstrItineraries.h.

Referenced by getCycles(), and getNextCycles().

Kind of the FU reservation.

Definition at line 68 of file MCInstrItineraries.h.

Referenced by getReservationKind().

Number of machine cycles to next stage.

Definition at line 67 of file MCInstrItineraries.h.

Referenced by getNextCycles().

Choice of functional units.

Definition at line 66 of file MCInstrItineraries.h.

Referenced by getUnits().


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