LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | Protected Member Functions | List of all members
llvm::ConvergingVLIWScheduler Class Reference

#include <HexagonMachineScheduler.h>

Inheritance diagram for llvm::ConvergingVLIWScheduler:
Inheritance graph
[legend]
Collaboration diagram for llvm::ConvergingVLIWScheduler:
Collaboration graph
[legend]

Public Types

enum  { TopQID = 1, BotQID = 2, LogMaxQID = 2 }
 SUnit::NodeQueueId: 0 (none), 1 (top), 2 (bot), 3 (both) More...
 

Public Member Functions

 ConvergingVLIWScheduler ()
 
virtual void initialize (ScheduleDAGMI *dag)
 Initialize the strategy after building the DAG for a new region. More...
 
virtual SUnitpickNode (bool &IsTopNode)
 Pick the best node to balance the schedule. Implements MachineSchedStrategy. More...
 
virtual void schedNode (SUnit *SU, bool IsTopNode)
 
virtual void releaseTopNode (SUnit *SU)
 
virtual void releaseBottomNode (SUnit *SU)
 
unsigned ReportPackets ()
 
- Public Member Functions inherited from llvm::MachineSchedStrategy
virtual ~MachineSchedStrategy ()
 
virtual void initPolicy (MachineBasicBlock::iterator Begin, MachineBasicBlock::iterator End, unsigned NumRegionInstrs)
 Optionally override the per-region scheduling policy. More...
 
virtual bool shouldTrackPressure () const
 
virtual void registerRoots ()
 
virtual void scheduleTree (unsigned SubtreeID)
 Scheduler callback to notify that a new subtree is scheduled. More...
 

Protected Member Functions

SUnitpickNodeBidrectional (bool &IsTopNode)
 Pick the best candidate node from either the top or bottom queue. More...
 
int SchedulingCost (ReadyQueue &Q, SUnit *SU, SchedCandidate &Candidate, RegPressureDelta &Delta, bool verbose)
 
CandResult pickNodeFromQueue (ReadyQueue &Q, const RegPressureTracker &RPTracker, SchedCandidate &Candidate)
 
void traceCandidate (const char *Label, const ReadyQueue &Q, SUnit *SU, PressureChange P=PressureChange())
 

Detailed Description

ConvergingVLIWScheduler shrinks the unscheduled zone using heuristics to balance the schedule.

Definition at line 109 of file HexagonMachineScheduler.h.

Member Enumeration Documentation

anonymous enum

SUnit::NodeQueueId: 0 (none), 1 (top), 2 (bot), 3 (both)

Enumerator
TopQID 
BotQID 
LogMaxQID 

Definition at line 200 of file HexagonMachineScheduler.h.

Constructor & Destructor Documentation

llvm::ConvergingVLIWScheduler::ConvergingVLIWScheduler ( )
inline

Definition at line 206 of file HexagonMachineScheduler.h.

Member Function Documentation

void ConvergingVLIWScheduler::initialize ( ScheduleDAGMI DAG)
virtual
SUnit * ConvergingVLIWScheduler::pickNode ( bool IsTopNode)
virtual
SUnit * ConvergingVLIWScheduler::pickNodeBidrectional ( bool IsTopNode)
protected

Pick the best candidate node from either the top or bottom queue.

Definition at line 577 of file HexagonMachineScheduler.cpp.

References llvm::ScheduleDAGMI::getBotRPTracker(), llvm::ScheduleDAGMI::getTopRPTracker(), and pickNodeFromQueue().

Referenced by pickNode().

ConvergingVLIWScheduler::CandResult ConvergingVLIWScheduler::pickNodeFromQueue ( ReadyQueue Q,
const RegPressureTracker RPTracker,
SchedCandidate &  Candidate 
)
protected

Pick the best candidate from the top queue.

TODO: getMaxPressureDelta results can be mostly cached for each SUnit during DAG building. To adjust for the current scheduling location we need to maintain the number of vreg uses remaining to be top-scheduled.

Definition at line 532 of file HexagonMachineScheduler.cpp.

References llvm::ReadyQueue::begin(), DEBUG, llvm::ReadyQueue::dump(), llvm::ReadyQueue::end(), llvm::ScheduleDAGMI::getRegionCriticalPSets(), llvm::ScheduleDAGMI::getRegPressure(), I, llvm::RegisterPressure::MaxSetPressure, SchedulingCost(), and traceCandidate().

Referenced by pickNode(), and pickNodeBidrectional().

void ConvergingVLIWScheduler::releaseBottomNode ( SUnit SU)
virtual

When all successor dependencies have been resolved, free this node for bottom-up scheduling.

Implements llvm::MachineSchedStrategy.

Definition at line 237 of file HexagonMachineScheduler.cpp.

References llvm::SUnit::BotReadyCycle, llvm::SUnit::getInstr(), I, llvm::SUnit::isScheduled, and llvm::SUnit::Succs.

void ConvergingVLIWScheduler::releaseTopNode ( SUnit SU)
virtual

When all predecessor dependencies have been resolved, free this node for top-down scheduling.

Implements llvm::MachineSchedStrategy.

Definition at line 220 of file HexagonMachineScheduler.cpp.

References I, llvm::SUnit::isScheduled, llvm::SUnit::Preds, and llvm::SUnit::TopReadyCycle.

unsigned llvm::ConvergingVLIWScheduler::ReportPackets ( )
inline

Definition at line 219 of file HexagonMachineScheduler.h.

void ConvergingVLIWScheduler::schedNode ( SUnit SU,
bool  IsTopNode 
)
virtual

Update the scheduler's state after scheduling a node. This is the same node that was just returned by pickNode(). However, VLIWMachineScheduler needs to update it's state based on the current cycle before MachineSchedStrategy does.

Implements llvm::MachineSchedStrategy.

Definition at line 683 of file HexagonMachineScheduler.cpp.

References llvm::SUnit::BotReadyCycle, and llvm::SUnit::TopReadyCycle.

int ConvergingVLIWScheduler::SchedulingCost ( ReadyQueue Q,
SUnit SU,
SchedCandidate &  Candidate,
RegPressureDelta Delta,
bool  verbose 
)
protected
void ConvergingVLIWScheduler::traceCandidate ( const char *  Label,
const ReadyQueue Q,
SUnit SU,
PressureChange  P = PressureChange() 
)
protected

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