LLVM  10.0.0svn
Classes | Public Member Functions | 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]
Collaboration diagram for llvm::mca::RetireControlUnit:
Collaboration 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 ()
 

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 93 of file RetireControlUnit.cpp.

References llvm::dbgs().

Referenced by llvm::mca::DispatchStage::dump(), and getMaxRetirePerCycle().

◆ getCurrentToken()

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

◆ getMaxRetirePerCycle()

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

◆ isAvailable()

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

Definition at line 84 of file RetireControlUnit.h.

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

◆ 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 85 of file RetireControlUnit.cpp.

References assert(), and IR.

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

◆ peekNextToken()

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

Definition at line 70 of file RetireControlUnit.cpp.

Referenced by getMaxRetirePerCycle().


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