LLVM  8.0.1
Classes | Public Member Functions | Friends | List of all members
llvm::SchedDFSResult Class Reference

Compute the values of each DAG node for various metrics during DFS. More...

#include "llvm/CodeGen/ScheduleDFS.h"

Public Member Functions

 SchedDFSResult (bool IsBU, unsigned lim)
 
unsigned getSubtreeLimit () const
 Get the node cutoff before subtrees are considered significant. More...
 
bool empty () const
 Return true if this DFSResult is uninitialized. More...
 
void clear ()
 Clear the results. More...
 
void resize (unsigned NumSUnits)
 Initialize the result data with the size of the DAG. More...
 
void compute (ArrayRef< SUnit > SUnits)
 Compute various metrics for the DAG with given roots. More...
 
unsigned getNumInstrs (const SUnit *SU) const
 Get the number of instructions in the given subtree and its children. More...
 
unsigned getNumSubInstrs (unsigned SubtreeID) const
 Get the number of instructions in the given subtree not including children. More...
 
ILPValue getILP (const SUnit *SU) const
 Get the ILP value for a DAG node. More...
 
unsigned getNumSubtrees () const
 The number of subtrees detected in this DAG. More...
 
unsigned getSubtreeID (const SUnit *SU) const
 Get the ID of the subtree the given DAG node belongs to. More...
 
unsigned getSubtreeLevel (unsigned SubtreeID) const
 Get the connection level of a subtree. More...
 
void scheduleTree (unsigned SubtreeID)
 Scheduler callback to update SubtreeConnectLevels when a tree is initially scheduled. More...
 

Friends

class SchedDFSImpl
 

Detailed Description

Compute the values of each DAG node for various metrics during DFS.

Definition at line 66 of file ScheduleDFS.h.

Constructor & Destructor Documentation

◆ SchedDFSResult()

llvm::SchedDFSResult::SchedDFSResult ( bool  IsBU,
unsigned  lim 
)
inline

Definition at line 117 of file ScheduleDFS.h.

Member Function Documentation

◆ clear()

void llvm::SchedDFSResult::clear ( )
inline

Clear the results.

Definition at line 129 of file ScheduleDFS.h.

References llvm::SmallVectorImpl< T >::clear().

◆ compute()

void SchedDFSResult::compute ( ArrayRef< SUnit SUnits)

◆ empty()

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

Return true if this DFSResult is uninitialized.

resize() initializes DFSResult, while compute() populates it.

Definition at line 126 of file ScheduleDFS.h.

◆ getILP()

ILPValue llvm::SchedDFSResult::getILP ( const SUnit SU) const
inline

Get the ILP value for a DAG node.

A leaf node has an ILP of 1/1.

Definition at line 159 of file ScheduleDFS.h.

References llvm::SUnit::getDepth(), llvm::ILPValue::ILPValue(), and llvm::SUnit::NodeNum.

Referenced by llvm::createGenericSchedPostRA().

◆ getNumInstrs()

unsigned llvm::SchedDFSResult::getNumInstrs ( const SUnit SU) const
inline

Get the number of instructions in the given subtree and its children.

Definition at line 146 of file ScheduleDFS.h.

References llvm::SUnit::NodeNum.

Referenced by llvm::DOTGraphTraits< ScheduleDAGMI * >::getNodeLabel().

◆ getNumSubInstrs()

unsigned llvm::SchedDFSResult::getNumSubInstrs ( unsigned  SubtreeID) const
inline

Get the number of instructions in the given subtree not including children.

Definition at line 152 of file ScheduleDFS.h.

◆ getNumSubtrees()

unsigned llvm::SchedDFSResult::getNumSubtrees ( ) const
inline

The number of subtrees detected in this DAG.

Definition at line 164 of file ScheduleDFS.h.

Referenced by llvm::SchedDFSImpl::finalize().

◆ getSubtreeID()

unsigned llvm::SchedDFSResult::getSubtreeID ( const SUnit SU) const
inline

Get the ID of the subtree the given DAG node belongs to.

For convenience, if DFSResults have not been computed yet, give everything tree ID 0.

Definition at line 170 of file ScheduleDFS.h.

References assert(), llvm::empty(), and llvm::SUnit::NodeNum.

Referenced by llvm::createGenericSchedPostRA(), and llvm::DOTGraphTraits< ScheduleDAGMI * >::getNodeAttributes().

◆ getSubtreeLevel()

unsigned llvm::SchedDFSResult::getSubtreeLevel ( unsigned  SubtreeID) const
inline

Get the connection level of a subtree.

For bottom-up trees, the connection level is the latency depth (in cycles) of the deepest connection to another subtree.

Definition at line 181 of file ScheduleDFS.h.

References llvm::operator<<().

Referenced by llvm::createGenericSchedPostRA().

◆ getSubtreeLimit()

unsigned llvm::SchedDFSResult::getSubtreeLimit ( ) const
inline

Get the node cutoff before subtrees are considered significant.

Definition at line 121 of file ScheduleDFS.h.

◆ resize()

void llvm::SchedDFSResult::resize ( unsigned  NumSUnits)
inline

Initialize the result data with the size of the DAG.

Definition at line 137 of file ScheduleDFS.h.

◆ scheduleTree()

void SchedDFSResult::scheduleTree ( unsigned  SubtreeID)

Scheduler callback to update SubtreeConnectLevels when a tree is initially scheduled.

The root of the given SubtreeID was just scheduled.

For all subtrees connected to this tree, record the depth of the connection so that the nearest connected subtrees can be prioritized.

Definition at line 1429 of file ScheduleDAGInstrs.cpp.

References C, llvm::dbgs(), LLVM_DEBUG, and llvm::max().

Friends And Related Function Documentation

◆ SchedDFSImpl

friend class SchedDFSImpl
friend

Definition at line 67 of file ScheduleDFS.h.


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