• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/llvm-project/llvm/lib/Target/AMDGPU/

Lines Matching defs:SU

38     const SUnit *SU;
42 : SU(SU_), Priority(Priority_) {}
51 bool isScheduled(const SUnit *SU) const {
52 assert(!SU->isBoundaryNode());
53 return NumPreds[SU->NodeNum] == std::numeric_limits<unsigned>::max();
56 void setIsScheduled(const SUnit *SU) {
57 assert(!SU->isBoundaryNode());
58 NumPreds[SU->NodeNum] = std::numeric_limits<unsigned>::max();
61 unsigned getNumPreds(const SUnit *SU) const {
62 assert(!SU->isBoundaryNode());
63 assert(NumPreds[SU->NodeNum] != std::numeric_limits<unsigned>::max());
64 return NumPreds[SU->NodeNum];
67 unsigned decNumPreds(const SUnit *SU) {
68 assert(!SU->isBoundaryNode());
69 assert(NumPreds[SU->NodeNum] != std::numeric_limits<unsigned>::max());
70 return --NumPreds[SU->NodeNum];
75 int getReadySuccessors(const SUnit *SU) const;
76 int getNotReadySuccessors(const SUnit *SU) const;
84 void releaseSuccessors(const SUnit* SU, int Priority);
99 int GCNMinRegScheduler::getReadySuccessors(const SUnit *SU) const {
101 for (auto SDep : SU->Succs) {
106 if (PSU != SU && !isScheduled(PSU)) {
116 int GCNMinRegScheduler::getNotReadySuccessors(const SUnit *SU) const {
117 return SU->Succs.size() - getReadySuccessors(SU);
159 auto SU = C.SU;
160 int Res = getNotReadySuccessors(SU);
161 LLVM_DEBUG(dbgs() << "SU(" << SU->NodeNum << ") would left non-ready "
170 auto SU = C.SU;
171 auto Res = getReadySuccessors(SU);
172 LLVM_DEBUG(dbgs() << "SU(" << SU->NodeNum << ") would make ready " << Res
183 Num = findMax(Num, [=](const Candidate &C) { return -(int64_t)C.SU->NodeNum; });
206 auto SU = Worklist.pop_back_val();
207 assert(!SU->isBoundaryNode());
208 for (const auto &P : SU->Preds) {
214 LLVM_DEBUG(dbgs() << "Make the predecessors of SU(" << SchedSU->NodeNum
218 if (Set.count(C.SU)) {
220 LLVM_DEBUG(dbgs() << " SU(" << C.SU->NodeNum << ')');
226 void GCNMinRegScheduler::releaseSuccessors(const SUnit* SU, int Priority) {
227 for (const auto &S : SU->Succs) {
248 for (auto SU : TopRoots) {
249 RQ.push_back(*new (Alloc.Allocate()) Candidate(SU, StepNo));
259 << ' ' << C.SU->NodeNum << "(P" << C.Priority << ')';
265 auto SU = C->SU;
266 LLVM_DEBUG(dbgs() << "Selected "; DAG.dumpNode(*SU));
268 releaseSuccessors(SU, StepNo);
269 Schedule.push_back(SU);
270 setIsScheduled(SU);
272 if (getReadySuccessors(SU) == 0)
273 bumpPredsPriority(SU, StepNo);