Home
last modified time | relevance | path

Searched refs:BranchInst (Results 1 – 25 of 88) sorted by relevance

1234

/external/llvm/lib/Transforms/Scalar/
DLoopRotation.cpp220 BranchInst *Jmp = dyn_cast<BranchInst>(Latch->getTerminator()); in simplifyLoopLatch()
228 BranchInst *BI = dyn_cast<BranchInst>(LastExit->getTerminator()); in simplifyLoopLatch()
267 BranchInst *BI = dyn_cast<BranchInst>(OrigHeader->getTerminator()); in rotateLoop()
412 BranchInst *PHBI = cast<BranchInst>(OrigPreheader->getTerminator()); in rotateLoop()
453 BranchInst *NewBI = BranchInst::Create(NewHeader, PHBI); in rotateLoop()
DJumpThreading.cpp180 BranchInst *BI = dyn_cast<BranchInst>(BB->getTerminator()); in runOnFunction()
675 if (BranchInst *BI = dyn_cast<BranchInst>(Terminator)) { in ProcessBlock()
715 BranchInst::Create(BBTerm->getSuccessor(BestSucc), BBTerm); in ProcessBlock()
746 BranchInst *CondBr = dyn_cast<BranchInst>(BB->getTerminator()); in ProcessBlock()
773 BranchInst::Create(CondBr->getSuccessor(ToKeep), CondBr); in ProcessBlock()
808 if (PN->getParent() == BB && isa<BranchInst>(BB->getTerminator())) in ProcessBlock()
814 CondInst->getParent() == BB && isa<BranchInst>(BB->getTerminator())) in ProcessBlock()
1109 else if (BranchInst *BI = dyn_cast<BranchInst>(BB->getTerminator())) in ProcessThreadableEdges()
1185 if (BranchInst *PredBr = dyn_cast<BranchInst>(PredBB->getTerminator())) in ProcessBranchOnPHI()
1407 BranchInst *NewBI =BranchInst::Create(SuccBB, NewBB); in ThreadEdge()
[all …]
DTailRecursionElimination.cpp494 BranchInst::Create(OldEntry, NewEntry); in EliminateRecursiveTailCall()
591 BranchInst *NewBI = BranchInst::Create(OldEntry, Ret); in EliminateRecursiveTailCall()
611 SmallVector<BranchInst*, 8> UncondBranchPreds; in FoldReturnAndProcessPred()
615 if (BranchInst *BI = dyn_cast<BranchInst>(PTI)) in FoldReturnAndProcessPred()
621 BranchInst *BI = UncondBranchPreds.pop_back_val(); in FoldReturnAndProcessPred()
DLoopUnswitch.cpp439 if (BranchInst *BI = dyn_cast<BranchInst>(TI)) { in processCurrentLoop()
569 if (BranchInst *BI = dyn_cast<BranchInst>(HeaderTerm)) { in IsTrivialUnswitchCondition()
698 BranchInst *BI = BranchInst::Create(TrueDest, FalseDest, BranchVal, InsertPt); in EmitPreheaderBranchOnCondition()
887 BranchInst *OldBR = cast<BranchInst>(loopPreheader->getTerminator()); in UnswitchNontrivialCondition()
986 if (BranchInst *BI = dyn_cast<BranchInst>(Pred->getTerminator())) in RemoveBlockIfDead()
1176 BranchInst::Create(Abort, OldSISucc, in RewriteLoopBodyWithConditionConstant()
1233 if (BranchInst *BI = dyn_cast<BranchInst>(I)) { in SimplifyCode()
1278 Worklist.push_back(BranchInst::Create(LiveSucc, BI)); in SimplifyCode()
DIndVarSimplify.cpp281 !isa<BranchInst>(Compare->use_back())) in HandleFloatingPointIV()
284 BranchInst *TheBr = cast<BranchInst>(Compare->use_back()); in HandleFloatingPointIV()
1103 static bool isHighCostExpansion(const SCEV *S, BranchInst *BI, in isHighCostExpansion()
1172 BranchInst *BI = dyn_cast<BranchInst>(L->getExitingBlock()->getTerminator()); in canExpandBackedgeTakenCount()
1229 BranchInst *BI = dyn_cast<BranchInst>(L->getExitingBlock()->getTerminator()); in getLoopTest()
1353 cast<BranchInst>(L->getExitingBlock()->getTerminator())->getCondition(); in FindLoopCounter()
1449 BranchInst *BI = cast<BranchInst>(L->getExitingBlock()->getTerminator()); in genLoopLimit()
1491 BranchInst *BI = cast<BranchInst>(L->getExitingBlock()->getTerminator()); in genLoopLimit()
1561 BranchInst *BI = cast<BranchInst>(L->getExitingBlock()->getTerminator()); in LinearFunctionTestReplace()
DLoopIdiomRecognize.cpp77 static BranchInst *getBranch(BasicBlock *BB) { in getBranch()
78 return dyn_cast<BranchInst>(BB->getTerminator()); in getBranch()
116 Value *matchCondition (BranchInst *Br, BasicBlock *NonZeroTarget) const;
283 if (BranchInst *Br = getBranch(BB)) { in isAlmostEmpty()
290 BranchInst *Br = getBranch(BB); in getBrCondtion()
296 BranchInst *Br = getBranch(BB); in getPrecondBb()
346 Value *NclPopcountRecognize::matchCondition (BranchInst *Br, in matchCondition()
482 BranchInst *PreCondBr = LIRUtil::getBranch(PreCondBB); in detectIdiom()
501 BranchInst *PreCondBr = LIRUtil::getBranch(PreCondBB); in transform()
572 BranchInst *LbBr = LIRUtil::getBranch(Body); in transform()
/external/llvm/lib/Target/R600/
DSIAnnotateControlFlow.cpp76 void openIf(BranchInst *Term);
78 void insertElse(BranchInst *Term);
82 void handleLoop(BranchInst *Term);
189 void SIAnnotateControlFlow::openIf(BranchInst *Term) { in openIf()
196 void SIAnnotateControlFlow::insertElse(BranchInst *Term) { in insertElse()
259 void SIAnnotateControlFlow::handleLoop(BranchInst *Term) { in handleLoop()
295 BranchInst *Term = dyn_cast<BranchInst>((*I)->getTerminator()); in runOnFunction()
DAMDGPUStructurizeCFG.cpp38 typedef SmallVector<BranchInst*, 8> BranchVector;
200 Value *buildCondition(BranchInst *Term, unsigned Idx, bool Invert);
302 BranchInst *Term = cast<BranchInst>(BB->getTerminator()); in analyzeLoops()
348 Value *AMDGPUStructurizeCFG::buildCondition(BranchInst *Term, unsigned Idx, in buildCondition()
379 BranchInst *Term = cast<BranchInst>((*PI)->getTerminator()); in gatherPredicates()
461 BranchInst *Term = *I; in insertConditions()
632 BranchInst::Create(NewExit, BB); in changeExit()
749 Conditions.push_back(BranchInst::Create(Entry, Next, BoolUndef, Flow)); in wireFlow()
786 LoopConds.push_back(BranchInst::Create(Next, LoopStart, in handleLoops()
/external/llvm/lib/Transforms/Utils/
DSimplifyCFG.cpp102 bool SimplifyUncondBranch(BranchInst *BI, IRBuilder <> &Builder);
103 bool SimplifyCondBranch(BranchInst *BI, IRBuilder <>&Builder);
143 static bool isProfitableToFoldUnconditional(BranchInst *SI1, in isProfitableToFoldUnconditional()
144 BranchInst *SI2, in isProfitableToFoldUnconditional()
213 BranchInst *Pred1Br = dyn_cast<BranchInst>(Pred1->getTerminator()); in GetIfCondition()
214 BranchInst *Pred2Br = dyn_cast<BranchInst>(Pred2->getTerminator()); in GetIfCondition()
266 BranchInst *BI = dyn_cast<BranchInst>(CommonPred->getTerminator()); in GetIfCondition()
354 BranchInst *BI = dyn_cast<BranchInst>(PBB->getTerminator()); in DominatesMergePoint()
508 } else if (BranchInst *BI = dyn_cast<BranchInst>(TI)) { in EraseTerminatorInstAndDCECond()
529 } else if (BranchInst *BI = dyn_cast<BranchInst>(TI)) in isValueEqualityComparison()
[all …]
DLowerExpectIntrinsic.cpp47 bool HandleIfExpect(BranchInst *BI);
92 bool LowerExpectIntrinsic::HandleIfExpect(BranchInst *BI) { in HandleIfExpect()
140 if (BranchInst *BI = dyn_cast<BranchInst>(BB->getTerminator())) { in runOnFunction()
DLoopUnrollRuntime.cpp124 BranchInst::Create(Exit, NewPH, BrLoopExit, InsertPt); in ConnectProlog()
191 BranchInst::Create(InsertBot, NewBB); in CloneLoopBlocks()
275 BranchInst *PreHeaderBR = cast<BranchInst>(PH->getTerminator()); in UnrollRuntimeLoopProlog()
295 BranchInst::Create(PEnd, PEnd, BranchVal, PreHeaderBR); in UnrollRuntimeLoopProlog()
350 BranchInst::Create(NewBlocks[0], CompareBB, in UnrollRuntimeLoopProlog()
DLoopUnroll.cpp161 BranchInst *BI = dyn_cast<BranchInst>(LatchBlock->getTerminator()); in UnrollLoop()
354 BranchInst *Term = cast<BranchInst>(Latches[i]->getTerminator()); in UnrollLoop()
397 BranchInst::Create(Dest, Term); in UnrollLoop()
404 BranchInst *Term = cast<BranchInst>(Latches[i]->getTerminator()); in UnrollLoop()
DBasicBlockUtils.cpp396 ArrayRef<BasicBlock*> Preds, BranchInst *BI, in UpdatePHINodes()
462 BranchInst *BI = BranchInst::Create(BB, NewBB); in SplitBlockPredecessors()
522 BranchInst *BI1 = BranchInst::Create(OrigBB, NewBB1); in SplitLandingPadPredecessors()
562 BranchInst *BI2 = BranchInst::Create(OrigBB, NewBB2); in SplitLandingPadPredecessors()
722 CheckTerm = BranchInst::Create(Tail, ThenBlock); in SplitBlockAndInsertIfThen()
723 BranchInst *HeadNewTerm = in SplitBlockAndInsertIfThen()
724 BranchInst::Create(/*ifTrue*/ThenBlock, /*ifFalse*/Tail, Cmp); in SplitBlockAndInsertIfThen()
DLowerSwitch.cpp153 BranchInst::Create(LBranch, RBranch, Comp, NewNode); in switchConvert()
202 BranchInst::Create(Succ, Default, Comp, NewLeaf); in newLeafBlock()
267 BranchInst::Create(SI->getDefaultDest(), CurBlock); in processSwitchInst()
277 BranchInst::Create(Default, NewDefault); in processSwitchInst()
301 BranchInst::Create(SwitchBlock, OrigBlock); in processSwitchInst()
DUnifyFunctionExitNodes.cpp74 BranchInst::Create(UnreachableBlock, BB); in runOnFunction()
118 BranchInst::Create(NewRetBlock, BB); in runOnFunction()
DCloneFunction.cpp302 if (const BranchInst *BI = dyn_cast<BranchInst>(OldTI)) { in CloneBlock()
315 VMap[OldTI] = BranchInst::Create(Dest, NewBB); in CloneBlock()
330 VMap[OldTI] = BranchInst::Create(Dest, NewBB); in CloneBlock()
537 BranchInst *BI = dyn_cast<BranchInst>(I->getTerminator()); in CloneAndPruneFunctionInto()
DLoopSimplify.cpp190 if (BranchInst *BI = dyn_cast<BranchInst>((*I)->getTerminator())) in ProcessLoop()
303 BranchInst *BI = dyn_cast<BranchInst>(ExitingBlock->getTerminator()); in ProcessLoop()
682 BranchInst *BETerminator = BranchInst::Create(Header, BEBlock); in InsertUniqueBackedgeBlock()
DInlineFunction.cpp147 BranchInst::Create(Dest, Src); in forwardResume()
752 BranchInst::Create(II->getNormalDest(), TheCall); in InlineFunction()
783 BranchInst *NewBr = BranchInst::Create(II->getNormalDest(), TheCall); in InlineFunction()
845 BranchInst::Create(AfterCallBB, RI); in InlineFunction()
881 assert(cast<BranchInst>(Br)->isUnconditional() && "splitBasicBlock broken!"); in InlineFunction()
882 BasicBlock *CalleeEntry = cast<BranchInst>(Br)->getSuccessor(0); in InlineFunction()
/external/llvm/lib/Analysis/
DBranchProbabilityInfo.cpp164 if (!isa<BranchInst>(TI) && !isa<SwitchInst>(TI)) in calcMetadataWeights()
199 BranchInst * BI = dyn_cast<BranchInst>(BB->getTerminator()); in calcPointerHeuristics()
286 BranchInst * BI = dyn_cast<BranchInst>(BB->getTerminator()); in calcZeroHeuristics()
346 BranchInst *BI = dyn_cast<BranchInst>(BB->getTerminator()); in calcFloatingPointHeuristics()
/external/llvm/unittests/Transforms/Utils/
DLocal.cpp30 BranchInst *br0 = builder.CreateCondBr(builder.getTrue(), bb0, bb1); in TEST()
33 BranchInst *br1 = builder.CreateBr(bb0); in TEST()
/external/llvm/unittests/IR/
DInstructionsTest.cpp50 TEST(InstructionsTest, BranchInst) { in TEST() argument
58 const BranchInst* b0 = BranchInst::Create(bb0); in TEST()
76 BranchInst* b1 = BranchInst::Create(bb0, bb1, One); in TEST()
DVerifierTest.cpp37 BranchInst *BI = BranchInst::Create(Exit, Exit, False, Entry); in TEST()
/external/llvm/tools/llvm-diff/
DDifferenceEngine.cpp290 } else if (isa<BranchInst>(L)) { in diff()
291 BranchInst *LI = cast<BranchInst>(L); in diff()
292 BranchInst *RI = cast<BranchInst>(R); in diff()
602 if (isa<BranchInst>(LTerm) && isa<InvokeInst>(RTerm)) { in runBlockDiff()
603 if (cast<BranchInst>(LTerm)->isConditional()) return; in runBlockDiff()
615 } else if (isa<InvokeInst>(LTerm) && isa<BranchInst>(RTerm)) { in runBlockDiff()
616 if (cast<BranchInst>(RTerm)->isConditional()) return; in runBlockDiff()
/external/llvm/include/llvm/Analysis/
DCFGPrinter.h86 if (const BranchInst *BI = dyn_cast<BranchInst>(Node->getTerminator()))
/external/clang/lib/CodeGen/
DCGCleanup.cpp322 if (llvm::BranchInst *Br = dyn_cast<llvm::BranchInst>(Term)) { in TransitionToCleanupSwitch()
411 llvm::BranchInst *Br = dyn_cast<llvm::BranchInst>(Pred->getTerminator()); in SimplifyCleanupEntry()
478 if (llvm::BranchInst *Br = dyn_cast<llvm::BranchInst>(Term)) { in ForwardPrebranchedFallthrough()
513 llvm::BranchInst::Create(si->case_begin().getCaseSuccessor(), si); in destroyOptimisticNormalEntry()
716 InstsToAppend.push_back(llvm::BranchInst::Create(BranchAfter)); in PopCleanupBlock()
760 InstsToAppend.push_back(llvm::BranchInst::Create(BranchThroughDest)); in PopCleanupBlock()
891 llvm::BranchInst *BI = Builder.CreateBr(Dest.getBlock()); in EmitBranchThroughCleanup()

1234