Lines Matching defs:Head

61 STATISTIC(NumHeadBranchRejs, "Number of ccmps rejected (Head branch)");
86 // From: Head To: Head
96 // The Head block is terminated by a br.cond instruction, and the CmpBB block
100 // compare, and merges CmpBB into Head, speculatively executing its
111 // Head:
123 // Head:
131 // The ccmp condition code is the one that would cause the Head terminator to
135 // between Head and Tail, just like if-converting a diamond.
149 MachineBasicBlock *Head;
151 /// The block containing cmp+br.cond with a successor shared with Head.
154 /// The common successor for Head and CmpBB.
161 /// The branch condition in Head as determined by AnalyzeBranch.
164 /// The condition code that makes Head branch to CmpBB.
213 // Check that all PHIs in Tail are selecting the same value from Head and CmpBB.
214 // This means that no if-conversion is required when merging CmpBB into Head.
224 if (MBB == Head) {
240 // removing the CmpBB operands. The Head operands will be identical.
437 Head = MBB;
440 if (Head->succ_size() != 2)
442 MachineBasicBlock *Succ0 = Head->succ_begin()[0];
443 MachineBasicBlock *Succ1 = Head->succ_begin()[1];
460 DEBUG(dbgs() << "\nTriangle: BB#" << Head->getNumber() << " -> BB#"
482 // CmpBB should never have PHIs since Head is its only predecessor.
499 if (TII->AnalyzeBranch(*Head, TBB, FBB, HeadCond)) {
500 DEBUG(dbgs() << "Head branch not analyzable.\n");
508 DEBUG(dbgs() << "AnalyzeBranch didn't find conditional branch in Head.\n");
514 DEBUG(dbgs() << "Unsupported branch type on Head\n");
548 DEBUG(dbgs() << "Head->CmpBB on " << AArch64CC::getCondCodeName(HeadCmpBBCC)
565 << Head->getNumber() << ":\n" << *CmpBB);
567 // All CmpBB instructions are moved into Head, and CmpBB is deleted.
570 Head->removeSuccessor(CmpBB);
572 Head->transferSuccessorsAndUpdatePHIs(CmpBB);
573 DebugLoc TermDL = Head->getFirstTerminator()->getDebugLoc();
574 TII->RemoveBranch(*Head);
576 // If the Head terminator was one of the cbz / tbz branches with built-in
591 llvm_unreachable("Cannot convert Head branch");
598 BuildMI(*Head, Head->end(), TermDL, MCID)
608 Head->splice(Head->end(), CmpBB, CmpBB->begin(), CmpBB->end());
645 // Head would have branched to CmpBB.
646 // The NZCV immediate operand should provide flags for the case where Head
647 // would have branched to Tail. These flags should cause the new Head
657 BuildMI(*Head, CmpMI, CmpMI->getDebugLoc(), MCID)
666 // This now becomes a Head terminator.
670 BuildMI(*Head, CmpMI, CmpMI->getDebugLoc(), TII->get(AArch64::Bcc))
675 Head->updateTerminator();
679 DEBUG(dbgs() << "Result:\n" << *Head);
685 // If the Head terminator was one of the cbz / tbz branches with built-in
698 llvm_unreachable("Cannot convert Head branch");
703 // into Head, but we do not save any instruction.
786 // convert() removes CmpBB which was previously dominated by Head.
787 // CmpBB children should be transferred to Head.
788 MachineDomTreeNode *HeadNode = DomTree->getNode(CmpConv.Head);
792 assert(Node->getIDom() == HeadNode && "CmpBB should be dominated by Head");
810 Traces->invalidate(CmpConv.Head);
824 // Head dominates CmpBB, so it is always included in its trace.
852 Trace.getInstrCycles(CmpConv.Head->getFirstTerminator()).Depth;
855 DEBUG(dbgs() << "Head depth: " << HeadDepth
869 // merge into the Head block. The Head critical path should dominate the