Lines Matching refs:SU
88 void AddPred(SUnit *SU, const SDep &D) { in AddPred() argument
89 SU->addPred(D); in AddPred()
94 void RemovePred(SUnit *SU, const SDep &D) { in RemovePred() argument
95 SU->removePred(D); in RemovePred()
99 void ReleasePred(SUnit *SU, SDep *PredEdge);
100 void ReleasePredecessors(SUnit *SU, unsigned CurCycle);
140 void ScheduleDAGFast::ReleasePred(SUnit *SU, SDep *PredEdge) { in ReleasePred() argument
161 void ScheduleDAGFast::ReleasePredecessors(SUnit *SU, unsigned CurCycle) { in ReleasePredecessors() argument
163 for (SUnit::pred_iterator I = SU->Preds.begin(), E = SU->Preds.end(); in ReleasePredecessors()
165 ReleasePred(SU, &*I); in ReleasePredecessors()
183 void ScheduleDAGFast::ScheduleNodeBottomUp(SUnit *SU, unsigned CurCycle) { in ScheduleNodeBottomUp() argument
185 DEBUG(SU->dump(this)); in ScheduleNodeBottomUp()
187 assert(CurCycle >= SU->getHeight() && "Node scheduled below its height!"); in ScheduleNodeBottomUp()
188 SU->setHeightToAtLeast(CurCycle); in ScheduleNodeBottomUp()
189 Sequence.push_back(SU); in ScheduleNodeBottomUp()
191 ReleasePredecessors(SU, CurCycle); in ScheduleNodeBottomUp()
194 for (SUnit::succ_iterator I = SU->Succs.begin(), E = SU->Succs.end(); in ScheduleNodeBottomUp()
199 assert(LiveRegDefs[I->getReg()] == SU && in ScheduleNodeBottomUp()
208 SU->isScheduled = true; in ScheduleNodeBottomUp()
213 SUnit *ScheduleDAGFast::CopyAndMoveSuccessors(SUnit *SU) { in CopyAndMoveSuccessors() argument
214 if (SU->getNode()->getGluedNode()) in CopyAndMoveSuccessors()
217 SDNode *N = SU->getNode(); in CopyAndMoveSuccessors()
241 DEBUG(dbgs() << "Unfolding SU # " << SU->NodeNum << "\n"); in CopyAndMoveSuccessors()
247 unsigned OldNumVals = SU->getNode()->getNumValues(); in CopyAndMoveSuccessors()
249 DAG->ReplaceAllUsesOfValueWith(SDValue(SU->getNode(), i), SDValue(N, i)); in CopyAndMoveSuccessors()
250 DAG->ReplaceAllUsesOfValueWith(SDValue(SU->getNode(), OldNumVals-1), in CopyAndMoveSuccessors()
285 for (SUnit::pred_iterator I = SU->Preds.begin(), E = SU->Preds.end(); in CopyAndMoveSuccessors()
295 for (SUnit::succ_iterator I = SU->Succs.begin(), E = SU->Succs.end(); in CopyAndMoveSuccessors()
304 RemovePred(SU, ChainPred); in CopyAndMoveSuccessors()
310 RemovePred(SU, Pred); in CopyAndMoveSuccessors()
317 RemovePred(SU, Pred); in CopyAndMoveSuccessors()
323 D.setSUnit(SU); in CopyAndMoveSuccessors()
331 D.setSUnit(SU); in CopyAndMoveSuccessors()
350 SU = NewSU; in CopyAndMoveSuccessors()
353 DEBUG(dbgs() << "Duplicating SU # " << SU->NodeNum << "\n"); in CopyAndMoveSuccessors()
354 NewSU = Clone(SU); in CopyAndMoveSuccessors()
357 for (SUnit::pred_iterator I = SU->Preds.begin(), E = SU->Preds.end(); in CopyAndMoveSuccessors()
365 for (SUnit::succ_iterator I = SU->Succs.begin(), E = SU->Succs.end(); in CopyAndMoveSuccessors()
374 D.setSUnit(SU); in CopyAndMoveSuccessors()
387 void ScheduleDAGFast::InsertCopiesAndMoveSuccs(SUnit *SU, unsigned Reg, in InsertCopiesAndMoveSuccs() argument
402 for (SUnit::succ_iterator I = SU->Succs.begin(), E = SU->Succs.end(); in InsertCopiesAndMoveSuccs()
417 SDep FromDep(SU, SDep::Data, Reg); in InsertCopiesAndMoveSuccs()
418 FromDep.setLatency(SU->Latency); in InsertCopiesAndMoveSuccs()
454 static bool CheckForLiveRegDef(SUnit *SU, unsigned Reg, in CheckForLiveRegDef() argument
461 if (LiveRegDefs[*AI] && LiveRegDefs[*AI] != SU) { in CheckForLiveRegDef()
475 bool ScheduleDAGFast::DelayForLiveRegsBottomUp(SUnit *SU, in DelayForLiveRegsBottomUp() argument
482 for (SUnit::pred_iterator I = SU->Preds.begin(), E = SU->Preds.end(); in DelayForLiveRegsBottomUp()
490 for (SDNode *Node = SU->getNode(); Node; Node = Node->getGluedNode()) { in DelayForLiveRegsBottomUp()
510 CheckForLiveRegDef(SU, Reg, LiveRegDefs, RegAdded, LRegs, TRI); in DelayForLiveRegsBottomUp()
523 CheckForLiveRegDef(SU, *Reg, LiveRegDefs, RegAdded, LRegs, TRI); in DelayForLiveRegsBottomUp()