• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/llvm-project/llvm/lib/Target/AArch64/

Lines Matching defs:Head

59 STATISTIC(NumHeadBranchRejs, "Number of ccmps rejected (Head branch)");
84 // From: Head To: Head
94 // The Head block is terminated by a br.cond instruction, and the CmpBB block
98 // compare, and merges CmpBB into Head, speculatively executing its
109 // Head:
121 // Head:
129 // The ccmp condition code is the one that would cause the Head terminator to
133 // between Head and Tail, just like if-converting a diamond.
148 MachineBasicBlock *Head;
150 /// The block containing cmp+br.cond with a successor shared with Head.
153 /// The common successor for Head and CmpBB.
160 /// The branch condition in Head as determined by analyzeBranch.
163 /// The condition code that makes Head branch to CmpBB.
214 // Check that all PHIs in Tail are selecting the same value from Head and CmpBB.
215 // This means that no if-conversion is required when merging CmpBB into Head.
225 if (MBB == Head) {
241 // removing the CmpBB operands. The Head operands will be identical.
439 Head = MBB;
442 if (Head->succ_size() != 2)
444 MachineBasicBlock *Succ0 = Head->succ_begin()[0];
445 MachineBasicBlock *Succ1 = Head->succ_begin()[1];
462 LLVM_DEBUG(dbgs() << "\nTriangle: " << printMBBReference(*Head) << " -> "
485 // CmpBB should never have PHIs since Head is its only predecessor.
502 if (TII->analyzeBranch(*Head, TBB, FBB, HeadCond)) {
503 LLVM_DEBUG(dbgs() << "Head branch not analyzable.\n");
512 dbgs() << "analyzeBranch didn't find conditional branch in Head.\n");
518 LLVM_DEBUG(dbgs() << "Unsupported branch type on Head\n");
553 LLVM_DEBUG(dbgs() << "Head->CmpBB on "
571 << printMBBReference(*Head) << ":\n"
574 // All CmpBB instructions are moved into Head, and CmpBB is deleted.
580 BranchProbability Head2CmpBB = MBPI->getEdgeProbability(Head, CmpBB);
583 Head->removeSuccessor(CmpBB);
586 // If Head and CmpBB had successor probabilties, udpate the probabilities to
588 if (Head->hasSuccessorProbabilities() && CmpBB->hasSuccessorProbabilities()) {
590 // Head is allowed two successors. We've removed CmpBB, so the remaining
594 // Pr(Tail|Head) += Pr(CmpBB|Head) * Pr(Tail|CmpBB).
595 assert(*Head->succ_begin() == Tail && "Head successor is not Tail");
596 BranchProbability Head2Tail = MBPI->getEdgeProbability(Head, Tail);
597 Head->setSuccProbability(Head->succ_begin(),
600 // We will transfer successors of CmpBB to Head in a moment without
604 // Pr(I|Head) = Pr(CmpBB|Head) * Pr(I|CmpBB).
611 Head->transferSuccessorsAndUpdatePHIs(CmpBB);
612 DebugLoc TermDL = Head->getFirstTerminator()->getDebugLoc();
613 TII->removeBranch(*Head);
615 // If the Head terminator was one of the cbz / tbz branches with built-in
630 llvm_unreachable("Cannot convert Head branch");
637 BuildMI(*Head, Head->end(), TermDL, MCID)
647 Head->splice(Head->end(), CmpBB, CmpBB->begin(), CmpBB->end());
684 // Head would have branched to CmpBB.
685 // The NZCV immediate operand should provide flags for the case where Head
686 // would have branched to Tail. These flags should cause the new Head
695 MachineInstrBuilder MIB = BuildMI(*Head, CmpMI, CmpMI->getDebugLoc(), MCID)
704 // This now becomes a Head terminator.
708 BuildMI(*Head, CmpMI, CmpMI->getDebugLoc(), TII->get(AArch64::Bcc))
713 Head->updateTerminator(CmpBB->getNextNode());
717 LLVM_DEBUG(dbgs() << "Result:\n" << *Head);
723 // If the Head terminator was one of the cbz / tbz branches with built-in
736 llvm_unreachable("Cannot convert Head branch");
741 // into Head, but we do not save any instruction.
823 // convert() removes CmpBB which was previously dominated by Head.
824 // CmpBB children should be transferred to Head.
825 MachineDomTreeNode *HeadNode = DomTree->getNode(CmpConv.Head);
829 assert(Node->getIDom() == HeadNode && "CmpBB should be dominated by Head");
847 Traces->invalidate(CmpConv.Head);
861 // Head dominates CmpBB, so it is always included in its trace.
889 Trace.getInstrCycles(*CmpConv.Head->getFirstTerminator()).Depth;
892 LLVM_DEBUG(dbgs() << "Head depth: " << HeadDepth
906 // merge into the Head block. The Head critical path should dominate the