Lines Matching refs:SU
223 SUnit *SU = WorkList.pop_back_val(); in setDepthDirty() local
224 SU->isDepthCurrent = false; in setDepthDirty()
225 for (SDep &SuccDep : SU->Succs) { in setDepthDirty()
238 SUnit *SU = WorkList.pop_back_val(); in setHeightDirty() local
239 SU->isHeightCurrent = false; in setHeightDirty()
240 for (SDep &PredDep : SU->Preds) { in setHeightDirty()
357 LLVM_DUMP_METHOD void ScheduleDAG::dumpNodeName(const SUnit &SU) const { in dumpNodeName()
358 if (&SU == &EntrySU) in dumpNodeName()
360 else if (&SU == &ExitSU) in dumpNodeName()
363 dbgs() << "SU(" << SU.NodeNum << ")"; in dumpNodeName()
366 LLVM_DUMP_METHOD void ScheduleDAG::dumpNodeAll(const SUnit &SU) const { in dumpNodeAll()
367 dumpNode(SU); in dumpNodeAll()
368 SU.dumpAttributes(); in dumpNodeAll()
369 if (SU.Preds.size() > 0) { in dumpNodeAll()
371 for (const SDep &Dep : SU.Preds) { in dumpNodeAll()
379 if (SU.Succs.size() > 0) { in dumpNodeAll()
381 for (const SDep &Dep : SU.Succs) { in dumpNodeAll()
483 for (SUnit &SU : SUnits) { in InitDAGTopologicalSorting()
484 int NodeNum = SU.NodeNum; in InitDAGTopologicalSorting()
485 unsigned Degree = SU.Succs.size(); in InitDAGTopologicalSorting()
491 assert(SU.Succs.empty() && "SUnit should have no successors"); in InitDAGTopologicalSorting()
493 WorkList.push_back(&SU); in InitDAGTopologicalSorting()
499 SUnit *SU = WorkList.back(); in InitDAGTopologicalSorting() local
501 if (SU->NodeNum < DAGSize) in InitDAGTopologicalSorting()
502 Allocate(SU->NodeNum, --Id); in InitDAGTopologicalSorting()
503 for (const SDep &PredDep : SU->Preds) { in InitDAGTopologicalSorting()
504 SUnit *SU = PredDep.getSUnit(); in InitDAGTopologicalSorting() local
505 if (SU->NodeNum < DAGSize && !--Node2Index[SU->NodeNum]) in InitDAGTopologicalSorting()
508 WorkList.push_back(SU); in InitDAGTopologicalSorting()
517 for (SUnit &SU : SUnits) { in InitDAGTopologicalSorting()
518 for (const SDep &PD : SU.Preds) { in InitDAGTopologicalSorting()
519 assert(Node2Index[SU.NodeNum] > Node2Index[PD.getSUnit()->NodeNum] && in InitDAGTopologicalSorting()
573 void ScheduleDAGTopologicalSort::DFS(const SUnit *SU, int UpperBound, in DFS() argument
578 WorkList.push_back(SU); in DFS()
580 SU = WorkList.back(); in DFS()
582 Visited.set(SU->NodeNum); in DFS()
583 for (const SDep &SuccDep : llvm::reverse(SU->Succs)) { in DFS()
622 const SUnit *SU = WorkList.back(); in GetSubGraph() local
624 for (const SDep &SD : llvm::reverse(SU->Succs)) { in GetSubGraph()
656 const SUnit *SU = WorkList.back(); in GetSubGraph() local
658 for (const SDep &SD : llvm::reverse(SU->Preds)) { in GetSubGraph()
706 bool ScheduleDAGTopologicalSort::WillCreateCycle(SUnit *TargetSU, SUnit *SU) { in WillCreateCycle() argument
709 if (IsReachable(SU, TargetSU)) in WillCreateCycle()
713 IsReachable(SU, PredDep.getSUnit())) in WillCreateCycle()
718 void ScheduleDAGTopologicalSort::AddSUnitWithoutPredecessors(const SUnit *SU) { in AddSUnitWithoutPredecessors() argument
719 assert(SU->NodeNum == Index2Node.size() && "Node cannot be added at the end"); in AddSUnitWithoutPredecessors()
720 assert(SU->NumPreds == 0 && "Can only add SU's with no predecessors"); in AddSUnitWithoutPredecessors()
722 Index2Node.push_back(SU->NodeNum); in AddSUnitWithoutPredecessors()
726 bool ScheduleDAGTopologicalSort::IsReachable(const SUnit *SU, in IsReachable() argument
729 assert(SU != nullptr && "Invalid SUnit"); in IsReachable()
735 UpperBound = Node2Index[SU->NodeNum]; in IsReachable()