Lines Matching refs:getSuccessor
272 if (!BI || BI->isConditional() || BI->getSuccessor(0) != BB) in DominatesMergePoint()
566 BasicBlock *Succ = BI->getSuccessor(ICI->getPredicate() == ICmpInst::ICMP_NE); in GetValueEqualityComparisonCases()
570 return BI->getSuccessor(ICI->getPredicate() == ICmpInst::ICMP_EQ); in GetValueEqualityComparisonCases()
1013 if (NewSI->getSuccessor(i) == BB) { in FoldValueComparisonIntoPredecessors()
1062 BasicBlock *BB1 = BI->getSuccessor(0); // The true destination. in HoistThenElseCodeToIf()
1063 BasicBlock *BB2 = BI->getSuccessor(1); // The false destination in HoistThenElseCodeToIf()
1207 BasicBlock *BBEnd = BI1->getSuccessor(0); in SinkThenElseCodeToEnd()
1476 BasicBlock *EndBB = ThenBB->getTerminator()->getSuccessor(0); in SpeculativelyExecuteBB()
1481 if (ThenBB != BI->getSuccessor(0)) { in SpeculativelyExecuteBB()
1482 assert(ThenBB == BI->getSuccessor(1) && "No edge from 'if' block?"); in SpeculativelyExecuteBB()
1485 assert(EndBB == BI->getSuccessor(!Invert) && "No edge from to end block"); in SpeculativelyExecuteBB()
1716 BasicBlock *RealDest = BI->getSuccessor(!CB->getZExtValue()); in FoldCondBranchOnPHI()
1772 if (PredBBTI->getSuccessor(i) == BB) { in FoldCondBranchOnPHI()
1929 BasicBlock *TrueSucc = BI->getSuccessor(0); in SimplifyCondBranchToTwoReturns()
1930 BasicBlock *FalseSucc = BI->getSuccessor(1); in SimplifyCondBranchToTwoReturns()
2066 (BI->getSuccessor(0) == PBI->getSuccessor(0) || in FoldBranchToCommonDest()
2067 BI->getSuccessor(0) == PBI->getSuccessor(1))) { in FoldBranchToCommonDest()
2133 BasicBlock *TrueDest = BI->getSuccessor(0); in FoldBranchToCommonDest()
2134 BasicBlock *FalseDest = (BI->isConditional()) ? BI->getSuccessor(1) : nullptr; in FoldBranchToCommonDest()
2158 if (PBI->getSuccessor(0) == TrueDest) in FoldBranchToCommonDest()
2160 else if (PBI->getSuccessor(1) == FalseDest) in FoldBranchToCommonDest()
2162 else if (PBI->getSuccessor(0) == FalseDest) in FoldBranchToCommonDest()
2164 else if (PBI->getSuccessor(1) == TrueDest) in FoldBranchToCommonDest()
2169 if (PBI->getSuccessor(0) != TrueDest && PBI->getSuccessor(1) != TrueDest) in FoldBranchToCommonDest()
2241 if (PBI->getSuccessor(0) == BB) { in FoldBranchToCommonDest()
2257 if (PBI->getSuccessor(1) == BB) { in FoldBranchToCommonDest()
2288 if (PBI->getSuccessor(0) == TrueDest) { in FoldBranchToCommonDest()
2357 PBI->getSuccessor(0) != PBI->getSuccessor(1)) { in SimplifyCondBranchToCondBranch()
2362 bool CondIsTrue = PBI->getSuccessor(0) == BB; in SimplifyCondBranchToCondBranch()
2385 PBI->getSuccessor(0) != PBI->getSuccessor(1)) { in SimplifyCondBranchToCondBranch()
2386 bool CondIsTrue = PBI->getSuccessor(0) == BB; in SimplifyCondBranchToCondBranch()
2415 if (PBI->getSuccessor(0) == BI->getSuccessor(0)) in SimplifyCondBranchToCondBranch()
2417 else if (PBI->getSuccessor(0) == BI->getSuccessor(1)) in SimplifyCondBranchToCondBranch()
2419 else if (PBI->getSuccessor(1) == BI->getSuccessor(0)) in SimplifyCondBranchToCondBranch()
2421 else if (PBI->getSuccessor(1) == BI->getSuccessor(1)) in SimplifyCondBranchToCondBranch()
2429 if (PBI->getSuccessor(PBIOp) == BB) in SimplifyCondBranchToCondBranch()
2440 BasicBlock *CommonDest = PBI->getSuccessor(PBIOp); in SimplifyCondBranchToCondBranch()
2461 BasicBlock *OtherDest = BI->getSuccessor(BIOp ^ 1); in SimplifyCondBranchToCondBranch()
2579 BasicBlock *Succ = OldTerm->getSuccessor(I); in SimplifyTerminatorOnSelect()
2757 BasicBlock *SuccBlock = BB->getTerminator()->getSuccessor(0); in TryToSimplifyUncondBranchWithICmpInIt()
2847 BasicBlock *DefaultBB = BI->getSuccessor(1); in SimplifyBranchOnICmpChain()
2848 BasicBlock *EdgeBB = BI->getSuccessor(0); in SimplifyBranchOnICmpChain()
3001 if (isa<ReturnInst>(BI->getSuccessor(0)->getTerminator()) && in SimplifyReturn()
3002 isa<ReturnInst>(BI->getSuccessor(1)->getTerminator()) && in SimplifyReturn()
3064 if (BI->getSuccessor(0) == BB) { in SimplifyUnreachable()
3070 if (BI->getSuccessor(0) == BB) { in SimplifyUnreachable()
3071 Builder.CreateBr(BI->getSuccessor(1)); in SimplifyUnreachable()
3073 } else if (BI->getSuccessor(1) == BB) { in SimplifyUnreachable()
3074 Builder.CreateBr(BI->getSuccessor(0)); in SimplifyUnreachable()
3207 if (SI->getSuccessor(I) == ContiguousDest) in TurnSwitchRangeIntoICmp()
3310 BasicBlock *Succ = Branch->getSuccessor(0); in FindPHIForConditionForwarding()
3448 CaseDest = T->getSuccessor(0); in GetCaseResults()
3621 BasicBlock *Succ = SI->getSuccessor(i); in RemoveSwitchAfterSelectConversion()
4255 BasicBlock *Succ = SI->getSuccessor(i); in SwitchToLookupTable()
4516 if (BI->getSuccessor(0)->getSinglePredecessor()) { in SimplifyCondBranch()
4517 if (BI->getSuccessor(1)->getSinglePredecessor()) { in SimplifyCondBranch()
4523 TerminatorInst *Succ0TI = BI->getSuccessor(0)->getTerminator(); in SimplifyCondBranch()
4525 Succ0TI->getSuccessor(0) == BI->getSuccessor(1)) in SimplifyCondBranch()
4526 if (SpeculativelyExecuteBB(BI, BI->getSuccessor(0), TTI)) in SimplifyCondBranch()
4529 } else if (BI->getSuccessor(1)->getSinglePredecessor()) { in SimplifyCondBranch()
4532 TerminatorInst *Succ1TI = BI->getSuccessor(1)->getTerminator(); in SimplifyCondBranch()
4534 Succ1TI->getSuccessor(0) == BI->getSuccessor(0)) in SimplifyCondBranch()
4535 if (SpeculativelyExecuteBB(BI, BI->getSuccessor(1), TTI)) in SimplifyCondBranch()
4613 Builder.CreateBr(BI->getSuccessor(0) == BB ? BI->getSuccessor(1) : in removeUndefIntroducingPredecessor()
4614 BI->getSuccessor(0)); in removeUndefIntroducingPredecessor()