LLVM 22.0.0git
llvm::ConvergingVLIWScheduler::VLIWSchedBoundary Struct Reference

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 ()
VLIWSchedBoundaryoperator= (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.
SUnitpickOnlyChoice ()
 If this queue only has one ready candidate, return it.
bool isLatencyBound (SUnit *SU)

Public Attributes

VLIWMachineSchedulerDAG = nullptr
const TargetSchedModelSchedModel = nullptr
ReadyQueue Available
ReadyQueue Pending
bool CheckPending = false
ScheduleHazardRecognizerHazardRec = nullptr
VLIWResourceModelResourceModel = 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

Detailed Description

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.

Constructor & Destructor Documentation

◆ VLIWSchedBoundary() [1/2]

llvm::ConvergingVLIWScheduler::VLIWSchedBoundary::VLIWSchedBoundary ( unsigned ID,
const Twine & Name )
inline

Pending queues extend the ready queues with the same ID and the PendingFlag set.

Definition at line 150 of file VLIWMachineScheduler.h.

References Available, llvm::ConvergingVLIWScheduler::ConvergingVLIWScheduler(), llvm::ConvergingVLIWScheduler::LogMaxQID, and Pending.

Referenced by operator=(), and VLIWSchedBoundary().

◆ ~VLIWSchedBoundary()

ConvergingVLIWScheduler::VLIWSchedBoundary::~VLIWSchedBoundary ( )

Definition at line 340 of file VLIWMachineScheduler.cpp.

References HazardRec, and ResourceModel.

◆ VLIWSchedBoundary() [2/2]

llvm::ConvergingVLIWScheduler::VLIWSchedBoundary::VLIWSchedBoundary ( const VLIWSchedBoundary & other)
delete

References VLIWSchedBoundary().

Member Function Documentation

◆ bumpCycle()

void ConvergingVLIWScheduler::VLIWSchedBoundary::bumpCycle ( )

Move the boundary of scheduled code by one cycle.

Definition at line 384 of file VLIWMachineScheduler.cpp.

References assert(), Available, CheckPending, CurrCycle, llvm::dbgs(), HazardRec, IssueCount, isTop(), LLVM_DEBUG, MinReadyCycle, and SchedModel.

Referenced by bumpNode(), and pickOnlyChoice().

◆ bumpNode()

void ConvergingVLIWScheduler::VLIWSchedBoundary::bumpNode ( SUnit * SU)

Move the boundary of scheduled code by one SUnit.

Definition at line 411 of file VLIWMachineScheduler.cpp.

References bumpCycle(), CurrCycle, llvm::dbgs(), llvm::SUnit::getInstr(), HazardRec, llvm::SUnit::isCall, IssueCount, isTop(), LLVM_DEBUG, ResourceModel, and SchedModel.

◆ checkHazard()

bool ConvergingVLIWScheduler::VLIWSchedBoundary::checkHazard ( SUnit * SU)

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(), HazardRec, IssueCount, llvm::ScheduleHazardRecognizer::NoHazard, and SchedModel.

Referenced by releaseNode(), and releasePending().

◆ init()

void llvm::ConvergingVLIWScheduler::VLIWSchedBoundary::init ( VLIWMachineScheduler * dag,
const TargetSchedModel * smodel )
inline

Definition at line 158 of file VLIWMachineScheduler.h.

References CriticalPathLength, CurrCycle, DAG, IssueCount, isTop(), and SchedModel.

◆ isLatencyBound()

bool llvm::ConvergingVLIWScheduler::VLIWSchedBoundary::isLatencyBound ( SUnit * SU)
inline

◆ isTop()

bool llvm::ConvergingVLIWScheduler::VLIWSchedBoundary::isTop ( ) const
inline

◆ operator=()

VLIWSchedBoundary & llvm::ConvergingVLIWScheduler::VLIWSchedBoundary::operator= ( const VLIWSchedBoundary & other)
delete

References VLIWSchedBoundary().

◆ pickOnlyChoice()

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, bumpCycle(), CheckPending, llvm::getWeakLeft(), HazardRec, isTop(), MaxMinLatency, Pending, releasePending(), and ResourceModel.

◆ releaseNode()

void ConvergingVLIWScheduler::VLIWSchedBoundary::releaseNode ( SUnit * SU,
unsigned ReadyCycle )

Definition at line 369 of file VLIWMachineScheduler.cpp.

References Available, checkHazard(), CurrCycle, MinReadyCycle, and Pending.

◆ releasePending()

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, checkHazard(), CheckPending, CurrCycle, isTop(), MinReadyCycle, Pending, and llvm::SUnit::TopReadyCycle.

Referenced by pickOnlyChoice().

◆ removeReady()

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(), Available, and Pending.

Member Data Documentation

◆ Available

ReadyQueue llvm::ConvergingVLIWScheduler::VLIWSchedBoundary::Available

◆ CheckPending

bool llvm::ConvergingVLIWScheduler::VLIWSchedBoundary::CheckPending = false

Definition at line 133 of file VLIWMachineScheduler.h.

Referenced by bumpCycle(), pickOnlyChoice(), and releasePending().

◆ CriticalPathLength

unsigned llvm::ConvergingVLIWScheduler::VLIWSchedBoundary::CriticalPathLength = 0

Definition at line 140 of file VLIWMachineScheduler.h.

Referenced by init(), and isLatencyBound().

◆ CurrCycle

unsigned llvm::ConvergingVLIWScheduler::VLIWSchedBoundary::CurrCycle = 0

◆ DAG

VLIWMachineScheduler* llvm::ConvergingVLIWScheduler::VLIWSchedBoundary::DAG = nullptr

Definition at line 128 of file VLIWMachineScheduler.h.

Referenced by init().

◆ HazardRec

ScheduleHazardRecognizer* llvm::ConvergingVLIWScheduler::VLIWSchedBoundary::HazardRec = nullptr

◆ IssueCount

unsigned llvm::ConvergingVLIWScheduler::VLIWSchedBoundary::IssueCount = 0

Definition at line 139 of file VLIWMachineScheduler.h.

Referenced by bumpCycle(), bumpNode(), checkHazard(), and init().

◆ MaxMinLatency

unsigned llvm::ConvergingVLIWScheduler::VLIWSchedBoundary::MaxMinLatency = 0

Definition at line 146 of file VLIWMachineScheduler.h.

Referenced by pickOnlyChoice().

◆ MinReadyCycle

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.

Referenced by bumpCycle(), releaseNode(), and releasePending().

◆ Pending

ReadyQueue llvm::ConvergingVLIWScheduler::VLIWSchedBoundary::Pending

◆ ResourceModel

VLIWResourceModel* llvm::ConvergingVLIWScheduler::VLIWSchedBoundary::ResourceModel = nullptr

Definition at line 136 of file VLIWMachineScheduler.h.

Referenced by bumpNode(), pickOnlyChoice(), and ~VLIWSchedBoundary().

◆ SchedModel

const TargetSchedModel* llvm::ConvergingVLIWScheduler::VLIWSchedBoundary::SchedModel = nullptr

Definition at line 129 of file VLIWMachineScheduler.h.

Referenced by bumpCycle(), bumpNode(), checkHazard(), and init().


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