LLVM 20.0.0git
|
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"
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 RUToken & | getCurrentToken () const |
const RUToken & | peekNextToken () 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 |
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.
llvm::mca::RetireControlUnit::RetireControlUnit | ( | const MCSchedModel & | SM | ) |
void llvm::mca::RetireControlUnit::consumeCurrentToken | ( | ) |
Definition at line 77 of file RetireControlUnit.cpp.
References llvm::mca::InstRef::getInstruction(), llvm::mca::RetireControlUnit::RUToken::IR, llvm::mca::RetireControlUnit::RUToken::NumSlots, and llvm::mca::Instruction::retire().
Referenced by llvm::mca::RetireStage::cycleStart().
Definition at line 43 of file RetireControlUnit.cpp.
References assert(), llvm::mca::InstructionBase::getNumMicroOps(), IR, and UnhandledTokenID.
void llvm::mca::RetireControlUnit::dump | ( | ) | const |
Definition at line 96 of file RetireControlUnit.cpp.
References llvm::dbgs().
Referenced by llvm::mca::DispatchStage::dump().
const RetireControlUnit::RUToken & llvm::mca::RetireControlUnit::getCurrentToken | ( | ) | const |
Definition at line 58 of file RetireControlUnit.cpp.
References assert(), llvm::mca::InstRef::getInstruction(), and llvm::mca::RetireControlUnit::RUToken::IR.
Referenced by llvm::mca::RetireStage::cycleStart().
|
inline |
Definition at line 88 of file RetireControlUnit.h.
Referenced by llvm::mca::RetireStage::cycleStart().
Definition at line 84 of file RetireControlUnit.h.
|
inline |
Definition at line 82 of file RetireControlUnit.h.
Referenced by llvm::mca::RetireStage::cycleStart().
void llvm::mca::RetireControlUnit::onInstructionExecuted | ( | unsigned | TokenID | ) |
Definition at line 88 of file RetireControlUnit.cpp.
Referenced by llvm::mca::RetireStage::execute().
const RetireControlUnit::RUToken & llvm::mca::RetireControlUnit::peekNextToken | ( | ) | const |
Definition at line 73 of file RetireControlUnit.cpp.
Definition at line 109 of file RetireControlUnit.h.
Referenced by dispatch(), and llvm::mca::RetireStage::execute().