Go to the documentation of this file.
14 #ifndef LLVM_MCA_HARDWAREUNITS_RETIRECONTROLUNIT_H
15 #define LLVM_MCA_HARDWAREUNITS_RETIRECONTROLUNIT_H
58 unsigned NextAvailableSlotIdx;
59 unsigned CurrentInstructionSlotIdx;
60 unsigned NumROBEntries;
61 unsigned AvailableEntries;
62 unsigned MaxRetirePerCycle;
63 std::vector<RUToken> Queue;
65 unsigned normalizeQuantity(
unsigned Quantity)
const {
69 Quantity =
std::min(Quantity, NumROBEntries);
77 unsigned computeNextSlotIdx()
const;
82 bool isEmpty()
const {
return AvailableEntries == NumROBEntries; }
85 return AvailableEntries >= normalizeQuantity(Quantity);
115 #endif // LLVM_MCA_HARDWAREUNITS_RETIRECONTROLUNIT_H
This is an optimization pass for GlobalISel generic memory operations.
This class tracks which instructions are in-flight (i.e., dispatched but not retired) in the OoO back...
const RUToken & getCurrentToken() const
Expected< ExpressionValue > max(const ExpressionValue &Lhs, const ExpressionValue &Rhs)
RetireControlUnit(const MCSchedModel &SM)
static const unsigned UnhandledTokenID
unsigned getMaxRetirePerCycle() const
void onInstructionExecuted(unsigned TokenID)
unsigned dispatch(const InstRef &IS)
An InstRef contains both a SourceMgr index and Instruction pair.
void consumeCurrentToken()
Expected< ExpressionValue > min(const ExpressionValue &Lhs, const ExpressionValue &Rhs)
const RUToken & peekNextToken() const
Machine model for scheduling, bundling, and heuristics.
bool isAvailable(unsigned Quantity=1) const