Lines Matching refs:SU
167 SUnit *SU = WorkList.pop_back_val();
168 SU->isDepthCurrent = false;
169 for (SUnit::const_succ_iterator I = SU->Succs.begin(),
170 E = SU->Succs.end(); I != E; ++I) {
183 SUnit *SU = WorkList.pop_back_val();
184 SU->isHeightCurrent = false;
185 for (SUnit::const_pred_iterator I = SU->Preds.begin(),
186 E = SU->Preds.end(); I != E; ++I) {
286 dbgs() << "SU(" << NodeNum << "): ";
311 dbgs() << "SU(" << I->getSUnit()->NodeNum << ")";
331 dbgs() << "SU(" << I->getSUnit()->NodeNum << ")";
433 SUnit *SU = &SUnits[i];
434 int NodeNum = SU->NodeNum;
435 unsigned Degree = SU->Succs.size();
441 assert(SU->Succs.empty() && "SUnit should have no successors");
443 WorkList.push_back(SU);
449 SUnit *SU = WorkList.back();
451 Allocate(SU->NodeNum, --Id);
452 for (SUnit::const_pred_iterator I = SU->Preds.begin(), E = SU->Preds.end();
454 SUnit *SU = I->getSUnit();
455 if (!--Node2Index[SU->NodeNum])
458 WorkList.push_back(SU);
467 SUnit *SU = &SUnits[i];
468 for (SUnit::const_pred_iterator I = SU->Preds.begin(), E = SU->Preds.end();
470 assert(Node2Index[SU->NodeNum] > Node2Index[I->getSUnit()->NodeNum] &&
502 /// DFS - Make a DFS traversal to mark all nodes reachable from SU and mark
505 void ScheduleDAGTopologicalSort::DFS(const SUnit *SU, int UpperBound,
510 WorkList.push_back(SU);
512 SU = WorkList.back();
514 Visited.set(SU->NodeNum);
515 for (int I = SU->Succs.size()-1; I >= 0; --I) {
516 int s = SU->Succs[I].getSUnit()->NodeNum;
523 WorkList.push_back(SU->Succs[I].getSUnit());
557 /// WillCreateCycle - Returns true if adding an edge from SU to TargetSU will
559 bool ScheduleDAGTopologicalSort::WillCreateCycle(SUnit *SU, SUnit *TargetSU) {
560 if (IsReachable(TargetSU, SU))
562 for (SUnit::pred_iterator I = SU->Preds.begin(), E = SU->Preds.end();
570 /// IsReachable - Checks if SU is reachable from TargetSU.
571 bool ScheduleDAGTopologicalSort::IsReachable(const SUnit *SU,
573 // If insertion of the edge SU->TargetSU would create a cycle
574 // then there is a path from TargetSU to SU.
577 UpperBound = Node2Index[SU->NodeNum];
579 // Is Ord(TargetSU) < Ord(SU) ?
582 // There may be a path from TargetSU to SU. Check for it.