LLVM 19.0.0git
Classes | Public Member Functions | Static Public Attributes | List of all members
llvm::mca::RetireControlUnit Struct Reference

This class tracks which instructions are in-flight (i.e., dispatched but not retired) in the OoO backend. More...

#include "llvm/MCA/HardwareUnits/RetireControlUnit.h"

Inheritance diagram for llvm::mca::RetireControlUnit:
Inheritance graph
[legend]

Classes

struct  RUToken
 

Public Member Functions

 RetireControlUnit (const MCSchedModel &SM)
 
bool isEmpty () const
 
bool isAvailable (unsigned Quantity=1) const
 
unsigned getMaxRetirePerCycle () const
 
unsigned dispatch (const InstRef &IS)
 
const RUTokengetCurrentToken () const
 
const RUTokenpeekNextToken () const
 
void consumeCurrentToken ()
 
void onInstructionExecuted (unsigned TokenID)
 
void dump () const
 
- Public Member Functions inherited from llvm::mca::HardwareUnit
 HardwareUnit ()=default
 
virtual ~HardwareUnit ()
 

Static Public Attributes

static const unsigned UnhandledTokenID = ~0U
 

Detailed Description

This class tracks which instructions are in-flight (i.e., dispatched but not retired) in the OoO backend.

This class checks on every cycle if/which instructions can be retired. Instructions are retired in program order. In the event of an instruction being retired, the pipeline that owns this RetireControlUnit (RCU) gets notified.

On instruction retired, register updates are all architecturally committed, and any physicall registers previously allocated for the retired instruction are freed.

Definition at line 36 of file RetireControlUnit.h.

Constructor & Destructor Documentation

◆ RetireControlUnit()

llvm::mca::RetireControlUnit::RetireControlUnit ( const MCSchedModel SM)

Member Function Documentation

◆ consumeCurrentToken()

void llvm::mca::RetireControlUnit::consumeCurrentToken ( )

◆ dispatch()

unsigned llvm::mca::RetireControlUnit::dispatch ( const InstRef IS)

◆ dump()

void llvm::mca::RetireControlUnit::dump ( ) const

Definition at line 96 of file RetireControlUnit.cpp.

References llvm::dbgs().

Referenced by llvm::mca::DispatchStage::dump().

◆ getCurrentToken()

const RetireControlUnit::RUToken & llvm::mca::RetireControlUnit::getCurrentToken ( ) const

◆ getMaxRetirePerCycle()

unsigned llvm::mca::RetireControlUnit::getMaxRetirePerCycle ( ) const
inline

Definition at line 88 of file RetireControlUnit.h.

Referenced by llvm::mca::RetireStage::cycleStart().

◆ isAvailable()

bool llvm::mca::RetireControlUnit::isAvailable ( unsigned  Quantity = 1) const
inline

Definition at line 84 of file RetireControlUnit.h.

◆ isEmpty()

bool llvm::mca::RetireControlUnit::isEmpty ( ) const
inline

Definition at line 82 of file RetireControlUnit.h.

Referenced by llvm::mca::RetireStage::cycleStart().

◆ onInstructionExecuted()

void llvm::mca::RetireControlUnit::onInstructionExecuted ( unsigned  TokenID)

Definition at line 88 of file RetireControlUnit.cpp.

References assert(), and IR.

Referenced by llvm::mca::RetireStage::execute().

◆ peekNextToken()

const RetireControlUnit::RUToken & llvm::mca::RetireControlUnit::peekNextToken ( ) const

Definition at line 73 of file RetireControlUnit.cpp.

Member Data Documentation

◆ UnhandledTokenID

const unsigned llvm::mca::RetireControlUnit::UnhandledTokenID = ~0U
static

Definition at line 109 of file RetireControlUnit.h.

Referenced by dispatch(), and llvm::mca::RetireStage::execute().


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