Lines Matching defs:Tail

74 //             Tail                       Tail
77 // Head block, and phis in the Tail block are converted to select instructions.
90 MachineBasicBlock *Tail;
99 /// equal to Tail.
100 bool isTriangle() const { return TBB == Tail || FBB == Tail; }
102 /// Returns the Tail predecessor for the True side.
103 MachineBasicBlock *getTPred() const { return TBB == Tail ? Head : TBB; }
105 /// Returns the Tail predecessor for the False side.
106 MachineBasicBlock *getFPred() const { return FBB == Tail ? Head : FBB; }
108 /// Information about each phi in the Tail block.
146 /// Replace PHI instructions in Tail with selects.
341 TBB = FBB = Tail = 0;
355 Tail = Succ0->succ_begin()[0];
358 if (Tail != Succ1) {
361 Succ1->succ_begin()[0] != Tail)
366 << " -> BB#" << Tail->getNumber() << '\n');
369 if (!Tail->livein_empty()) {
370 DEBUG(dbgs() << "Tail has live-ins.\n");
376 << " -> BB#" << Tail->getNumber() << '\n');
380 // If Tail doesn't have any phis, there must be side effects.
381 if (Tail->empty() || !Tail->front().isPHI()) {
407 for (MachineBasicBlock::iterator I = Tail->begin(), E = Tail->end();
432 if (TBB != Tail && !canSpeculateInstrs(TBB))
434 if (FBB != Tail && !canSpeculateInstrs(FBB))
450 /// This is possible when the only Tail predecessors are the if-converted
453 assert(Tail->pred_size() == 2 && "Cannot replace PHIs");
470 /// rewritePHIOperands - When there are additional Tail predecessors, insert
472 /// Keep the PHI instructions in Tail to handle the other predecessors.
508 assert(Head && Tail && TBB && FBB && "Call canConvertIf first.");
517 if (TBB != Tail)
519 if (FBB != Tail)
522 // Are there extra Tail predecessors?
523 bool ExtraPreds = Tail->pred_size() != 2;
532 if (TBB != Tail)
533 TBB->removeSuccessor(Tail);
534 if (FBB != Tail)
535 FBB->removeSuccessor(Tail);
543 // through to Tail, and we can join the two blocks.
544 if (TBB != Tail) {
548 if (FBB != Tail) {
554 if (!ExtraPreds && Head->isLayoutSuccessor(Tail)) {
555 // Splice Tail onto the end of Head.
556 DEBUG(dbgs() << "Joining tail BB#" << Tail->getNumber()
558 Head->splice(Head->end(), Tail,
559 Tail->begin(), Tail->end());
560 Head->transferSuccessorsAndUpdatePHIs(Tail);
561 RemovedBlocks.push_back(Tail);
562 Tail->eraseFromParent();
564 // We need a branch to Tail, let code placement work it out later.
567 TII->InsertBranch(*Head, Tail, 0, EmptyCond, HeadDL);
568 Head->addSuccessor(Tail);
630 // convertIf can remove TBB, FBB, and Tail can be merged into Head.
632 // Tail children should be transferred to Head.
638 assert(Node->getBlock() == IfConv.Tail && "Unexpected children");
659 Traces->invalidate(IfConv.Tail);
696 if (IfConv.TBB != IfConv.Tail)
716 MachineTraceMetrics::Trace TailTrace = MinInstr->getTrace(IfConv.Tail);