Lines Matching refs:BranchInst
130 bool SimplifyUncondBranch(BranchInst *BI, IRBuilder <> &Builder);
131 bool SimplifyCondBranch(BranchInst *BI, IRBuilder <>&Builder);
172 static bool isProfitableToFoldUnconditional(BranchInst *SI1, in isProfitableToFoldUnconditional()
173 BranchInst *SI2, in isProfitableToFoldUnconditional()
271 BranchInst *BI = dyn_cast<BranchInst>(PBB->getTerminator()); in DominatesMergePoint()
511 } else if (BranchInst *BI = dyn_cast<BranchInst>(TI)) { in EraseTerminatorInstAndDCECond()
532 } else if (BranchInst *BI = dyn_cast<BranchInst>(TI)) in isValueEqualityComparison()
564 BranchInst *BI = cast<BranchInst>(TI); in GetValueEqualityComparisonCases()
656 if (isa<BranchInst>(TI)) { in SimplifyEqualityComparisonWithOnlyPredecessor()
802 if (BranchInst* BI = dyn_cast<BranchInst>(TI)) { in GetBranchWeights()
1019 BranchInst::Create(InfLoopBlock, InfLoopBlock); in FoldValueComparisonIntoPredecessors()
1055 static bool HoistThenElseCodeToIf(BranchInst *BI, in HoistThenElseCodeToIf()
1204 static bool SinkThenElseCodeToEnd(BranchInst *BI1) { in SinkThenElseCodeToEnd()
1219 BranchInst *BI2 = dyn_cast<BranchInst>(BB2->getTerminator()); in SinkThenElseCodeToEnd()
1468 static bool SpeculativelyExecuteBB(BranchInst *BI, BasicBlock *ThenBB, in SpeculativelyExecuteBB()
1662 BranchInst *BI = cast<BranchInst>(BB->getTerminator()); in BlockIsSimpleEnoughToThreadThrough()
1688 static bool FoldCondBranchOnPHI(BranchInst *BI, const DataLayout &DL) { in FoldCondBranchOnPHI()
1729 BranchInst::Create(RealDest, EdgeBB); in FoldCondBranchOnPHI()
1856 if (cast<BranchInst>(IfBlock1->getTerminator())->isConditional()) { in FoldTwoEntryPHINode()
1869 if (cast<BranchInst>(IfBlock2->getTerminator())->isConditional()) { in FoldTwoEntryPHINode()
1926 static bool SimplifyCondBranchToTwoReturns(BranchInst *BI, in SimplifyCondBranchToTwoReturns()
2015 static bool ExtractBranchMetadata(BranchInst *BI, in ExtractBranchMetadata()
2052 bool llvm::FoldBranchToCommonDest(BranchInst *BI, unsigned BonusInstThreshold) { in FoldBranchToCommonDest()
2064 if (BranchInst *PBI = dyn_cast<BranchInst>(PB->getTerminator())) in FoldBranchToCommonDest()
2140 BranchInst *PBI = dyn_cast<BranchInst>(PredBlock->getTerminator()); in FoldBranchToCommonDest()
2327 BranchInst *New_PBI = BranchInst::Create(TrueDest, PBI); in FoldBranchToCommonDest()
2349 static bool SimplifyCondBranchToCondBranch(BranchInst *PBI, BranchInst *BI) { in SimplifyCondBranchToCondBranch()
2382 if ((PBI = dyn_cast<BranchInst>(P->getTerminator())) && in SimplifyCondBranchToCondBranch()
2479 BranchInst::Create(InfLoopBlock, InfLoopBlock); in SimplifyCondBranchToCondBranch()
2601 BranchInst *NewBI = Builder.CreateCondBr(Cond, TrueBB, FalseBB); in SimplifyTerminatorOnSelect()
2808 static bool SimplifyBranchOnICmpChain(BranchInst *BI, IRBuilder<> &Builder, in SimplifyBranchOnICmpChain()
2948 BranchInst::Create(II->getNormalDest(), II); in SimplifyResume()
2965 SmallVector<BranchInst*, 8> CondBranchPreds; in SimplifyReturn()
2969 if (BranchInst *BI = dyn_cast<BranchInst>(PTI)) { in SimplifyReturn()
2998 BranchInst *BI = CondBranchPreds.pop_back_val(); in SimplifyReturn()
3062 if (BranchInst *BI = dyn_cast<BranchInst>(TI)) { in SimplifyUnreachable()
3092 BranchInst *BI = Builder.CreateBr(II->getNormalDest()); in SimplifyUnreachable()
3197 BranchInst *NewBI = Builder.CreateCondBr(Cmp, ContiguousDest, OtherDest); in TurnSwitchRangeIntoICmp()
3306 BranchInst *Branch = dyn_cast<BranchInst>(BB->getTerminator()); in FindPHIForConditionForwarding()
3974 BranchInst *RangeCheckBranch, Constant *DefaultValue, in reuseTableCompare()
4158 BranchInst *RangeCheckBranch = nullptr; in SwitchToLookupTable()
4340 BranchInst::Create(IBI->getDestination(0), IBI); in SimplifyIndirectBr()
4373 static bool TryToMergeLandingPad(LandingPadInst *LPad, BranchInst *BI, in TryToMergeLandingPad()
4390 BranchInst *BI2 = dyn_cast<BranchInst>(I); in TryToMergeLandingPad()
4428 bool SimplifyCFGOpt::SimplifyUncondBranch(BranchInst *BI, IRBuilder<> &Builder){ in SimplifyUncondBranch()
4471 bool SimplifyCFGOpt::SimplifyCondBranch(BranchInst *BI, IRBuilder<> &Builder) { in SimplifyCondBranch()
4548 if (BranchInst *PBI = dyn_cast<BranchInst>((*PI)->getTerminator())) in SimplifyCondBranch()
4606 if (BranchInst *BI = dyn_cast<BranchInst>(T)) { in removeUndefIntroducingPredecessor()
4666 if (BranchInst *BI = dyn_cast<BranchInst>(BB->getTerminator())) { in run()