LLVM  8.0.1
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 reserveSlot (const InstRef &IS, unsigned NumMicroOps)
 
const RUTokenpeekCurrentToken () 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 37 of file RetireControlUnit.h.

Constructor & Destructor Documentation

◆ RetireControlUnit()

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

Member Function Documentation

◆ consumeCurrentToken()

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

◆ dump()

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

Definition at line 81 of file RetireControlUnit.cpp.

References llvm::dbgs().

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

◆ getMaxRetirePerCycle()

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

◆ isAvailable()

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

Definition at line 69 of file RetireControlUnit.h.

References llvm::max().

Referenced by reserveSlot().

◆ isEmpty()

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

Definition at line 68 of file RetireControlUnit.h.

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

◆ onInstructionExecuted()

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

Definition at line 74 of file RetireControlUnit.cpp.

References assert(), and IR.

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

◆ peekCurrentToken()

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

◆ reserveSlot()

unsigned llvm::mca::RetireControlUnit::reserveSlot ( const InstRef IS,
unsigned  NumMicroOps 
)

Definition at line 41 of file RetireControlUnit.cpp.

References assert(), IR, isAvailable(), and llvm::max().

Referenced by getMaxRetirePerCycle().


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