/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/ |
H A D | FlattenCFG.cpp | 149 BranchInst *PBI = dyn_cast<BranchInst>(Pred->getTerminator()); in FlattenParallelAndOr() 221 BranchInst *BPS = dyn_cast<BranchInst>(PS->getTerminator()); in FlattenParallelAndOr() 235 BranchInst *PBI1 = dyn_cast<BranchInst>(PS1->getTerminator()); in FlattenParallelAndOr() 236 BranchInst *PBI2 = dyn_cast<BranchInst>(PS2->getTerminator()); in FlattenParallelAndOr() 252 auto *BI = cast<BranchInst>(CurrBlock->getTerminator()); in FlattenParallelAndOr() 279 BranchInst *PBI = cast<BranchInst>(FirstCondBlock->getTerminator()); in FlattenParallelAndOr() 289 PBI = cast<BranchInst>(FirstCondBlock->getTerminator()); in FlattenParallelAndOr() 415 BranchInst *DomBI2 = GetIfCondition(BB, IfTrue2, IfFalse2); in MergeIfRegion() 427 BranchInst *DomBI1 = GetIfCondition(SecondEntryBlock, IfTrue1, IfFalse1); in MergeIfRegion() 488 BranchInst *PBI = cast<BranchInst>(FirstEntryBlock->getTerminator()); in MergeIfRegion()
|
H A D | LoopUnrollAndJam.cpp | 297 BranchInst *BI = dyn_cast<BranchInst>(LatchBlock->getTerminator()); in UnrollAndJamLoop() 486 BranchInst *ForeTerm = in UnrollAndJamLoop() 487 cast<BranchInst>(ForeBlocksLast.back()->getTerminator()); in UnrollAndJamLoop() 504 BranchInst *ForeTerm = in UnrollAndJamLoop() 505 cast<BranchInst>(ForeBlocksLast[It - 1]->getTerminator()); in UnrollAndJamLoop() 511 BranchInst *SubTerm = in UnrollAndJamLoop() 512 cast<BranchInst>(SubLoopBlocksLast.back()->getTerminator()); in UnrollAndJamLoop() 523 BranchInst *SubTerm = in UnrollAndJamLoop() 524 cast<BranchInst>(SubLoopBlocksLast[It - 1]->getTerminator()); in UnrollAndJamLoop() 525 BranchInst::Create(SubLoopBlocksFirst[It], SubTerm->getIterator()); in UnrollAndJamLoop() [all …]
|
H A D | LoopRotationUtils.cpp | 215 BranchInst *BI = dyn_cast<BranchInst>(Header->getTerminator()); in profitableToRotateLoopExitingLatch() 241 BranchInst *BI = dyn_cast<BranchInst>(Latch->getTerminator()); in canRotateDeoptimizingLatchExit() 276 static void updateBranchWeights(BranchInst &PreHeaderBI, BranchInst &LoopBI, in updateBranchWeights() 426 BranchInst *BI = dyn_cast<BranchInst>(OrigHeader->getTerminator()); in rotateLoop() 844 BranchInst *PHBI = cast<BranchInst>(OrigPreheader->getTerminator()); in rotateLoop() 890 BranchInst *NewBI = BranchInst::Create(NewHeader, PHBI->getIterator()); in rotateLoop() 1020 BranchInst *Jmp = dyn_cast<BranchInst>(Latch->getTerminator()); in simplifyLoopLatch() 1028 BranchInst *BI = dyn_cast<BranchInst>(LastExit->getTerminator()); in simplifyLoopLatch()
|
H A D | MatrixUtils.cpp | 36 BranchInst::Create(Body, Header); in CreateLoop() 37 BranchInst::Create(Latch, Body); in CreateLoop() 45 BranchInst::Create(Header, Exit, Cond, Latch); in CreateLoop() 48 BranchInst *PreheaderBr = cast<BranchInst>(Preheader->getTerminator()); in CreateLoop()
|
H A D | GuardUtils.cpp | 39 auto *CheckBI = cast<BranchInst>(CheckBB->getTerminator()); in makeGuardControlFlowExplicit() 82 void llvm::widenWidenableBranch(BranchInst *WidenableBR, Value *NewCond) { in widenWidenableBranch() 108 void llvm::setWidenableBranchCond(BranchInst *WidenableBR, Value *NewCond) { in setWidenableBranchCond()
|
H A D | BasicBlockUtils.cpp | 206 BranchInst *PredBB_BI; in MergeBlockIntoPredecessor() 210 if (!(PredBB_BI = dyn_cast<BranchInst>(PTI))) in MergeBlockIntoPredecessor() 212 BranchInst *BB_JmpI = dyn_cast<BranchInst>(BB->getTerminator()); in MergeBlockIntoPredecessor() 887 auto *Terminator = BranchInst::Create(Succ, NewBB); in ehAwareSplitEdge() 1260 ArrayRef<BasicBlock *> Preds, BranchInst *BI, in UpdatePHINodes() 1353 BranchInst *BI = BranchInst::Create(BB, NewBB); in SplitBlockPredecessorsImpl() 1451 BranchInst *BI1 = BranchInst::Create(OrigBB, NewBB1); in SplitLandingPadPredecessorsImpl() 1492 BranchInst *BI2 = BranchInst::Create(OrigBB, NewBB2); in SplitLandingPadPredecessorsImpl() 1687 (void)BranchInst::Create(Tail, BB); in SplitBlockAndInsertIfThenElse() 1700 BranchInst *HeadNewTerm = in SplitBlockAndInsertIfThenElse() [all …]
|
H A D | SimplifyCFG.cpp | 267 bool simplifyBranch(BranchInst *Branch, IRBuilder<> &Builder); 268 bool simplifyUncondBranch(BranchInst *BI, IRBuilder<> &Builder); 269 bool simplifyCondBranch(BranchInst *BI, IRBuilder<> &Builder); 278 bool SpeculativelyExecuteBB(BranchInst *BI, BasicBlock *ThenBB); 282 bool SimplifyBranchOnICmpChain(BranchInst *BI, IRBuilder<> &Builder, 441 BranchInst *BI = dyn_cast<BranchInst>(PBB->getTerminator()); in dominatesMergePoint() 761 } else if (BranchInst *BI = dyn_cast<BranchInst>(TI)) { in EraseTerminatorAndDCECond() 782 } else if (BranchInst *BI = dyn_cast<BranchInst>(TI)) in isValueEqualityComparison() 812 BranchInst *BI = cast<BranchInst>(TI); in GetValueEqualityComparisonCases() 879 assert(isa<BranchInst>(I) || isa<SelectInst>(I)); in setBranchWeights() [all …]
|
H A D | LoopUnrollRuntime.cpp | 389 BranchInst *LatchBR = cast<BranchInst>(NewBB->getTerminator()); in CloneLoopBlocks() 602 BranchInst *LatchBR = cast<BranchInst>(Latch->getTerminator()); in UnrollRuntimeLoopRemainder() 672 BranchInst *PreHeaderBR = cast<BranchInst>(PreHeader->getTerminator()); in UnrollRuntimeLoopRemainder() 764 PreHeaderBR = cast<BranchInst>(PreHeader->getTerminator()); in UnrollRuntimeLoopRemainder() 937 BranchInst *LatchBR = cast<BranchInst>(Latch->getTerminator()); in UnrollRuntimeLoopRemainder()
|
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/ |
H A D | SIAnnotateControlFlow.cpp | 65 bool isUniform(BranchInst *T); 79 bool openIf(BranchInst *Term); 81 bool insertElse(BranchInst *Term); 85 BranchInst *Term); 87 bool handleLoop(BranchInst *Term); 149 bool SIAnnotateControlFlow::isUniform(BranchInst *T) { in isUniform() 205 bool SIAnnotateControlFlow::openIf(BranchInst *Term) { in openIf() 219 bool SIAnnotateControlFlow::insertElse(BranchInst *Term) { in insertElse() 235 Value *Cond, PHINode *Broken, llvm::Loop *L, BranchInst *Term) { in handleLoopCondition() 270 bool SIAnnotateControlFlow::handleLoop(BranchInst *Term) { in handleLoop() [all …]
|
H A D | AMDGPUUnifyDivergentExitNodes.cpp | 171 BranchInst::Create(NewRetBlock, BB); in unifyReturnBlockSet() 195 !isa<BranchInst>(PDT.getRoot()->getTerminator()))) in run() 225 } else if (BranchInst *BI = dyn_cast<BranchInst>(BB->getTerminator())) { in run() 241 BranchInst::Create(LoopHeaderBB, DummyReturnBB, BoolTrue, BB); in run() 262 BranchInst::Create(TransitionBB, DummyReturnBB, BoolTrue, BB); in run() 283 BranchInst::Create(UnreachableBlock, BB); in run()
|
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/ |
H A D | GuardUtils.h | 17 class BranchInst; variable 35 void widenWidenableBranch(BranchInst *WidenableBR, Value *NewCond); 40 void setWidenableBranchCond(BranchInst *WidenableBR, Value *Cond);
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/ |
H A D | LowerExpectIntrinsic.cpp | 196 auto GetDomConditional = [&](unsigned i) -> BranchInst * { in handlePhiDef() 198 BranchInst *BI = dyn_cast<BranchInst>(BB->getTerminator()); in handlePhiDef() 204 BI = dyn_cast<BranchInst>(BB->getTerminator()); in handlePhiDef() 229 BranchInst *BI = GetDomConditional(i); in handlePhiDef() 357 static bool handleBranchExpect(BranchInst &BI) { in handleBranchExpect() 361 return handleBrSelExpect<BranchInst>(BI); in handleBranchExpect() 369 if (BranchInst *BI = dyn_cast<BranchInst>(BB.getTerminator())) { in lowerExpectIntrinsic()
|
H A D | JumpThreading.cpp | 150 BranchInst *CondBr = dyn_cast<BranchInst>(BB->getTerminator()); in updatePredecessorProfileMetadata() 173 BranchInst *PredBr = dyn_cast<BranchInst>(PredBB->getTerminator()); in updatePredecessorProfileMetadata() 209 BranchInst *PredBr = dyn_cast<BranchInst>(PredBB->getTerminator()); in updatePredecessorProfileMetadata() 361 auto *BI = dyn_cast<BranchInst>(BB.getTerminator()); in runImpl() 977 if (BranchInst *BI = dyn_cast<BranchInst>(Terminator)) { in processBlock() 1029 Instruction *NewBI = BranchInst::Create(BBTerm->getSuccessor(BestSucc), BBTerm->getIterator()); in processBlock() 1118 if (PN->getParent() == BB && isa<BranchInst>(BB->getTerminator())) in processBlock() 1130 if (PN && PN->getParent() == BB && isa<BranchInst>(BB->getTerminator())) in processBlock() 1135 CondInst->getParent() == BB && isa<BranchInst>(BB->getTerminator())) in processBlock() 1147 auto *BI = dyn_cast<BranchInst>(BB->getTerminator()); in processImpliedCondition() [all …]
|
H A D | IndVarSimplify.cpp | 245 !isa<BranchInst>(Compare->user_back())) in handleFloatingPointIV() 248 BranchInst *TheBr = cast<BranchInst>(Compare->user_back()); in handleFloatingPointIV() 467 if (auto *BI = dyn_cast<BranchInst>(TermInst)) { in rewriteFirstIterationLoopExitValues() 703 BranchInst *BI = cast<BranchInst>(ExitingBB->getTerminator()); in isLoopExitTestBasedOn() 722 BranchInst *BI = cast<BranchInst>(ExitingBB->getTerminator()); in needsLFTR() 841 Value *Cond = cast<BranchInst>(ExitingBB->getTerminator())->getCondition(); in FindLoopCounter() 1008 BranchInst *BI = cast<BranchInst>(ExitingBB->getTerminator()); in linearFunctionTestReplace() 1181 static void replaceExitCond(BranchInst *BI, Value *NewCond, in replaceExitCond() 1193 BranchInst *BI = cast<BranchInst>(ExitingBB->getTerminator()); in createFoldedExitCond() 1202 BranchInst *BI = cast<BranchInst>(ExitingBB->getTerminator()); in foldExit() [all …]
|
H A D | LoopBoundSplit.cpp | 31 BranchInst *BI = nullptr; 160 const BranchInst *BI) { in isProcessableCondBI() 206 BranchInst *ExitingBI = dyn_cast<BranchInst>(ExitingBB->getTerminator()); in canSplitLoopBound() 223 static bool isProfitableToTransform(const Loop &L, const BranchInst *BI) { in isProfitableToTransform() 243 static BranchInst *findSplitCandidate(const Loop &L, ScalarEvolution &SE, in findSplitCandidate() 251 auto *BI = dyn_cast<BranchInst>(BB->getTerminator()); in findSplitCandidate() 422 BranchInst *ClonedSplitCandidateBI = in splitLoopBound() 423 cast<BranchInst>(VMap[SplitCandidateCond.BI]); in splitLoopBound()
|
H A D | StructurizeCFG.cpp | 79 using BranchVector = SmallVector<BranchInst *, 8>; 274 Value *buildCondition(BranchInst *Term, unsigned Idx, bool Invert); 443 BranchInst *Term = cast<BranchInst>(BB->getTerminator()); in analyzeLoops() 452 Value *StructurizeCFG::buildCondition(BranchInst *Term, unsigned Idx, in buildCondition() 479 BranchInst *Term = cast<BranchInst>(P->getTerminator()); in gatherPredicates() 564 for (BranchInst *Term : Conds) { in insertConditions() 841 BranchInst *Br = BranchInst::Create(NewExit, BB); in changeExit() 958 BranchInst *Br = BranchInst::Create(Entry, Next, BoolPoison, Flow); in wireFlow() 999 BranchInst *Br = BranchInst::Create(Next, LoopStart, BoolPoison, LoopEnd); in handleLoops() 1073 auto Br = dyn_cast<BranchInst>(E->getEntry()->getTerminator()); in hasOnlyUniformBranches() [all …]
|
H A D | LoopInterchange.cpp | 557 BranchInst *OuterLoopHeaderBI = in tightlyNested() 558 dyn_cast<BranchInst>(OuterLoopHeader->getTerminator()); in tightlyNested() 632 BranchInst *InnerLoopLatchBI = in isLoopStructureUnderstood() 633 dyn_cast<BranchInst>(InnerLoopLatch->getTerminator()); in isLoopStructureUnderstood() 777 !isa<BranchInst>(InnerLoopLatch->getTerminator()) || in currentLimitations() 778 !isa<BranchInst>(OuterLoop->getLoopLatch()->getTerminator())) { in currentLimitations() 1348 cast<BranchInst>(InnerLoop->getLoopLatch()->getTerminator()) in transform() 1418 static void updateSuccessor(BranchInst *BI, BasicBlock *OldBB, in updateSuccessor() 1573 BranchInst *OuterLoopLatchBI = in adjustLoopBranches() 1574 dyn_cast<BranchInst>(OuterLoopLatch->getTerminator()); in adjustLoopBranches() [all …]
|
H A D | LowerConstantIntrinsics.cpp | 68 BranchInst *BI = dyn_cast_or_null<BranchInst>(VH); in replaceConditionalBranchesOnConstant() 89 Instruction *NewBI = BranchInst::Create(Target, Source); in replaceConditionalBranchesOnConstant()
|
H A D | LoopFlatten.cpp | 134 BranchInst *InnerBranch = nullptr; // are safe to ignore. 136 BranchInst *OuterBranch = nullptr; // The instruction that needs to be 324 BranchInst *&BackBranch, ScalarEvolution *SE, bool IsWidened) { in verifyTripCount() 391 BranchInst *&BackBranch, ScalarEvolution *SE, bool IsWidened) { in findLoopComponents() 440 BackBranch = cast<BranchInst>(Latch->getTerminator()); in findLoopComponents() 582 BranchInst *Br = dyn_cast<BranchInst>(&I); in checkOuterLoopInsts() 787 Instruction *BI = BranchInst::Create(InnerExitBlock, InnerExitingBlock); in DoFlattenLoopPair() 975 BranchInst *Br = cast<BranchInst>(CheckBlock->getTerminator()); in FlattenLoopPair()
|
H A D | DFAJumpThreading.cpp | 184 BranchInst **NewBranch, std::vector<SelectInstToUnfold> *NewSIsToUnfold, in createBasicBlockAndSinkSelectInst() 192 *NewBranch = BranchInst::Create(EndBlock, *NewBlock); in createBasicBlockAndSinkSelectInst() 212 BranchInst *StartBlockTerm = in unfold() 213 dyn_cast<BranchInst>(StartBlock->getTerminator()); in unfold() 222 BranchInst *TrueBranch = nullptr; in unfold() 223 BranchInst *FalseBranch = nullptr; in unfold() 243 BranchInst::Create(EndBlock, FalseBlock); in unfold() 307 BranchInst::Create(TT, FT, SI->getCondition(), StartBlock); in unfold() 505 BranchInst *SITerm = dyn_cast<BranchInst>(SIBB->getTerminator()); in isValidSelectInst() 1163 if (!Inst || !Entry.second || isa<BranchInst>(Inst) || in updateDefMap() [all …]
|
H A D | SimpleLoopUnswitch.cpp | 140 BranchInst *Term; 144 CompareDesc(BranchInst *Term, Value *Invariant, BasicBlock *InLoopSucc) in CompareDesc() 509 static bool unswitchTrivialBranch(Loop &L, BranchInst &BI, DominatorTree &DT, in unswitchTrivialBranch() 635 Instruction *NewBI = BranchInst::Create(ContinueBB, ParentBB); in unswitchTrivialBranch() 673 Instruction *NewBI = BranchInst::Create(ContinueBB, ParentBB); in unswitchTrivialBranch() 981 Instruction *NewBI = BranchInst::Create(CommonSuccBB, BB); in unswitchTrivialSwitch() 1099 auto *BI = dyn_cast<BranchInst>(CurrentBB->getTerminator()); in unswitchAllTrivialConditions() 1107 auto *BI = dyn_cast<BranchInst>(CurrentTerm); in unswitchAllTrivialConditions() 1129 BI = cast<BranchInst>(CurrentBB->getTerminator()); in unswitchAllTrivialConditions() 1314 if (auto *BI = dyn_cast<BranchInst>(ClonedTerminator)) in buildClonedLoopBlocks() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Vectorize/ |
H A D | LoopIdiomVectorize.cpp | 399 BranchInst *JumpToVectorLoop = BranchInst::Create(VectorLoopStartBlock); in createMaskedFindMismatch() 429 BranchInst *VectorEarlyExit = BranchInst::Create( in createMaskedFindMismatch() 452 BranchInst *VectorLoopBranchBack = in createMaskedFindMismatch() 453 BranchInst::Create(VectorLoopStartBlock, EndBlock, PredHasActiveLanes); in createMaskedFindMismatch() 492 auto *JumpToVectorLoop = BranchInst::Create(VectorLoopStartBlock); in createPredicatedFindMismatch() 542 auto *VectorEarlyExit = BranchInst::Create(VectorLoopMismatchBlock, in createPredicatedFindMismatch() 561 BranchInst::Create(VectorLoopStartBlock, EndBlock, ExitCond); in createPredicatedFindMismatch() 593 BranchInst *PHBranch = cast<BranchInst>(Preheader->getTerminator()); in expandFindMismatch() 682 BranchInst *MinItCheckBr = in expandFindMismatch() 683 BranchInst::Create(MemCheckBlock, LoopPreHeaderBlock, LimitCheck); in expandFindMismatch() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Analysis/ |
H A D | LoopNestAnalysis.cpp | 57 const BranchInst *BI = dyn_cast<BranchInst>(Latch->getTerminator()); in getOuterLoopLatchCmp() 72 BranchInst *InnerGuard = InnerLoop.getLoopGuardBranch(); in getInnerLoopGuardCmp() 90 isSafeToSpeculativelyExecute(&I) || isa<PHINode>(I) || isa<BranchInst>(I); in checkSafeInstruction() 367 const BranchInst *BI = dyn_cast<BranchInst>(SingleSucc.getTerminator()); in checkLoopsStructure()
|
/freebsd/contrib/llvm-project/llvm/lib/Target/NVPTX/ |
H A D | NVPTXImageOptimizer.cpp | 151 if (BranchInst *BI = dyn_cast<BranchInst>(U)) { in replaceWith() 160 BranchInst::Create(Dest, BI->getIterator()); in replaceWith()
|
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/ |
H A D | ExpandMemCmp.cpp | 392 BranchInst *CmpBr = in emitLoadCompareByteBlock() 393 BranchInst::Create(EndBlock, LoadCmpBlocks[BlockIndex + 1], Cmp); in emitLoadCompareByteBlock() 401 BranchInst *CmpBr = BranchInst::Create(EndBlock); in emitLoadCompareByteBlock() 490 BranchInst *CmpBr = BranchInst::Create(ResBlock.BB, NextBB, Cmp); in emitLoadCompareBlockMultipleLoads() 554 BranchInst *CmpBr = BranchInst::Create(NextBB, ResBlock.BB, Cmp); in emitLoadCompareBlock() 580 BranchInst *NewBr = BranchInst::Create(EndBlock); in emitMemCmpResultBlock() 597 BranchInst *NewBr = BranchInst::Create(EndBlock); in emitMemCmpResultBlock()
|