class LatencyPriorityQueue

Declaration

class LatencyPriorityQueue : public SchedulingPriorityQueue { /* full declaration omitted */ };

Description

This interface is used to plug different priorities computation algorithms into the list scheduler. It implements the interface of a standard priority queue, where nodes are inserted in arbitrary order and returned in priority order. The computation of the priority and the representation of the queue are totally up to the implementation to decide.

Declared at: llvm/include/llvm/CodeGen/LatencyPriorityQueue.h:32

Inherits from: SchedulingPriorityQueue

Member Variables

private std::vector<SUnit>* SUnits
private std::vector<unsigned int> NumNodesSolelyBlocking
NumNodesSolelyBlocking - This vector contains, for every node in the Queue, the number of nodes that the node is the sole unscheduled predecessor for. This is used as a tie-breaker heuristic for better mobility.
private std::vector<SUnit*> Queue
Queue - The queue.
private llvm::latency_sort Picker

Method Overview

Inherited from SchedulingPriorityQueue:

Methods

void AdjustPriorityOfUnscheduledPreds(
    llvm::SUnit* SU)

Description

AdjustPriorityOfUnscheduledPreds - One of the predecessors of SU was just scheduled. If SU is not itself available, then there is at least one predecessor node that has not been scheduled yet. If SU has exactly ONE unscheduled predecessor, we want to increase its priority: it getting scheduled will make this node available, so it is better than some other node of the same priority that will not make a node available.

Declared at: llvm/include/llvm/CodeGen/LatencyPriorityQueue.h:97

Parameters

llvm::SUnit* SU

LatencyPriorityQueue()

Declared at: llvm/include/llvm/CodeGen/LatencyPriorityQueue.h:47

void addNode(const llvm::SUnit* SU)

Declared at: llvm/include/llvm/CodeGen/LatencyPriorityQueue.h:57

Parameters

const llvm::SUnit* SU

void dump(llvm::ScheduleDAG* DAG) const

Declared at: llvm/include/llvm/CodeGen/LatencyPriorityQueue.h:87

Parameters

llvm::ScheduleDAG* DAG

bool empty() const

Declared at: llvm/include/llvm/CodeGen/LatencyPriorityQueue.h:78

unsigned int getLatency(
    unsigned int NodeNum) const

Declared at: llvm/include/llvm/CodeGen/LatencyPriorityQueue.h:68

Parameters

unsigned int NodeNum

unsigned int getNumSolelyBlockNodes(
    unsigned int NodeNum) const

Declared at: llvm/include/llvm/CodeGen/LatencyPriorityQueue.h:73

Parameters

unsigned int NodeNum

llvm::SUnit* getSingleUnscheduledPred(
    llvm::SUnit* SU)

Description

getSingleUnscheduledPred - If there is exactly one unscheduled predecessor of SU, return it, otherwise return null.

Declared at: llvm/include/llvm/CodeGen/LatencyPriorityQueue.h:98

Parameters

llvm::SUnit* SU

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

Declared at: llvm/include/llvm/CodeGen/LatencyPriorityQueue.h:52

Parameters

std::vector<SUnit>& sunits

bool isBottomUp() const

Declared at: llvm/include/llvm/CodeGen/LatencyPriorityQueue.h:50

llvm::SUnit* pop()

Declared at: llvm/include/llvm/CodeGen/LatencyPriorityQueue.h:82

void push(llvm::SUnit* U)

Declared at: llvm/include/llvm/CodeGen/LatencyPriorityQueue.h:80

Parameters

llvm::SUnit* U

void releaseState()

Declared at: llvm/include/llvm/CodeGen/LatencyPriorityQueue.h:64

void remove(llvm::SUnit* SU)

Declared at: llvm/include/llvm/CodeGen/LatencyPriorityQueue.h:84

Parameters

llvm::SUnit* SU

void scheduledNode(llvm::SUnit* SU)

Description

As each node is scheduled, this method is invoked. This allows the priority function to adjust the priority of related unscheduled nodes, for example.

Declared at: llvm/include/llvm/CodeGen/LatencyPriorityQueue.h:94

Parameters

llvm::SUnit* SU

void updateNode(const llvm::SUnit* SU)

Declared at: llvm/include/llvm/CodeGen/LatencyPriorityQueue.h:61

Parameters

const llvm::SUnit* SU