LLVM  15.0.0git
llvm::InstrStage Struct Reference

These values represent a non-pipelined step in the execution of an instruction. More...

#include "llvm/MC/MCInstrItineraries.h"

Collaboration diagram for llvm::InstrStage:
[legend]

Public Types

enum  ReservationKinds { Required = 0, Reserved = 1 }

typedef uint64_t FuncUnits
Bitmask representing a set of functional units. More...

Public Member Functions

unsigned getCycles () const
Returns the number of cycles the stage is occupied. More...

FuncUnits getUnits () const
Returns the choice of FUs. More...

ReservationKinds getReservationKind () const

unsigned getNextCycles () const
Returns the number of cycles from the start of this stage to the start of the next stage in the itinerary. More...

Public Attributes

unsigned Cycles_
Length of stage in machine cycles. More...

FuncUnits Units_
Choice of functional units. More...

int NextCycles_
Number of machine cycles to next stage. More...

ReservationKinds Kind_
Kind of the FU reservation. More...

Detailed Description

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 consecutive 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:

• FUs which instruction actually requires
• FUs which instruction just reserves. Reserved unit is not available for execution of other instruction. However, several instructions can reserve the same unit several times. Such two types of units reservation is used to model instruction domain change stalls, FUs using the same resource (e.g. same register file), etc.

Definition at line 58 of file MCInstrItineraries.h.

◆ FuncUnits

 typedef uint64_t llvm::InstrStage::FuncUnits

Bitmask representing a set of functional units.

Definition at line 65 of file MCInstrItineraries.h.

◆ ReservationKinds

Enumerator
Required
Reserved

Definition at line 59 of file MCInstrItineraries.h.

◆ getCycles()

 unsigned llvm::InstrStage::getCycles ( ) const
inline

Returns the number of cycles the stage is occupied.

Definition at line 73 of file MCInstrItineraries.h.

References Cycles_.

◆ getNextCycles()

 unsigned llvm::InstrStage::getNextCycles ( ) const
inline

Returns the number of cycles from the start of this stage to the start of the next stage in the itinerary.

Definition at line 88 of file MCInstrItineraries.h.

References Cycles_, and NextCycles_.

◆ getReservationKind()

 ReservationKinds llvm::InstrStage::getReservationKind ( ) const
inline

Definition at line 82 of file MCInstrItineraries.h.

References Kind_.

◆ getUnits()

 FuncUnits llvm::InstrStage::getUnits ( ) const
inline

Returns the choice of FUs.

Definition at line 78 of file MCInstrItineraries.h.

References Units_.

◆ Cycles_

 unsigned llvm::InstrStage::Cycles_

Length of stage in machine cycles.

Definition at line 67 of file MCInstrItineraries.h.

Referenced by getCycles(), and getNextCycles().

◆ Kind_

 ReservationKinds llvm::InstrStage::Kind_

Kind of the FU reservation.

Definition at line 70 of file MCInstrItineraries.h.

Referenced by getReservationKind().

◆ NextCycles_

 int llvm::InstrStage::NextCycles_

Number of machine cycles to next stage.

Definition at line 69 of file MCInstrItineraries.h.

Referenced by getNextCycles().

◆ Units_

 FuncUnits llvm::InstrStage::Units_

Choice of functional units.

Definition at line 68 of file MCInstrItineraries.h.

Referenced by getUnits().

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