Lines Matching defs:SU

223     SUnit *SU = WorkList.pop_back_val();
224 SU->isDepthCurrent = false;
225 for (SDep &SuccDep : SU->Succs) {
238 SUnit *SU = WorkList.pop_back_val();
239 SU->isHeightCurrent = false;
240 for (SDep &PredDep : SU->Preds) {
357 LLVM_DUMP_METHOD void ScheduleDAG::dumpNodeName(const SUnit &SU) const {
358 if (&SU == &EntrySU)
360 else if (&SU == &ExitSU)
363 dbgs() << "SU(" << SU.NodeNum << ")";
366 LLVM_DUMP_METHOD void ScheduleDAG::dumpNodeAll(const SUnit &SU) const {
367 dumpNode(SU);
368 SU.dumpAttributes();
369 if (SU.Preds.size() > 0) {
371 for (const SDep &Dep : SU.Preds) {
379 if (SU.Succs.size() > 0) {
381 for (const SDep &Dep : SU.Succs) {
483 for (SUnit &SU : SUnits) {
484 int NodeNum = SU.NodeNum;
485 unsigned Degree = SU.Succs.size();
491 assert(SU.Succs.empty() && "SUnit should have no successors");
493 WorkList.push_back(&SU);
499 SUnit *SU = WorkList.back();
501 if (SU->NodeNum < DAGSize)
502 Allocate(SU->NodeNum, --Id);
503 for (const SDep &PredDep : SU->Preds) {
504 SUnit *SU = PredDep.getSUnit();
505 if (SU->NodeNum < DAGSize && !--Node2Index[SU->NodeNum])
508 WorkList.push_back(SU);
517 for (SUnit &SU : SUnits) {
518 for (const SDep &PD : SU.Preds) {
519 assert(Node2Index[SU.NodeNum] > Node2Index[PD.getSUnit()->NodeNum] &&
573 void ScheduleDAGTopologicalSort::DFS(const SUnit *SU, int UpperBound,
578 WorkList.push_back(SU);
580 SU = WorkList.back();
582 Visited.set(SU->NodeNum);
583 for (const SDep &SuccDep : llvm::reverse(SU->Succs)) {
622 const SUnit *SU = WorkList.back();
624 for (const SDep &SD : llvm::reverse(SU->Succs)) {
656 const SUnit *SU = WorkList.back();
658 for (const SDep &SD : llvm::reverse(SU->Preds)) {
706 bool ScheduleDAGTopologicalSort::WillCreateCycle(SUnit *TargetSU, SUnit *SU) {
708 // Is SU reachable from TargetSU via successor edges?
709 if (IsReachable(SU, TargetSU))
713 IsReachable(SU, PredDep.getSUnit()))
718 void ScheduleDAGTopologicalSort::AddSUnitWithoutPredecessors(const SUnit *SU) {
719 assert(SU->NodeNum == Index2Node.size() && "Node cannot be added at the end");
720 assert(SU->NumPreds == 0 && "Can only add SU's with no predecessors");
722 Index2Node.push_back(SU->NodeNum);
726 bool ScheduleDAGTopologicalSort::IsReachable(const SUnit *SU,
729 assert(SU != nullptr && "Invalid SUnit");
731 // If insertion of the edge SU->TargetSU would create a cycle
732 // then there is a path from TargetSU to SU.
735 UpperBound = Node2Index[SU->NodeNum];
737 // Is Ord(TargetSU) < Ord(SU) ?
740 // There may be a path from TargetSU to SU. Check for it.