15#ifndef LLVM_CODEGEN_LATENCYPRIORITYQUEUE_H
16#define LLVM_CODEGEN_LATENCYPRIORITYQUEUE_H
19#include "llvm/Config/llvm-config.h"
22 class LatencyPriorityQueue;
34 std::vector<SUnit> *SUnits =
nullptr;
40 std::vector<unsigned> NumNodesSolelyBlocking;
43 std::vector<SUnit*> Queue;
52 void initNodes(std::vector<SUnit> &sunits)
override {
54 NumNodesSolelyBlocking.resize(SUnits->size(), 0);
58 NumNodesSolelyBlocking.resize(SUnits->size(), 0);
69 assert(NodeNum < (*SUnits).size());
70 return (*SUnits)[NodeNum].getHeight();
74 assert(NodeNum < NumNodesSolelyBlocking.size());
75 return NumNodesSolelyBlocking[NodeNum];
78 bool empty()
const override {
return Queue.empty(); }
86#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
97 void AdjustPriorityOfUnscheduledPreds(
SUnit *SU);
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
unsigned getNumSolelyBlockNodes(unsigned NodeNum) const
void releaseState() override
void push(SUnit *U) override
LLVM_DUMP_METHOD void dump(ScheduleDAG *DAG) const override
void remove(SUnit *SU) override
void scheduledNode(SUnit *SU) override
As each node is scheduled, this method is invoked.
void addNode(const SUnit *SU) override
void initNodes(std::vector< SUnit > &sunits) override
unsigned getLatency(unsigned NodeNum) const
bool empty() const override
void updateNode(const SUnit *SU) override
bool isBottomUp() const override
Scheduling unit. This is a node in the scheduling DAG.
This interface is used to plug different priorities computation algorithms into the list scheduler.
This is an optimization pass for GlobalISel generic memory operations.
Sorting functions for the Available queue.
latency_sort(LatencyPriorityQueue *pq)
LatencyPriorityQueue * PQ
bool operator()(const SUnit *LHS, const SUnit *RHS) const