LLVM  8.0.1
Public Member Functions | List of all members
llvm::ResourcePriorityQueue Class Reference

#include "llvm/CodeGen/ResourcePriorityQueue.h"

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

Public Member Functions

 ResourcePriorityQueue (SelectionDAGISel *IS)
 
bool isBottomUp () const override
 
void initNodes (std::vector< SUnit > &sunits) override
 Initialize nodes. More...
 
void addNode (const SUnit *SU) override
 
void updateNode (const SUnit *SU) override
 
void releaseState () override
 
unsigned getLatency (unsigned NodeNum) const
 
unsigned getNumSolelyBlockNodes (unsigned NodeNum) const
 
int SUSchedulingCost (SUnit *SU)
 Single cost function reflecting benefit of scheduling SU in the current cycle. More...
 
void initNumRegDefsLeft (SUnit *SU)
 InitNumRegDefsLeft - Determine the # of regs defined by this node. More...
 
void updateNumRegDefsLeft (SUnit *SU)
 
int regPressureDelta (SUnit *SU, bool RawPressure=false)
 Estimates change in reg pressure from this SU. More...
 
int rawRegPressureDelta (SUnit *SU, unsigned RCId)
 
bool empty () const override
 
void push (SUnit *U) override
 
SUnitpop () override
 Main access point - returns next instructions to be placed in scheduling sequence. More...
 
void remove (SUnit *SU) override
 
void scheduledNode (SUnit *SU) override
 scheduledNode - Main resource tracking point. More...
 
bool isResourceAvailable (SUnit *SU)
 Check if scheduling of this SU is possible in the current packet. More...
 
void reserveResources (SUnit *SU)
 Keep track of available resources. More...
 
- Public Member Functions inherited from llvm::SchedulingPriorityQueue
 SchedulingPriorityQueue (bool rf=false)
 
virtual ~SchedulingPriorityQueue ()=default
 
bool hasReadyFilter () const
 
virtual bool tracksRegPressure () const
 
virtual bool isReady (SUnit *) const
 
void push_all (const std::vector< SUnit *> &Nodes)
 
virtual void dump (ScheduleDAG *) const
 
virtual void unscheduledNode (SUnit *)
 
void setCurCycle (unsigned Cycle)
 
unsigned getCurCycle () const
 

Detailed Description

Definition at line 38 of file ResourcePriorityQueue.h.

Constructor & Destructor Documentation

◆ ResourcePriorityQueue()

ResourcePriorityQueue::ResourcePriorityQueue ( SelectionDAGISel IS)

Member Function Documentation

◆ addNode()

void llvm::ResourcePriorityQueue::addNode ( const SUnit SU)
inlineoverridevirtual

Implements llvm::SchedulingPriorityQueue.

Definition at line 84 of file ResourcePriorityQueue.h.

◆ empty()

bool llvm::ResourcePriorityQueue::empty ( ) const
inlineoverridevirtual

Implements llvm::SchedulingPriorityQueue.

Definition at line 115 of file ResourcePriorityQueue.h.

Referenced by pop().

◆ getLatency()

unsigned llvm::ResourcePriorityQueue::getLatency ( unsigned  NodeNum) const
inline

Definition at line 94 of file ResourcePriorityQueue.h.

References assert().

◆ getNumSolelyBlockNodes()

unsigned llvm::ResourcePriorityQueue::getNumSolelyBlockNodes ( unsigned  NodeNum) const
inline

Definition at line 99 of file ResourcePriorityQueue.h.

References assert().

◆ initNodes()

void ResourcePriorityQueue::initNodes ( std::vector< SUnit > &  sunits)
overridevirtual

Initialize nodes.

Implements llvm::SchedulingPriorityQueue.

Definition at line 162 of file ResourcePriorityQueue.cpp.

References initNumRegDefsLeft(), and llvm::SUnit::NodeQueueId.

◆ initNumRegDefsLeft()

void ResourcePriorityQueue::initNumRegDefsLeft ( SUnit SU)

InitNumRegDefsLeft - Determine the # of regs defined by this node.

Definition at line 532 of file ResourcePriorityQueue.cpp.

References llvm::ISD::CopyFromReg, llvm::MCInstrInfo::get(), llvm::SUnit::getNode(), llvm::MCInstrDesc::getNumDefs(), llvm::ISD::INLINEASM, llvm::SUnit::isAvailable, N, llvm::SUnit::NumRegDefsLeft, and push().

Referenced by initNodes().

◆ isBottomUp()

bool llvm::ResourcePriorityQueue::isBottomUp ( ) const
inlineoverridevirtual

Implements llvm::SchedulingPriorityQueue.

Definition at line 80 of file ResourcePriorityQueue.h.

◆ isResourceAvailable()

bool ResourcePriorityQueue::isResourceAvailable ( SUnit SU)

Check if scheduling of this SU is possible in the current packet.

Definition at line 238 of file ResourcePriorityQueue.cpp.

References llvm::MCInstrInfo::get(), llvm::SDNode::getGluedNode(), llvm::SDNode::getMachineOpcode(), llvm::SUnit::getNode(), and llvm::SDNode::isMachineOpcode().

Referenced by reserveResources(), and SUSchedulingCost().

◆ pop()

SUnit * ResourcePriorityQueue::pop ( )
overridevirtual

Main access point - returns next instructions to be placed in scheduling sequence.

Implements llvm::SchedulingPriorityQueue.

Definition at line 583 of file ResourcePriorityQueue.cpp.

References DisableDFASched, E, empty(), I, SUSchedulingCost(), and std::swap().

◆ push()

void ResourcePriorityQueue::push ( SUnit U)
overridevirtual

◆ rawRegPressureDelta()

int ResourcePriorityQueue::rawRegPressureDelta ( SUnit SU,
unsigned  RCId 
)

◆ regPressureDelta()

int ResourcePriorityQueue::regPressureDelta ( SUnit SU,
bool  RawPressure = false 
)

Estimates change in reg pressure from this SU.

It is achieved by trivial tracking of defined and used vregs in dependent instructions. The RawPressure flag makes this function to ignore existing reg file sizes, and report raw def/use balance.

Definition at line 352 of file ResourcePriorityQueue.cpp.

References llvm::SUnit::getNode(), llvm::SDNode::isMachineOpcode(), rawRegPressureDelta(), and llvm::TargetRegisterInfo::regclasses().

Referenced by SUSchedulingCost().

◆ releaseState()

void llvm::ResourcePriorityQueue::releaseState ( )
inlineoverridevirtual

Implements llvm::SchedulingPriorityQueue.

Definition at line 90 of file ResourcePriorityQueue.h.

◆ remove()

void ResourcePriorityQueue::remove ( SUnit SU)
overridevirtual

Implements llvm::SchedulingPriorityQueue.

Definition at line 615 of file ResourcePriorityQueue.cpp.

References assert(), llvm::find(), I, and std::swap().

◆ reserveResources()

void ResourcePriorityQueue::reserveResources ( SUnit SU)

◆ scheduledNode()

void ResourcePriorityQueue::scheduledNode ( SUnit SU)
overridevirtual

◆ SUSchedulingCost()

int ResourcePriorityQueue::SUSchedulingCost ( SUnit SU)

◆ updateNode()

void llvm::ResourcePriorityQueue::updateNode ( const SUnit SU)
inlineoverridevirtual

Implements llvm::SchedulingPriorityQueue.

Definition at line 88 of file ResourcePriorityQueue.h.

◆ updateNumRegDefsLeft()

void llvm::ResourcePriorityQueue::updateNumRegDefsLeft ( SUnit SU)

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