Lines Matching refs:su
86 /// AddPred - adds a predecessor edge to SUnit SU.
88 void AddPred(SUnit *SU, const SDep &D) {
89 SU->addPred(D);
92 /// RemovePred - removes a predecessor edge from SUnit SU.
94 void RemovePred(SUnit *SU, const SDep &D) {
95 SU->removePred(D);
99 void ReleasePred(SUnit *SU, SDep *PredEdge);
100 void ReleasePredecessors(SUnit *SU, unsigned CurCycle);
127 DEBUG(for (unsigned su = 0, e = SUnits.size(); su != e; ++su)
128 SUnits[su].dumpAll(this));
140 void ScheduleDAGFast::ReleasePred(SUnit *SU, SDep *PredEdge) {
161 void ScheduleDAGFast::ReleasePredecessors(SUnit *SU, unsigned CurCycle) {
163 for (SUnit::pred_iterator I = SU->Preds.begin(), E = SU->Preds.end();
165 ReleasePred(SU, &*I);
183 void ScheduleDAGFast::ScheduleNodeBottomUp(SUnit *SU, unsigned CurCycle) {
185 DEBUG(SU->dump(this));
187 assert(CurCycle >= SU->getHeight() && "Node scheduled below its height!");
188 SU->setHeightToAtLeast(CurCycle);
189 Sequence.push_back(SU);
191 ReleasePredecessors(SU, CurCycle);
194 for (SUnit::succ_iterator I = SU->Succs.begin(), E = SU->Succs.end();
199 assert(LiveRegDefs[I->getReg()] == SU &&
208 SU->isScheduled = true;
213 SUnit *ScheduleDAGFast::CopyAndMoveSuccessors(SUnit *SU) {
214 if (SU->getNode()->getGluedNode())
217 SDNode *N = SU->getNode();
242 DEBUG(dbgs() << "Unfolding SU # " << SU->NodeNum << "\n");
248 unsigned OldNumVals = SU->getNode()->getNumValues();
250 DAG->ReplaceAllUsesOfValueWith(SDValue(SU->getNode(), i), SDValue(N, i));
251 DAG->ReplaceAllUsesOfValueWith(SDValue(SU->getNode(), OldNumVals-1),
286 for (SUnit::pred_iterator I = SU->Preds.begin(), E = SU->Preds.end();
296 for (SUnit::succ_iterator I = SU->Succs.begin(), E = SU->Succs.end();
305 RemovePred(SU, ChainPred);
311 RemovePred(SU, Pred);
318 RemovePred(SU, Pred);
324 D.setSUnit(SU);
332 D.setSUnit(SU);
351 SU = NewSU;
354 DEBUG(dbgs() << "Duplicating SU # " << SU->NodeNum << "\n");
355 NewSU = Clone(SU);
358 for (SUnit::pred_iterator I = SU->Preds.begin(), E = SU->Preds.end();
366 for (SUnit::succ_iterator I = SU->Succs.begin(), E = SU->Succs.end();
375 D.setSUnit(SU);
388 void ScheduleDAGFast::InsertCopiesAndMoveSuccs(SUnit *SU, unsigned Reg,
403 for (SUnit::succ_iterator I = SU->Succs.begin(), E = SU->Succs.end();
418 SDep FromDep(SU, SDep::Data, Reg);
419 FromDep.setLatency(SU->Latency);
449 static bool CheckForLiveRegDef(SUnit *SU, unsigned Reg,
456 if (LiveRegDefs[*AI] && LiveRegDefs[*AI] != SU) {
470 bool ScheduleDAGFast::DelayForLiveRegsBottomUp(SUnit *SU,
477 for (SUnit::pred_iterator I = SU->Preds.begin(), E = SU->Preds.end();
485 for (SDNode *Node = SU->getNode(); Node; Node = Node->getGluedNode()) {
505 CheckForLiveRegDef(SU, Reg, LiveRegDefs, RegAdded, LRegs, TRI);
518 CheckForLiveRegDef(SU, *Reg, LiveRegDefs, RegAdded, LRegs, TRI);
557 CurSU->isPending = true; // This SU is not in AvailableQueue right now.
598 DEBUG(dbgs() << "Adding an edge from SU # " << TrySU->NodeNum
599 << " to SU #" << Copies.front()->NodeNum << "\n");
604 DEBUG(dbgs() << "Adding an edge from SU # " << NewDef->NodeNum
605 << " to SU #" << TrySU->NodeNum << "\n");