LLVM 20.0.0git
|
Each Scheduling boundary is associated with ready queues. More...
#include "llvm/CodeGen/VLIWMachineScheduler.h"
Public Member Functions | |
VLIWSchedBoundary (unsigned ID, const Twine &Name) | |
Pending queues extend the ready queues with the same ID and the PendingFlag set. | |
~VLIWSchedBoundary () | |
VLIWSchedBoundary & | operator= (const VLIWSchedBoundary &other)=delete |
VLIWSchedBoundary (const VLIWSchedBoundary &other)=delete | |
void | init (VLIWMachineScheduler *dag, const TargetSchedModel *smodel) |
bool | isTop () const |
bool | checkHazard (SUnit *SU) |
Does this SU have a hazard within the current instruction group. | |
void | releaseNode (SUnit *SU, unsigned ReadyCycle) |
void | bumpCycle () |
Move the boundary of scheduled code by one cycle. | |
void | bumpNode (SUnit *SU) |
Move the boundary of scheduled code by one SUnit. | |
void | releasePending () |
Release pending ready nodes in to the available queue. | |
void | removeReady (SUnit *SU) |
Remove SU from the ready set for this boundary. | |
SUnit * | pickOnlyChoice () |
If this queue only has one ready candidate, return it. | |
bool | isLatencyBound (SUnit *SU) |
Public Attributes | |
VLIWMachineScheduler * | DAG = nullptr |
const TargetSchedModel * | SchedModel = nullptr |
ReadyQueue | Available |
ReadyQueue | Pending |
bool | CheckPending = false |
ScheduleHazardRecognizer * | HazardRec = nullptr |
VLIWResourceModel * | ResourceModel = nullptr |
unsigned | CurrCycle = 0 |
unsigned | IssueCount = 0 |
unsigned | CriticalPathLength = 0 |
unsigned | MinReadyCycle = std::numeric_limits<unsigned>::max() |
MinReadyCycle - Cycle of the soonest available instruction. | |
unsigned | MaxMinLatency = 0 |
Each Scheduling boundary is associated with ready queues.
It tracks the current cycle in whichever direction at has moved, and maintains the state of "hazards" and other interlocks at the current cycle.
Definition at line 127 of file VLIWMachineScheduler.h.
|
inline |
Pending queues extend the ready queues with the same ID and the PendingFlag set.
Definition at line 150 of file VLIWMachineScheduler.h.
ConvergingVLIWScheduler::VLIWSchedBoundary::~VLIWSchedBoundary | ( | ) |
Definition at line 340 of file VLIWMachineScheduler.cpp.
References HazardRec, and ResourceModel.
|
delete |
void ConvergingVLIWScheduler::VLIWSchedBoundary::bumpCycle | ( | ) |
Move the boundary of scheduled code by one cycle.
Definition at line 384 of file VLIWMachineScheduler.cpp.
References assert(), Available, llvm::dbgs(), llvm::TargetSchedModel::getIssueWidth(), LLVM_DEBUG, and llvm::ConvergingVLIWScheduler::SchedModel.
void ConvergingVLIWScheduler::VLIWSchedBoundary::bumpNode | ( | SUnit * | SU | ) |
Move the boundary of scheduled code by one SUnit.
Definition at line 411 of file VLIWMachineScheduler.cpp.
References llvm::dbgs(), llvm::SUnit::getInstr(), llvm::TargetSchedModel::getNumMicroOps(), llvm::SUnit::isCall, LLVM_DEBUG, and llvm::ConvergingVLIWScheduler::SchedModel.
Referenced by llvm::ConvergingVLIWScheduler::schedNode().
Does this SU have a hazard within the current instruction group.
The scheduler supports two modes of hazard recognition. The first is the ScheduleHazardRecognizer API. It is a fully general hazard recognizer that supports highly complicated in-order reservation tables (ScoreboardHazardRecognizer) and arbitrary target-specific logic.
The second is a streamlined mechanism that checks for hazards based on simple counters that the scheduler itself maintains. It explicitly checks for instruction dispatch limitations, including the number of micro-ops that can dispatch per cycle.
TODO: Also check whether the SU must start a new group.
Definition at line 358 of file VLIWMachineScheduler.cpp.
References llvm::SUnit::getInstr(), llvm::TargetSchedModel::getIssueWidth(), llvm::TargetSchedModel::getNumMicroOps(), llvm::ScheduleHazardRecognizer::NoHazard, and llvm::ConvergingVLIWScheduler::SchedModel.
|
inline |
Definition at line 158 of file VLIWMachineScheduler.h.
References CriticalPathLength, CurrCycle, DAG, llvm::VLIWMachineScheduler::getBBSize(), llvm::TargetSchedModel::getIssueWidth(), IssueCount, isTop(), SchedModel, and llvm::ScheduleDAG::SUnits.
Referenced by llvm::ConvergingVLIWScheduler::initialize().
Definition at line 203 of file VLIWMachineScheduler.h.
References CriticalPathLength, CurrCycle, llvm::SUnit::getDepth(), llvm::SUnit::getHeight(), and isTop().
Referenced by llvm::ConvergingVLIWScheduler::pickNodeFromQueue(), and llvm::ConvergingVLIWScheduler::SchedulingCost().
|
inline |
Definition at line 185 of file VLIWMachineScheduler.h.
References Available, llvm::ReadyQueue::getID(), and llvm::ConvergingVLIWScheduler::TopQID.
Referenced by init(), and isLatencyBound().
|
delete |
SUnit * ConvergingVLIWScheduler::VLIWSchedBoundary::pickOnlyChoice | ( | ) |
If this queue only has one ready candidate, return it.
As a side effect, advance the cycle until at least one node is ready. If multiple instructions are ready, return NULL.
Definition at line 481 of file VLIWMachineScheduler.cpp.
References assert(), Available, and llvm::getWeakLeft().
Referenced by llvm::ConvergingVLIWScheduler::pickNode(), and llvm::ConvergingVLIWScheduler::pickNodeBidrectional().
Definition at line 369 of file VLIWMachineScheduler.cpp.
References Available.
Referenced by llvm::ConvergingVLIWScheduler::releaseBottomNode(), and llvm::ConvergingVLIWScheduler::releaseTopNode().
void ConvergingVLIWScheduler::VLIWSchedBoundary::releasePending | ( | ) |
Release pending ready nodes in to the available queue.
This makes them visible to heuristics.
Definition at line 440 of file VLIWMachineScheduler.cpp.
References Available, llvm::SUnit::BotReadyCycle, and llvm::SUnit::TopReadyCycle.
void ConvergingVLIWScheduler::VLIWSchedBoundary::removeReady | ( | SUnit * | SU | ) |
Remove SU from the ready set for this boundary.
Definition at line 469 of file VLIWMachineScheduler.cpp.
References assert(), and Available.
Referenced by llvm::ConvergingVLIWScheduler::pickNode().
ReadyQueue llvm::ConvergingVLIWScheduler::VLIWSchedBoundary::Available |
Definition at line 131 of file VLIWMachineScheduler.h.
Referenced by isTop(), llvm::ConvergingVLIWScheduler::pickNode(), and llvm::ConvergingVLIWScheduler::pickNodeFromQueue().
bool llvm::ConvergingVLIWScheduler::VLIWSchedBoundary::CheckPending = false |
Definition at line 133 of file VLIWMachineScheduler.h.
unsigned llvm::ConvergingVLIWScheduler::VLIWSchedBoundary::CriticalPathLength = 0 |
Definition at line 140 of file VLIWMachineScheduler.h.
Referenced by init(), and isLatencyBound().
unsigned llvm::ConvergingVLIWScheduler::VLIWSchedBoundary::CurrCycle = 0 |
Definition at line 138 of file VLIWMachineScheduler.h.
Referenced by init(), isLatencyBound(), llvm::ConvergingVLIWScheduler::pickNode(), and llvm::ConvergingVLIWScheduler::schedNode().
VLIWMachineScheduler* llvm::ConvergingVLIWScheduler::VLIWSchedBoundary::DAG = nullptr |
Definition at line 128 of file VLIWMachineScheduler.h.
Referenced by init().
ScheduleHazardRecognizer* llvm::ConvergingVLIWScheduler::VLIWSchedBoundary::HazardRec = nullptr |
Definition at line 135 of file VLIWMachineScheduler.h.
Referenced by llvm::ConvergingVLIWScheduler::initialize(), and ~VLIWSchedBoundary().
unsigned llvm::ConvergingVLIWScheduler::VLIWSchedBoundary::IssueCount = 0 |
Definition at line 139 of file VLIWMachineScheduler.h.
Referenced by init().
unsigned llvm::ConvergingVLIWScheduler::VLIWSchedBoundary::MaxMinLatency = 0 |
Definition at line 146 of file VLIWMachineScheduler.h.
Referenced by llvm::ConvergingVLIWScheduler::releaseBottomNode(), and llvm::ConvergingVLIWScheduler::releaseTopNode().
unsigned llvm::ConvergingVLIWScheduler::VLIWSchedBoundary::MinReadyCycle = std::numeric_limits<unsigned>::max() |
MinReadyCycle - Cycle of the soonest available instruction.
Definition at line 143 of file VLIWMachineScheduler.h.
ReadyQueue llvm::ConvergingVLIWScheduler::VLIWSchedBoundary::Pending |
Definition at line 132 of file VLIWMachineScheduler.h.
Referenced by llvm::ConvergingVLIWScheduler::pickNode().
VLIWResourceModel* llvm::ConvergingVLIWScheduler::VLIWSchedBoundary::ResourceModel = nullptr |
const TargetSchedModel* llvm::ConvergingVLIWScheduler::VLIWSchedBoundary::SchedModel = nullptr |
Definition at line 129 of file VLIWMachineScheduler.h.
Referenced by init().