• Home
  • Raw
  • Download

Lines Matching refs:Succ

468       const MachineBasicBlock *BB, const MachineBasicBlock *Succ,
527 const MachineBasicBlock *BB, const MachineBasicBlock *Succ,
551 const MachineBasicBlock *BB, MachineBasicBlock *Succ,
643 for (MachineBasicBlock *Succ : MBB->successors()) { in markBlockSuccessors()
644 if (BlockFilter && !BlockFilter->count(Succ)) in markBlockSuccessors()
646 BlockChain &SuccChain = *BlockToChain[Succ]; in markBlockSuccessors()
648 if (&Chain == &SuccChain || Succ == LoopHeaderBB) in markBlockSuccessors()
690 for (MachineBasicBlock *Succ : BB->successors()) { in collectViableSuccessors()
692 if (Succ->isEHPad() || (BlockFilter && !BlockFilter->count(Succ))) { in collectViableSuccessors()
695 BlockChain *SuccChain = BlockToChain[Succ]; in collectViableSuccessors()
698 } else if (Succ != *SuccChain->begin()) { in collectViableSuccessors()
699 LLVM_DEBUG(dbgs() << " " << getBlockName(Succ) in collectViableSuccessors()
705 AdjustedSumProb -= MBPI->getEdgeProbability(BB, Succ); in collectViableSuccessors()
707 Successors.push_back(Succ); in collectViableSuccessors()
738 for (MachineBasicBlock *Succ : BB.successors()) in hasSameSuccessors()
739 if (!Successors.count(Succ)) in hasSameSuccessors()
777 const MachineBasicBlock *BB, const MachineBasicBlock *Succ, in isProfitableToTailDup() argument
807 collectViableSuccessors(Succ, Chain, BlockFilter, SuccSuccs); in isProfitableToTailDup()
808 BranchProbability PProb = MBPI->getEdgeProbability(BB, Succ); in isProfitableToTailDup()
810 auto SuccFreq = MBFI->getBlockFreq(Succ); in isProfitableToTailDup()
822 auto Prob = MBPI->getEdgeProbability(Succ, SuccSucc); in isProfitableToTailDup()
826 if (MPDT->dominates(SuccSucc, Succ)) { in isProfitableToTailDup()
834 for (MachineBasicBlock *SuccPred : Succ->predecessors()) { in isProfitableToTailDup()
835 if (SuccPred == Succ || SuccPred == BB in isProfitableToTailDup()
840 * MBPI->getEdgeProbability(SuccPred, Succ); in isProfitableToTailDup()
865 if (PDom == nullptr || !Succ->isSuccessor(PDom)) { in isProfitableToTailDup()
875 BranchProbability UProb = MBPI->getEdgeProbability(Succ, PDom); in isProfitableToTailDup()
910 !hasBetterLayoutPredecessor(Succ, PDom, *BlockToChain[PDom], UProb, UProb, in isProfitableToTailDup()
944 for (MachineBasicBlock *Succ : ViableSuccs) { in isTrellis()
946 for (auto SuccPred : Succ->predecessors()) { in isTrellis()
957 PredChain == &Chain || PredChain == BlockToChain[Succ]) in isTrellis()
1044 for (auto Succ : ViableSuccs) { in getBestTrellisSuccessor() local
1045 for (MachineBasicBlock *SuccPred : Succ->predecessors()) { in getBestTrellisSuccessor()
1050 BlockToChain[SuccPred] == BlockToChain[Succ]) in getBestTrellisSuccessor()
1053 MBPI->getEdgeProbability(SuccPred, Succ); in getBestTrellisSuccessor()
1054 Edges[SuccIndex].push_back({EdgeFreq, SuccPred, Succ}); in getBestTrellisSuccessor()
1111 const MachineBasicBlock *BB, MachineBasicBlock *Succ, in canTailDuplicateUnplacedPreds() argument
1113 if (!shouldTailDuplicate(Succ)) in canTailDuplicateUnplacedPreds()
1124 for (MachineBasicBlock *Pred : Succ->predecessors()) { in canTailDuplicateUnplacedPreds()
1131 if (!TailDup.canTailDuplicate(Succ, Pred)) { in canTailDuplicateUnplacedPreds()
1186 if (Succ->succ_size() == 0) in canTailDuplicateUnplacedPreds()
1210 if ((NumDup > Succ->succ_size()) || !Duplicate) in canTailDuplicateUnplacedPreds()
1265 for (MachineBasicBlock *Succ : BB.successors()) { in precomputeTriangleChains()
1266 if (!MPDT->dominates(Succ, &BB)) in precomputeTriangleChains()
1268 PDom = Succ; in precomputeTriangleChains()
1378 const MachineBasicBlock *BB, const MachineBasicBlock *Succ, in hasBetterLayoutPredecessor() argument
1507 for (MachineBasicBlock *Pred : Succ->predecessors()) { in hasBetterLayoutPredecessor()
1509 if (Pred == Succ || PredChain == &SuccChain || in hasBetterLayoutPredecessor()
1531 MBFI->getBlockFreq(Pred) * MBPI->getEdgeProbability(Pred, Succ); in hasBetterLayoutPredecessor()
1539 LLVM_DEBUG(dbgs() << " Not a candidate: " << getBlockName(Succ) << " -> " in hasBetterLayoutPredecessor()
1577 MachineBasicBlock *Succ = FoundEdge->second.BB; in selectBestSuccessor() local
1579 BlockChain *SuccChain = BlockToChain[Succ]; in selectBestSuccessor()
1580 if (BB->isSuccessor(Succ) && (!BlockFilter || BlockFilter->count(Succ)) && in selectBestSuccessor()
1581 SuccChain != &Chain && Succ == *SuccChain->begin()) in selectBestSuccessor()
1596 for (MachineBasicBlock *Succ : Successors) { in selectBestSuccessor()
1597 auto RealSuccProb = MBPI->getEdgeProbability(BB, Succ); in selectBestSuccessor()
1601 BlockChain &SuccChain = *BlockToChain[Succ]; in selectBestSuccessor()
1604 if (hasBetterLayoutPredecessor(BB, Succ, SuccChain, SuccProb, RealSuccProb, in selectBestSuccessor()
1607 if (allowTailDupPlacement() && shouldTailDuplicate(Succ)) in selectBestSuccessor()
1608 DupCandidates.emplace_back(SuccProb, Succ); in selectBestSuccessor()
1613 dbgs() << " Candidate: " << getBlockName(Succ) in selectBestSuccessor()
1624 BestSucc.BB = Succ; in selectBestSuccessor()
1639 MachineBasicBlock *Succ; in selectBestSuccessor() local
1640 std::tie(DupProb, Succ) = Tup; in selectBestSuccessor()
1643 if (canTailDuplicateUnplacedPreds(BB, Succ, Chain, BlockFilter) in selectBestSuccessor()
1644 && (isProfitableToTailDup(BB, Succ, BestProb, Chain, BlockFilter))) { in selectBestSuccessor()
1645 LLVM_DEBUG(dbgs() << " Candidate: " << getBlockName(Succ) in selectBestSuccessor()
1648 BestSucc.BB = Succ; in selectBestSuccessor()
1906 for (MachineBasicBlock *Succ : Pred->successors()) { in TopFallThroughFreq()
1907 auto SuccProb = MBPI->getEdgeProbability(Pred, Succ); in TopFallThroughFreq()
1908 BlockChain *SuccChain = BlockToChain[Succ]; in TopFallThroughFreq()
1911 if (!LoopBlockSet.count(Succ) && (SuccProb > TopProb) && in TopFallThroughFreq()
1912 (!SuccChain || Succ == *SuccChain->begin())) { in TopFallThroughFreq()
1984 for (MachineBasicBlock *Succ : BestPred->successors()) { in FallThroughGains()
1985 if ((Succ == NewTop) || (Succ == BestPred) || !LoopBlockSet.count(Succ)) in FallThroughGains()
1987 if (ComputedEdges.find(Succ) != ComputedEdges.end()) in FallThroughGains()
1989 BlockChain *SuccChain = BlockToChain[Succ]; in FallThroughGains()
1990 if ((SuccChain && (Succ != *SuccChain->begin())) || in FallThroughGains()
1994 MBPI->getEdgeProbability(BestPred, Succ); in FallThroughGains()
2178 for (MachineBasicBlock *Succ : MBB->successors()) { in findBestLoopExit()
2179 if (Succ->isEHPad()) in findBestLoopExit()
2181 if (Succ == MBB) in findBestLoopExit()
2183 BlockChain &SuccChain = *BlockToChain[Succ]; in findBestLoopExit()
2187 << getBlockName(Succ) << " (chain conflict)\n"); in findBestLoopExit()
2191 auto SuccProb = MBPI->getEdgeProbability(MBB, Succ); in findBestLoopExit()
2192 if (LoopBlockSet.count(Succ)) { in findBestLoopExit()
2194 << getBlockName(Succ) << " (" << SuccProb << ")\n"); in findBestLoopExit()
2200 if (MachineLoop *ExitLoop = MLI->getLoopFor(Succ)) { in findBestLoopExit()
2208 << getBlockName(Succ) << " [L:" << SuccLoopDepth in findBestLoopExit()
2218 (MBB->isLayoutSuccessor(Succ) && in findBestLoopExit()
2272 for (MachineBasicBlock *Succ : Pred->successors()) { in hasViableTopFallthrough()
2273 auto SuccProb = MBPI->getEdgeProbability(Pred, Succ); in hasViableTopFallthrough()
2274 BlockChain *SuccChain = BlockToChain[Succ]; in hasViableTopFallthrough()
2277 if ((!SuccChain || Succ == *SuccChain->begin()) && SuccProb > TopProb) { in hasViableTopFallthrough()
2315 for (MachineBasicBlock *Succ : Bottom->successors()) { in rotateLoop()
2316 BlockChain *SuccChain = BlockToChain[Succ]; in rotateLoop()
2317 if (!LoopBlockSet.count(Succ) && in rotateLoop()
2318 (!SuccChain || Succ == *SuccChain->begin())) in rotateLoop()
2424 for (auto *Succ : BB->successors()) { in rotateLoopWithProfile() local
2425 BlockChain *SuccChain = BlockToChain[Succ]; in rotateLoopWithProfile()
2426 if (!LoopBlockSet.count(Succ) && in rotateLoopWithProfile()
2427 (!SuccChain || Succ == *SuccChain->begin())) { in rotateLoopWithProfile()
2428 auto SuccProb = MBPI->getEdgeProbability(BB, Succ); in rotateLoopWithProfile()
3124 for (MachineBasicBlock *Succ : Pred->successors()) in isBestSuccessor()
3125 if (Succ != BB) { in isBestSuccessor()
3126 if (BlockFilter && !BlockFilter->count(Succ)) in isBestSuccessor()
3128 BlockChain *SuccChain = BlockToChain[Succ]; in isBestSuccessor()
3129 if (SuccChain && (Succ != *SuccChain->begin())) in isBestSuccessor()
3131 BranchProbability SuccProb = MBPI->getEdgeProbability(Pred, Succ); in isBestSuccessor()
3463 for (MachineBasicBlock *Succ : MBB.successors()) { in INITIALIZE_PASS_DEPENDENCY()
3465 if (MBB.isLayoutSuccessor(Succ)) in INITIALIZE_PASS_DEPENDENCY()
3469 BlockFreq * MBPI->getEdgeProbability(&MBB, Succ); in INITIALIZE_PASS_DEPENDENCY()