Home | History | Annotate | Download | only in CodeGen

Lines Matching refs:Head

69 //   Triangle: Head              Diamond: Head
78 // Head block, and phis in the Tail block are converted to select instructions.
88 MachineBasicBlock *Head;
104 MachineBasicBlock *getTPred() const { return TBB == Tail ? Head : TBB; }
107 MachineBasicBlock *getFPred() const { return FBB == Tail ? Head : FBB; }
126 /// Instructions in Head that define values used by the conditional blocks.
136 /// Insertion point in Head for speculatively executed instructions form TBB
144 /// Find a valid insertion point in Head.
179 /// If instructions use any values that are defined in the head basic block,
228 // Check for any dependencies on Head instructions.
246 if (!DefMI || DefMI->getParent() != Head)
260 /// Find an insertion point in Head for the speculated instructions. The
275 MachineBasicBlock::iterator FirstTerm = Head->getFirstTerminator();
276 MachineBasicBlock::iterator I = Head->end();
277 MachineBasicBlock::iterator B = Head->begin();
341 Head = MBB;
344 if (Head->succ_size() != 2)
346 MachineBasicBlock *Succ0 = Head->succ_begin()[0];
347 MachineBasicBlock *Succ1 = Head->succ_begin()[1];
364 DEBUG(dbgs() << "\nDiamond: BB#" << Head->getNumber()
375 DEBUG(dbgs() << "\nTriangle: BB#" << Head->getNumber()
389 if (TII->AnalyzeBranch(*Head, TBB, FBB, Cond)) {
423 if (!TII->canInsertSelect(*Head, Cond, PI.TReg, PI.FReg,
439 // head basic block.
455 MachineBasicBlock::iterator FirstTerm = Head->getFirstTerminator();
456 assert(FirstTerm != Head->end() && "No terminators");
464 TII->insertSelect(*Head, FirstTerm, HeadDL, DstReg, Cond, PI.TReg, PI.FReg);
472 /// select instructions in Head and rewrite PHI operands to use the selects.
475 MachineBasicBlock::iterator FirstTerm = Head->getFirstTerminator();
476 assert(FirstTerm != Head->end() && "No terminators");
492 TII->insertSelect(*Head, FirstTerm, HeadDL,
497 // Rewrite PHI operands TPred -> (DstReg, Head), remove FPred.
501 PI.PHI->getOperand(i-1).setMBB(Head);
518 assert(Head && Tail && TBB && FBB && "Call canConvertIf first.");
526 // Move all instructions into Head, except for the terminators.
528 Head->splice(InsertionPoint, TBB, TBB->begin(), TBB->getFirstTerminator());
530 Head->splice(InsertionPoint, FBB, FBB->begin(), FBB->getFirstTerminator());
539 // Fix up the CFG, temporarily leave Head without any successors.
540 Head->removeSuccessor(TBB);
541 Head->removeSuccessor(FBB, true);
547 // Fix up Head's terminators.
549 DebugLoc HeadDL = Head->getFirstTerminator()->getDebugLoc();
550 TII->RemoveBranch(*Head);
552 // Erase the now empty conditional blocks. It is likely that Head can fall
563 assert(Head->succ_empty() && "Additional head successors?");
564 if (!ExtraPreds && Head->isLayoutSuccessor(Tail)) {
565 // Splice Tail onto the end of Head.
567 << " into head BB#" << Head->getNumber() << '\n');
568 Head->splice(Head->end(), Tail,
570 Head->transferSuccessorsAndUpdatePHIs(Tail);
577 TII->InsertBranch(*Head, Tail, nullptr, EmptyCond, HeadDL);
578 Head->addSuccessor(Tail);
580 DEBUG(dbgs() << *Head);
640 // convertIf can remove TBB, FBB, and Tail can be merged into Head.
642 // Tail children should be transferred to Head.
643 MachineDomTreeNode *HeadNode = DomTree->getNode(IfConv.Head);
646 assert(Node != HeadNode && "Cannot erase the head node");
668 Traces->invalidate(IfConv.Head);
716 // Assume that the depth of the first head terminator will also be the depth
719 MachineTraceMetrics::Trace HeadTrace = MinInstr->getTrace(IfConv.Head);
721 HeadTrace.getInstrCycles(IfConv.Head->getFirstTerminator()).Depth;
807 // blocks, but only blocks dominated by the head block. This makes it safe to