Home | History | Annotate | Download | only in CodeGen

Lines Matching full:succ

292   bool shouldPredBlockBeOutlined(MachineBasicBlock *BB, MachineBasicBlock *Succ,
298 hasBetterLayoutPredecessor(MachineBasicBlock *BB, MachineBasicBlock *Succ,
398 for (MachineBasicBlock *Succ : MBB->successors()) {
399 if (BlockFilter && !BlockFilter->count(Succ))
401 BlockChain &SuccChain = *BlockToChain[Succ];
403 if (&Chain == &SuccChain || Succ == LoopHeaderBB)
445 for (MachineBasicBlock *Succ : BB->successors()) {
447 if (Succ->isEHPad() || (BlockFilter && !BlockFilter->count(Succ))) {
450 BlockChain *SuccChain = BlockToChain[Succ];
453 } else if (Succ != *SuccChain->begin()) {
454 DEBUG(dbgs() << " " << getBlockName(Succ) << " -> Mid chain!\n");
459 AdjustedSumProb -= MBPI->getEdgeProbability(BB, Succ);
461 Successors.push_back(Succ);
485 /// checks if the fallthrough candidate block \p Succ (of block
489 /// The caller can choose to select \p Succ as the layout successors
490 /// so that \p Succ's predecessors (optional branches) can be
494 MachineBasicBlock *BB, MachineBasicBlock *Succ, BlockChain &Chain,
499 // If we outline optional branches, look whether Succ is unavoidable, i.e.
502 if (SuccProb > HotProb.getCompl() && UnavoidableBlocks.count(Succ) > 0) {
503 for (MachineBasicBlock *Pred : Succ->predecessors()) {
505 if (Pred == Succ || (BlockFilter && !BlockFilter->count(Pred)) ||
530 /* See case 1 below for the cost analysis. For BB->Succ to
532 * Prob(BB->Succ) > 2* Prob(BB->Pred)
546 /// Checks to see if the layout candidate block \p Succ has a better layout
549 MachineBasicBlock *BB, MachineBasicBlock *Succ, BlockChain &SuccChain,
565 // Succ
566 // In this case, we are evaluating whether to select edge -> Succ, e.g.
567 // set Succ as the layout successor of BB. Picking Succ as BB's
571 // from Pred to Succ, as well as the additional cost asssociated
572 // with the needed unconditional jump instruction from Pred To Succ.
574 // from BB to Succ, so to make BB->Succ a viable candidate, the following
577 // < freq(BB->Succ) * taken_branch_cost.
579 // freq(BB->Succ) > 2 * freq(BB->Pred), i.e.,
580 // prob(BB->Succ) > 2 * prob(BB->Pred)
583 // probabililty threshold that is needed for edge BB->Succ to be considered.
593 // Succ
596 // candidate edge BB->Succ. Edge S->BB is selected because prob(S->BB)
599 // edge BB->Succ instead of laying out with topological order (i.e. laying
600 // Pred first). The cost of S->BB->Succ is 2 * freq (S->Pred), while with
606 // BB->Succ. This is equialant to looking the CFG backward with backward
607 // edge: Prob(Succ->BB) needs to >= HotProb in order to be selected (without
614 DEBUG(dbgs() << " " << getBlockName(Succ) << " -> " << SuccProb
624 for (MachineBasicBlock *Pred : Succ->predecessors()) {
625 if (Pred == Succ || BlockToChain[Pred] == &SuccChain ||
636 // Succ
637 // We select edgee BB->Succ if
638 // freq(BB->Succ) > freq(Succ) * HotProb
639 // i.e. freq(BB->Succ) > freq(BB->Succ) * HotProb + freq(Pred->Succ) *
641 // i.e. freq((BB->Succ) * (1 - HotProb) > freq(Pred->Succ) * HotProb
643 MBFI->getBlockFreq(Pred) * MBPI->getEdgeProbability(Pred, Succ);
651 DEBUG(dbgs() << " " << getBlockName(Succ) << " -> " << SuccProb
682 for (MachineBasicBlock *Succ : Successors) {
683 auto RealSuccProb = MBPI->getEdgeProbability(BB, Succ);
688 if (shouldPredBlockBeOutlined(BB, Succ, Chain, BlockFilter, SuccProb,
690 return Succ;
692 BlockChain &SuccChain = *BlockToChain[Succ];
693 // Skip the edge \c BB->Succ if block \c Succ has a better layout
695 if (hasBetterLayoutPredecessor(BB, Succ, SuccChain, SuccProb, RealSuccProb,
700 dbgs() << " " << getBlockName(Succ) << " -> " << SuccProb
706 BestSucc = Succ;
994 for (MachineBasicBlock *Succ : MBB->successors()) {
995 if (Succ->isEHPad())
997 if (Succ == MBB)
999 BlockChain &SuccChain = *BlockToChain[Succ];
1003 << getBlockName(Succ) << " (chain conflict)\n");
1007 auto SuccProb = MBPI->getEdgeProbability(MBB, Succ);
1008 if (LoopBlockSet.count(Succ)) {
1010 << getBlockName(Succ) << " (" << SuccProb << ")\n");
1016 if (MachineLoop *ExitLoop = MLI->getLoopFor(Succ)) {
1024 << getBlockName(Succ) << " [L:" << SuccLoopDepth << "] (";
1033 (MBB->isLayoutSuccessor(Succ) &&
1090 for (MachineBasicBlock *Succ : Bottom->successors()) {
1091 BlockChain *SuccChain = BlockToChain[Succ];
1092 if (!LoopBlockSet.count(Succ) &&
1093 (!SuccChain || Succ == *SuccChain->begin()))
1164 for (auto *Succ : BB->successors()) {
1165 BlockChain *SuccChain = BlockToChain[Succ];
1166 if (!LoopBlockSet.count(Succ) &&
1167 (!SuccChain || Succ == *SuccChain->begin())) {
1168 auto SuccProb = MBPI->getEdgeProbability(BB, Succ);
1762 for (MachineBasicBlock *Succ : MBB.successors()) {
1764 if (MBB.isLayoutSuccessor(Succ))
1768 BlockFreq * MBPI->getEdgeProbability(&MBB, Succ);