LLVM  6.0.0svn
Public Types | Public Member Functions | List of all members
llvm::ReadyQueue Class Reference

Helpers for implementing custom MachineSchedStrategy classes. More...

#include "llvm/CodeGen/MachineScheduler.h"

Public Types

using iterator = std::vector< SUnit * >::iterator
 

Public Member Functions

 ReadyQueue (unsigned id, const Twine &name)
 
unsigned getID () const
 
StringRef getName () const
 
bool isInQueue (SUnit *SU) const
 
bool empty () const
 
void clear ()
 
unsigned size () const
 
iterator begin ()
 
iterator end ()
 
ArrayRef< SUnit * > elements ()
 
iterator find (SUnit *SU)
 
void push (SUnit *SU)
 
iterator remove (iterator I)
 
void dump () const
 

Detailed Description

Helpers for implementing custom MachineSchedStrategy classes.

These take care of the book-keeping associated with list scheduling heuristics.ReadyQueue encapsulates vector of "ready" SUnits with basic convenience methods for pushing and removing nodes. ReadyQueue's are uniquely identified by an ID. SUnit::NodeQueueId is a mask of the ReadyQueues the SUnit is in.

This is a convenience class that may be used by implementations of MachineSchedStrategy.

Definition at line 535 of file MachineScheduler.h.

Member Typedef Documentation

◆ iterator

using llvm::ReadyQueue::iterator = std::vector<SUnit*>::iterator

Definition at line 556 of file MachineScheduler.h.

Constructor & Destructor Documentation

◆ ReadyQueue()

llvm::ReadyQueue::ReadyQueue ( unsigned  id,
const Twine name 
)
inline

Definition at line 541 of file MachineScheduler.h.

Member Function Documentation

◆ begin()

iterator llvm::ReadyQueue::begin ( )
inline

◆ clear()

void llvm::ReadyQueue::clear ( )
inline

Definition at line 552 of file MachineScheduler.h.

◆ dump()

LLVM_DUMP_METHOD void ReadyQueue::dump ( ) const

◆ elements()

ArrayRef<SUnit*> llvm::ReadyQueue::elements ( )
inline

Definition at line 562 of file MachineScheduler.h.

Referenced by llvm::GenericSchedulerBase::setPolicy().

◆ empty()

bool llvm::ReadyQueue::empty ( ) const
inline

Definition at line 550 of file MachineScheduler.h.

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

◆ end()

iterator llvm::ReadyQueue::end ( )
inline

◆ find()

iterator llvm::ReadyQueue::find ( SUnit SU)
inline

Definition at line 564 of file MachineScheduler.h.

References llvm::find().

◆ getID()

unsigned llvm::ReadyQueue::getID ( ) const
inline

◆ getName()

StringRef llvm::ReadyQueue::getName ( ) const
inline

◆ isInQueue()

bool llvm::ReadyQueue::isInQueue ( SUnit SU) const
inline

Definition at line 548 of file MachineScheduler.h.

References llvm::SUnit::NodeQueueId.

◆ push()

void llvm::ReadyQueue::push ( SUnit SU)
inline

Definition at line 566 of file MachineScheduler.h.

References llvm::SUnit::NodeQueueId.

◆ remove()

iterator llvm::ReadyQueue::remove ( iterator  I)
inline

Definition at line 571 of file MachineScheduler.h.

References llvm::dump(), and I.

◆ size()

unsigned llvm::ReadyQueue::size ( ) const
inline

Definition at line 554 of file MachineScheduler.h.


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