Lines Matching refs:getSuccessor
288 if (!BI || BI->isConditional() || BI->getSuccessor(0) != BB) in DominatesMergePoint()
591 BasicBlock *Succ = BI->getSuccessor(ICI->getPredicate() == ICmpInst::ICMP_NE); in GetValueEqualityComparisonCases()
595 return BI->getSuccessor(ICI->getPredicate() == ICmpInst::ICMP_EQ); in GetValueEqualityComparisonCases()
1036 if (NewSI->getSuccessor(i) == BB) { in FoldValueComparisonIntoPredecessors()
1084 BasicBlock *BB1 = BI->getSuccessor(0); // The true destination. in HoistThenElseCodeToIf()
1085 BasicBlock *BB2 = BI->getSuccessor(1); // The false destination in HoistThenElseCodeToIf()
1228 BasicBlock *BBEnd = BI1->getSuccessor(0); in SinkThenElseCodeToEnd()
1498 BasicBlock *EndBB = ThenBB->getTerminator()->getSuccessor(0); in SpeculativelyExecuteBB()
1503 if (ThenBB != BI->getSuccessor(0)) { in SpeculativelyExecuteBB()
1504 assert(ThenBB == BI->getSuccessor(1) && "No edge from 'if' block?"); in SpeculativelyExecuteBB()
1507 assert(EndBB == BI->getSuccessor(!Invert) && "No edge from to end block"); in SpeculativelyExecuteBB()
1741 BasicBlock *RealDest = BI->getSuccessor(!CB->getZExtValue()); in FoldCondBranchOnPHI()
1797 if (PredBBTI->getSuccessor(i) == BB) { in FoldCondBranchOnPHI()
1954 BasicBlock *TrueSucc = BI->getSuccessor(0); in SimplifyCondBranchToTwoReturns()
1955 BasicBlock *FalseSucc = BI->getSuccessor(1); in SimplifyCondBranchToTwoReturns()
2089 (BI->getSuccessor(0) == PBI->getSuccessor(0) || in FoldBranchToCommonDest()
2090 BI->getSuccessor(0) == PBI->getSuccessor(1))) { in FoldBranchToCommonDest()
2156 BasicBlock *TrueDest = BI->getSuccessor(0); in FoldBranchToCommonDest()
2157 BasicBlock *FalseDest = (BI->isConditional()) ? BI->getSuccessor(1) : nullptr; in FoldBranchToCommonDest()
2181 if (PBI->getSuccessor(0) == TrueDest) in FoldBranchToCommonDest()
2183 else if (PBI->getSuccessor(1) == FalseDest) in FoldBranchToCommonDest()
2185 else if (PBI->getSuccessor(0) == FalseDest) in FoldBranchToCommonDest()
2187 else if (PBI->getSuccessor(1) == TrueDest) in FoldBranchToCommonDest()
2192 if (PBI->getSuccessor(0) != TrueDest && PBI->getSuccessor(1) != TrueDest) in FoldBranchToCommonDest()
2264 if (PBI->getSuccessor(0) == BB) { in FoldBranchToCommonDest()
2280 if (PBI->getSuccessor(1) == BB) { in FoldBranchToCommonDest()
2311 if (PBI->getSuccessor(0) == TrueDest) { in FoldBranchToCommonDest()
2582 BasicBlock *PTB = PBI->getSuccessor(0); in mergeConditionalStores()
2583 BasicBlock *PFB = PBI->getSuccessor(1); in mergeConditionalStores()
2584 BasicBlock *QTB = QBI->getSuccessor(0); in mergeConditionalStores()
2585 BasicBlock *QFB = QBI->getSuccessor(1); in mergeConditionalStores()
2666 PBI->getSuccessor(0) != PBI->getSuccessor(1)) { in SimplifyCondBranchToCondBranch()
2671 bool CondIsTrue = PBI->getSuccessor(0) == BB; in SimplifyCondBranchToCondBranch()
2693 PBI->getSuccessor(0) != PBI->getSuccessor(1)) { in SimplifyCondBranchToCondBranch()
2694 bool CondIsTrue = PBI->getSuccessor(0) == BB; in SimplifyCondBranchToCondBranch()
2713 if (PBI->getSuccessor(0) == BI->getParent() && in SimplifyCondBranchToCondBranch()
2715 PBI->getSuccessor(0) != PBI->getSuccessor(1) && in SimplifyCondBranchToCondBranch()
2741 if (PBI->getSuccessor(0) == BI->getSuccessor(0)) in SimplifyCondBranchToCondBranch()
2743 else if (PBI->getSuccessor(0) == BI->getSuccessor(1)) in SimplifyCondBranchToCondBranch()
2745 else if (PBI->getSuccessor(1) == BI->getSuccessor(0)) in SimplifyCondBranchToCondBranch()
2747 else if (PBI->getSuccessor(1) == BI->getSuccessor(1)) in SimplifyCondBranchToCondBranch()
2755 if (PBI->getSuccessor(PBIOp) == BB) in SimplifyCondBranchToCondBranch()
2766 BasicBlock *CommonDest = PBI->getSuccessor(PBIOp); in SimplifyCondBranchToCondBranch()
2787 BasicBlock *OtherDest = BI->getSuccessor(BIOp ^ 1); in SimplifyCondBranchToCondBranch()
3083 BasicBlock *SuccBlock = BB->getTerminator()->getSuccessor(0); in TryToSimplifyUncondBranchWithICmpInIt()
3173 BasicBlock *DefaultBB = BI->getSuccessor(1); in SimplifyBranchOnICmpChain()
3174 BasicBlock *EdgeBB = BI->getSuccessor(0); in SimplifyBranchOnICmpChain()
3427 if (isa<ReturnInst>(BI->getSuccessor(0)->getTerminator()) && in SimplifyReturn()
3428 isa<ReturnInst>(BI->getSuccessor(1)->getTerminator()) && in SimplifyReturn()
3490 if (BI->getSuccessor(0) == BB) { in SimplifyUnreachable()
3496 if (BI->getSuccessor(0) == BB) { in SimplifyUnreachable()
3497 Builder.CreateBr(BI->getSuccessor(1)); in SimplifyUnreachable()
3499 } else if (BI->getSuccessor(1) == BB) { in SimplifyUnreachable()
3500 Builder.CreateBr(BI->getSuccessor(0)); in SimplifyUnreachable()
3625 if (SI->getSuccessor(I) == ContiguousDest) in TurnSwitchRangeIntoICmp()
3751 BasicBlock *Succ = Branch->getSuccessor(0); in FindPHIForConditionForwarding()
3889 CaseDest = T->getSuccessor(0); in GetCaseResults()
4060 BasicBlock *Succ = SI->getSuccessor(i); in RemoveSwitchAfterSelectConversion()
4696 BasicBlock *Succ = SI->getSuccessor(i); in SwitchToLookupTable()
4967 if (BI->getSuccessor(0)->getSinglePredecessor()) { in SimplifyCondBranch()
4968 if (BI->getSuccessor(1)->getSinglePredecessor()) { in SimplifyCondBranch()
4974 TerminatorInst *Succ0TI = BI->getSuccessor(0)->getTerminator(); in SimplifyCondBranch()
4976 Succ0TI->getSuccessor(0) == BI->getSuccessor(1)) in SimplifyCondBranch()
4977 if (SpeculativelyExecuteBB(BI, BI->getSuccessor(0), TTI)) in SimplifyCondBranch()
4980 } else if (BI->getSuccessor(1)->getSinglePredecessor()) { in SimplifyCondBranch()
4983 TerminatorInst *Succ1TI = BI->getSuccessor(1)->getTerminator(); in SimplifyCondBranch()
4985 Succ1TI->getSuccessor(0) == BI->getSuccessor(0)) in SimplifyCondBranch()
4986 if (SpeculativelyExecuteBB(BI, BI->getSuccessor(1), TTI)) in SimplifyCondBranch()
5072 Builder.CreateBr(BI->getSuccessor(0) == BB ? BI->getSuccessor(1) : in removeUndefIntroducingPredecessor()
5073 BI->getSuccessor(0)); in removeUndefIntroducingPredecessor()