Lines Matching defs:SU

82   /// AddPred - adds a predecessor edge to SUnit SU.
84 void AddPred(SUnit *SU, const SDep &D) {
85 SU->addPred(D);
88 /// RemovePred - removes a predecessor edge from SUnit SU.
90 void RemovePred(SUnit *SU, const SDep &D) {
91 SU->removePred(D);
95 void ReleasePred(SUnit *SU, SDep *PredEdge);
96 void ReleasePredecessors(SUnit *SU, unsigned CurCycle);
135 void ScheduleDAGFast::ReleasePred(SUnit *SU, SDep *PredEdge) {
156 void ScheduleDAGFast::ReleasePredecessors(SUnit *SU, unsigned CurCycle) {
158 for (SDep &Pred : SU->Preds) {
159 ReleasePred(SU, &Pred);
177 void ScheduleDAGFast::ScheduleNodeBottomUp(SUnit *SU, unsigned CurCycle) {
179 LLVM_DEBUG(dumpNode(*SU));
181 assert(CurCycle >= SU->getHeight() && "Node scheduled below its height!");
182 SU->setHeightToAtLeast(CurCycle);
183 Sequence.push_back(SU);
185 ReleasePredecessors(SU, CurCycle);
188 for (SDep &Succ : SU->Succs) {
192 assert(LiveRegDefs[Succ.getReg()] == SU &&
201 SU->isScheduled = true;
206 SUnit *ScheduleDAGFast::CopyAndMoveSuccessors(SUnit *SU) {
207 if (SU->getNode()->getGluedNode())
210 SDNode *N = SU->getNode();
234 LLVM_DEBUG(dbgs() << "Unfolding SU # " << SU->NodeNum << "\n");
240 unsigned OldNumVals = SU->getNode()->getNumValues();
242 DAG->ReplaceAllUsesOfValueWith(SDValue(SU->getNode(), i), SDValue(N, i));
243 DAG->ReplaceAllUsesOfValueWith(SDValue(SU->getNode(), OldNumVals-1),
278 for (SDep &Pred : SU->Preds) {
287 for (SDep &Succ : SU->Succs) {
295 RemovePred(SU, ChainPred);
300 RemovePred(SU, Pred);
306 RemovePred(SU, Pred);
311 D.setSUnit(SU);
318 D.setSUnit(SU);
337 SU = NewSU;
340 LLVM_DEBUG(dbgs() << "Duplicating SU # " << SU->NodeNum << "\n");
341 NewSU = Clone(SU);
344 for (SDep &Pred : SU->Preds)
351 for (SDep &Succ : SU->Succs) {
359 D.setSUnit(SU);
372 void ScheduleDAGFast::InsertCopiesAndMoveSuccs(SUnit *SU, unsigned Reg,
387 for (SDep &Succ : SU->Succs) {
401 SDep FromDep(SU, SDep::Data, Reg);
402 FromDep.setLatency(SU->Latency);
439 static bool CheckForLiveRegDef(SUnit *SU, unsigned Reg,
452 if (LiveRegDefs[*AI] == SU)
472 bool ScheduleDAGFast::DelayForLiveRegsBottomUp(SUnit *SU,
479 for (SDep &Pred : SU->Preds) {
486 for (SDNode *Node = SU->getNode(); Node; Node = Node->getGluedNode()) {
506 CheckForLiveRegDef(SU, Reg, LiveRegDefs, RegAdded, LRegs, TRI);
518 CheckForLiveRegDef(SU, Reg, LiveRegDefs, RegAdded, LRegs, TRI, SrcNode);
526 CheckForLiveRegDef(SU, Reg, LiveRegDefs, RegAdded, LRegs, TRI);
564 CurSU->isPending = true; // This SU is not in AvailableQueue right now.
605 LLVM_DEBUG(dbgs() << "Adding an edge from SU # " << TrySU->NodeNum
606 << " to SU #" << Copies.front()->NodeNum << "\n");
611 LLVM_DEBUG(dbgs() << "Adding an edge from SU # " << NewDef->NodeNum
612 << " to SU #" << TrySU->NodeNum << "\n");
625 for (SUnit *SU : NotReady) {
626 SU->isPending = false;
628 if (SU->isAvailable)
629 AvailableQueue.push(SU);