Lines Matching defs:SU
23 SUnit *SU;
26 : SU(SU_) {}
40 unsigned getNodePriority(const SUnit *SU) const;
47 void releasePredecessors(const SUnit* SU);
58 CalcNodeSethiUllmanNumber(const SUnit *SU, std::vector<unsigned> &SUNumbers) {
59 unsigned &SethiUllmanNumber = SUNumbers[SU->NodeNum];
64 for (const SDep &Pred : SU->Preds) {
86 unsigned GCNILPScheduler::getNodePriority(const SUnit *SU) const {
87 assert(SU->NodeNum < SUNumbers.size());
88 if (SU->NumSuccs == 0 && SU->NumPreds != 0)
89 // If SU does not have a register use, i.e. it doesn't produce a value
96 if (SU->NumPreds == 0 && SU->NumSuccs != 0)
97 // If SU does not have a register def, schedule it close to its uses
101 return SUNumbers[SU->NodeNum];
106 static unsigned closestSucc(const SUnit *SU) {
108 for (const SDep &Succ : SU->Succs) {
121 static unsigned calcMaxScratches(const SUnit *SU) {
123 for (const SDep &Pred : SU->Preds) {
151 LLVM_DEBUG(dbgs() << " Comparing latency of SU (" << left->NodeNum
152 << ") depth " << LDepth << " vs SU (" << right->NodeNum
171 LLVM_DEBUG(dbgs() << "Depth of SU(" << left->NodeNum << "): "
172 << left->getDepth() << " != SU(" << right->NodeNum
243 const auto *NewBestSU = pickBest(Best->SU, I->SU);
244 if (NewBestSU != Best->SU) {
245 assert(NewBestSU == I->SU);
257 if (C.SU->getHeight() <= CurCycle) {
260 C.SU->NodeQueueId = CurQueueId++;
273 void GCNILPScheduler::releasePredecessors(const SUnit* SU) {
274 for (const auto &PredEdge : SU->Preds) {
280 PredSU->setHeightToAtLeast(SU->getHeight() + PredEdge.getLatency());
297 for (const SUnit &SU : SUnits)
298 SUSavedCopy[SU.NodeNum] = SU;
301 for (const SUnit &SU : SUnits)
302 CalcNodeSethiUllmanNumber(&SU, SUNumbers);
304 for (const auto *SU : BotRoots) {
306 *new (Alloc.Allocate()) Candidate(const_cast<SUnit*>(SU)));
317 return C1.SU->getHeight() < C2.SU->getHeight();
318 })->SU;
328 << ' ' << C.SU->NodeNum;
334 auto *SU = C->SU;
335 LLVM_DEBUG(dbgs() << "Selected "; DAG.dumpNode(*SU));
337 advanceToCycle(SU->getHeight());
339 releasePredecessors(SU);
340 Schedule.push_back(SU);
341 SU->isScheduled = true;
348 for (auto &SU : SUnits)
349 SU = SUSavedCopy[SU.NodeNum];