LLVM 20.0.0git
Public Member Functions | Public Attributes | List of all members
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.

◆ ~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

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, llvm::dbgs(), llvm::TargetSchedModel::getIssueWidth(), LLVM_DEBUG, and llvm::ConvergingVLIWScheduler::SchedModel.

◆ bumpNode()

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

◆ 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(), llvm::TargetSchedModel::getIssueWidth(), llvm::TargetSchedModel::getNumMicroOps(), llvm::ScheduleHazardRecognizer::NoHazard, and llvm::ConvergingVLIWScheduler::SchedModel.

◆ init()

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

◆ 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

◆ 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, and llvm::getWeakLeft().

Referenced by llvm::ConvergingVLIWScheduler::pickNode(), and llvm::ConvergingVLIWScheduler::pickNodeBidrectional().

◆ releaseNode()

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

◆ 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, and llvm::SUnit::TopReadyCycle.

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

Referenced by llvm::ConvergingVLIWScheduler::pickNode().

Member Data Documentation

◆ Available

ReadyQueue llvm::ConvergingVLIWScheduler::VLIWSchedBoundary::Available

◆ CheckPending

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

Definition at line 133 of file VLIWMachineScheduler.h.

◆ 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 init().

◆ MaxMinLatency

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

◆ 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.

◆ Pending

ReadyQueue llvm::ConvergingVLIWScheduler::VLIWSchedBoundary::Pending

Definition at line 132 of file VLIWMachineScheduler.h.

Referenced by llvm::ConvergingVLIWScheduler::pickNode().

◆ ResourceModel

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

◆ SchedModel

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

Definition at line 129 of file VLIWMachineScheduler.h.

Referenced by init().


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