Lines Matching full:successors
437 /// blocks and their successors through the pass.
475 SmallVector<MachineBasicBlock *, 4> &Successors);
652 /// Mark a chain's successors as having one fewer preds.
655 /// quickly walk the successors of each block in the chain and mark them as
656 /// having one fewer active predecessor. It also adds any successors of this
661 // Walk all the blocks in this chain, marking their successors as having in markChainSuccessors()
668 /// Mark a single block's successors as having one fewer preds.
677 // Add any successors for which this is the only un-placed in-loop in markBlockSuccessors()
681 for (MachineBasicBlock *Succ : MBB->successors()) { in markBlockSuccessors()
703 /// This helper function collects the set of successors of block
704 /// \p BB that are allowed to be its layout successors, and return
710 SmallVector<MachineBasicBlock *, 4> &Successors) { in collectViableSuccessors() argument
728 for (MachineBasicBlock *Succ : BB->successors()) { in collectViableSuccessors()
745 Successors.push_back(Succ); in collectViableSuccessors()
767 /// Check if \p BB has exactly the successors in \p Successors.
770 SmallPtrSetImpl<const MachineBasicBlock *> &Successors) { in hasSameSuccessors() argument
771 if (BB.succ_size() != Successors.size()) in hasSameSuccessors()
774 if (Successors.count(&BB)) in hasSameSuccessors()
776 for (MachineBasicBlock *Succ : BB.successors()) in hasSameSuccessors()
777 if (!Successors.count(Succ)) in hasSameSuccessors()
786 // Blocks with single successors don't create additional fallthrough in shouldTailDuplicate()
843 // Only scan the relevant successors in isProfitableToTailDup()
852 // If there are no more successors, it is profitable to copy, as it strictly in isProfitableToTailDup()
962 /// successors form the lower part of a trellis. A successor set S forms the
964 /// have all of S as successors. We ignore trellises where BB doesn't have 2
965 /// successors because for fewer than 2, it's trivial, and for 3 or greater they
977 SmallPtrSet<const MachineBasicBlock *, 2> Successors(BB->succ_begin(), in isTrellis() local
985 // Allow triangle successors, but don't count them. in isTrellis()
986 if (Successors.count(SuccPred)) { in isTrellis()
988 for (MachineBasicBlock *CheckSucc : SuccPred->successors()) in isTrellis()
989 if (!Successors.count(CheckSucc)) in isTrellis()
1001 if (!hasSameSuccessors(*SuccPred, Successors)) in isTrellis()
1004 // If one of the successors has only BB as a predecessor, it is not a in isTrellis()
1026 // successors will have to fallthrough from the second best predecessor. We in getBestNonConflictingEdges()
1056 /// We only handle trellises with 2 successors, so the algorithm is
1070 SmallPtrSet<const MachineBasicBlock *, 4> Successors(BB->succ_begin(), in getBestTrellisSuccessor() local
1075 // than 2 successors is fairly uncommon, and a trellis even more so. in getBestTrellisSuccessor()
1076 if (Successors.size() != 2 || ViableSuccs.size() != 2) in getBestTrellisSuccessor()
1104 // better fallthrough edge for all the successors. in getBestTrellisSuccessor()
1160 SmallPtrSet<const MachineBasicBlock *, 4> Successors(BB->succ_begin(), in canTailDuplicateUnplacedPreds() local
1170 if (Successors.size() > 1 && hasSameSuccessors(*Pred, Successors)) in canTailDuplicateUnplacedPreds()
1190 // right. BB and C now have the same successors. When considering in canTailDuplicateUnplacedPreds()
1222 // fallthrough from predecessors from Succ to its successors. We may need in canTailDuplicateUnplacedPreds()
1231 // successors, the extra duplication can't bring more fallthrough. in canTailDuplicateUnplacedPreds()
1242 // In this example Dup has 2 successors and 3 predecessors, duplication of Dup in canTailDuplicateUnplacedPreds()
1299 // If BB doesn't have 2 successors, it doesn't start a triangle. in precomputeTriangleChains()
1303 for (MachineBasicBlock *Succ : BB.successors()) { in precomputeTriangleChains()
1587 /// This looks across all successors of a particular block and attempts to
1589 /// successors which also pass the block filter. It will attempt to avoid
1604 SmallVector<MachineBasicBlock *, 4> Successors; in selectBestSuccessor() local
1606 collectViableSuccessors(BB, Chain, BlockFilter, Successors); in selectBestSuccessor()
1625 if (isTrellis(BB, Successors, Chain, BlockFilter)) in selectBestSuccessor()
1626 return getBestTrellisSuccessor(BB, Successors, AdjustedSumProb, Chain, in selectBestSuccessor()
1634 for (MachineBasicBlock *Succ : Successors) { in selectBestSuccessor()
1976 for (MachineBasicBlock *Succ : Pred->successors()) { in TopFallThroughFreq()
2054 for (MachineBasicBlock *Succ : BestPred->successors()) { in FallThroughGains()
2099 /// 2. a block has two successors, one is old top, another is exit
2135 << Pred->succ_size() << " successors, " in findBestLoopTopHelper()
2244 // Now walk the successors. We need to establish whether this has a viable in findBestLoopExit()
2251 for (MachineBasicBlock *Succ : MBB->successors()) { in findBestLoopExit()
2345 for (MachineBasicBlock *Succ : Pred->successors()) { in hasViableTopFallthrough()
2392 for (MachineBasicBlock *Succ : Bottom->successors()) { in rotateLoop()
2505 for (auto *Succ : BB->successors()) { in rotateLoopWithProfile()
2552 // 2. If the tail node has two successors, then we may still get an in rotateLoopWithProfile()
2559 // 3. If the tail node has more than two successors (this rarely happens), in rotateLoopWithProfile()
3214 for (MachineBasicBlock *NewSucc : Pred->successors()) { in maybeTailDuplicateBlock()
3256 for (MachineBasicBlock *Succ : Pred->successors()) in isBestSuccessor()
3289 SmallVector<MachineBasicBlock *, 8> Succs(BB->successors()); in findDuplicateCandidates()
3344 // If a predecessor has multiple successors, so BB can't be duplicated into in findDuplicateCandidates()
3364 // Jump to all successors; in findDuplicateCandidates()
3368 // Fallthrough to *SuccIt, jump to all other successors; in findDuplicateCandidates()
3598 for (MachineBasicBlock *Succ : MBB.successors()) { in applyExtTsp()
3766 for (MachineBasicBlock *Succ : MBB.successors()) { in INITIALIZE_PASS_DEPENDENCY()