class SchedDFSResult

Declaration

class SchedDFSResult { /* full declaration omitted */ };

Description

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

Declared at: llvm/include/llvm/CodeGen/ScheduleDFS.h:65

Member Variables

private bool IsBottomUp
private unsigned int SubtreeLimit
private std::vector<NodeData> DFSNodeData
DFS results for each SUnit in this DAG.
private SmallVector<llvm::SchedDFSResult::TreeData, 16> DFSTreeData
private std::vector<SmallVector<Connection, 4>> SubtreeConnections
private std::vector<unsigned int> SubtreeConnectLevels
Cache the current connection level of each subtree. This mutable array is updated during scheduling.
private static const unsigned int InvalidSubtreeID = ~0U

Method Overview

Methods

SchedDFSResult(bool IsBU, unsigned int lim)

Declared at: llvm/include/llvm/CodeGen/ScheduleDFS.h:116

Parameters

bool IsBU
unsigned int lim

void clear()

Description

Clear the results.

Declared at: llvm/include/llvm/CodeGen/ScheduleDFS.h:128

void compute(ArrayRef<llvm::SUnit> SUnits)

Description

Compute various metrics for the DAG with given roots.

Declared at: llvm/include/llvm/CodeGen/ScheduleDFS.h:141

Parameters

ArrayRef<llvm::SUnit> SUnits

bool empty() const

Description

Return true if this DFSResult is uninitialized. resize() initializes DFSResult, while compute() populates it.

Declared at: llvm/include/llvm/CodeGen/ScheduleDFS.h:125

llvm::ILPValue getILP(const llvm::SUnit* SU) const

Description

Get the ILP value for a DAG node. A leaf node has an ILP of 1/1.

Declared at: llvm/include/llvm/CodeGen/ScheduleDFS.h:158

Parameters

const llvm::SUnit* SU

unsigned int getNumInstrs(
    const llvm::SUnit* SU) const

Description

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

Declared at: llvm/include/llvm/CodeGen/ScheduleDFS.h:145

Parameters

const llvm::SUnit* SU

unsigned int getNumSubInstrs(
    unsigned int SubtreeID) const

Description

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

Declared at: llvm/include/llvm/CodeGen/ScheduleDFS.h:151

Parameters

unsigned int SubtreeID

unsigned int getNumSubtrees() const

Description

The number of subtrees detected in this DAG.

Declared at: llvm/include/llvm/CodeGen/ScheduleDFS.h:163

unsigned int getSubtreeID(
    const llvm::SUnit* SU) const

Description

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.

Declared at: llvm/include/llvm/CodeGen/ScheduleDFS.h:169

Parameters

const llvm::SUnit* SU

unsigned int getSubtreeLevel(
    unsigned int SubtreeID) const

Description

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.

Declared at: llvm/include/llvm/CodeGen/ScheduleDFS.h:180

Parameters

unsigned int SubtreeID

unsigned int getSubtreeLimit() const

Description

Get the node cutoff before subtrees are considered significant.

Declared at: llvm/include/llvm/CodeGen/ScheduleDFS.h:120

void resize(unsigned int NumSUnits)

Description

Initialize the result data with the size of the DAG.

Declared at: llvm/include/llvm/CodeGen/ScheduleDFS.h:136

Parameters

unsigned int NumSUnits

void scheduleTree(unsigned int SubtreeID)

Description

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

Declared at: llvm/include/llvm/CodeGen/ScheduleDFS.h:186

Parameters

unsigned int SubtreeID