/external/llvm/lib/Transforms/Utils/ |
D | FlattenCFG.cpp | 139 BranchInst *PBI = dyn_cast<BranchInst>(Pred->getTerminator()); in FlattenParallelAndOr() 211 BranchInst *BPS = dyn_cast<BranchInst>(PS->getTerminator()); in FlattenParallelAndOr() 222 TerminatorInst *TBB = LastCondBlock->getTerminator(); in FlattenParallelAndOr() 225 BranchInst *PBI1 = dyn_cast<BranchInst>(PS1->getTerminator()); in FlattenParallelAndOr() 226 BranchInst *PBI2 = dyn_cast<BranchInst>(PS2->getTerminator()); in FlattenParallelAndOr() 231 (PS1->getTerminator()->getSuccessor(0) != PS2)) { in FlattenParallelAndOr() 234 (PS2->getTerminator()->getSuccessor(0) != PS1)) in FlattenParallelAndOr() 242 BranchInst *BI = dyn_cast<BranchInst>(CurrBlock->getTerminator()); in FlattenParallelAndOr() 269 BranchInst *PBI = dyn_cast<BranchInst>(FirstCondBlock->getTerminator()); in FlattenParallelAndOr() 280 PBI = cast<BranchInst>(FirstCondBlock->getTerminator()); in FlattenParallelAndOr() [all …]
|
D | BasicBlockUtils.cpp | 40 TerminatorInst *BBTerm = BB->getTerminator(); in DeleteDeadBlock() 121 if (PredBB->getTerminator()->isExceptional()) in MergeBlockIntoPredecessor() 243 TerminatorInst *LatchTerm = BB->getTerminator(); in SplitEdge() 260 assert(BB->getTerminator()->getNumSuccessors() == 1 && in SplitEdge() 262 return SplitBlock(BB, BB->getTerminator(), DT, LI); in SplitEdge() 270 TerminatorInst *TI = I->getTerminator(); in SplitAllCriticalEdges() 506 assert(!isa<IndirectBrInst>(Preds[i]->getTerminator()) && in SplitBlockPredecessors() 508 Preds[i]->getTerminator()->replaceUsesOfWith(BB, NewBB); in SplitBlockPredecessors() 569 assert(!isa<IndirectBrInst>(Preds[i]->getTerminator()) && in SplitLandingPadPredecessors() 571 Preds[i]->getTerminator()->replaceUsesOfWith(OrigBB, NewBB1); in SplitLandingPadPredecessors() [all …]
|
D | LoopVersioning.cpp | 58 LAI.addRuntimeChecks(RuntimeCheckBB->getTerminator(), AliasChecks); in versionLoop() 65 Exp.expandCodeForPredicate(&Pred, RuntimeCheckBB->getTerminator()); in versionLoop() 76 I->insertBefore(RuntimeCheckBB->getTerminator()); in versionLoop() 90 SplitBlock(RuntimeCheckBB, RuntimeCheckBB->getTerminator(), DT, LI); in versionLoop() 104 Instruction *OrigTerm = RuntimeCheckBB->getTerminator(); in versionLoop()
|
D | LoopSimplify.cpp | 130 if (isa<IndirectBrInst>(P->getTerminator())) return nullptr; in InsertPreheaderForLoop() 166 if (isa<IndirectBrInst>(P->getTerminator())) return nullptr; in rewriteLoopExitBlock() 271 if (isa<IndirectBrInst>(PN->getIncomingBlock(i)->getTerminator())) in separateNestedLoop() 372 if (isa<IndirectBrInst>(P->getTerminator())) in insertUniqueBackedgeBlock() 444 TerminatorInst *TI = BackedgeBlocks[i]->getTerminator(); in insertUniqueBackedgeBlock() 496 TerminatorInst *TI = P->getTerminator(); in simplifyOneLoop() 498 P->getTerminator()->eraseFromParent(); in simplifyOneLoop() 511 if (BranchInst *BI = dyn_cast<BranchInst>((*I)->getTerminator())) in simplifyOneLoop() 631 BranchInst *BI = dyn_cast<BranchInst>(ExitingBlock->getTerminator()); in simplifyOneLoop() 648 Preheader ? Preheader->getTerminator() in simplifyOneLoop() [all …]
|
D | LoopUnrollRuntime.cpp | 83 PrologEnd->getTerminator()); in ConnectProlog() 115 Instruction *InsertPt = PrologEnd->getTerminator(); in ConnectProlog() 178 InsertTop->getTerminator()->setSuccessor(0, NewBB); in CloneLoopBlocks() 184 VMap.erase((*BB)->getTerminator()); in CloneLoopBlocks() 186 BranchInst *LatchBR = cast<BranchInst>(NewBB->getTerminator()); in CloneLoopBlocks() 339 BasicBlock *NewPH = SplitBlock(PEnd, PEnd->getTerminator(), DT, LI); in UnrollRuntimeLoopProlog() 340 BranchInst *PreHeaderBR = cast<BranchInst>(PH->getTerminator()); in UnrollRuntimeLoopProlog()
|
D | UnifyFunctionExitNodes.cpp | 54 if (isa<ReturnInst>(I.getTerminator())) in runOnFunction() 56 else if (isa<UnreachableInst>(I.getTerminator())) in runOnFunction() 114 PN->addIncoming(BB->getTerminator()->getOperand(0), BB); in runOnFunction()
|
D | SimplifyCFG.cpp | 287 BranchInst *BI = dyn_cast<BranchInst>(PBB->getTerminator()); in DominatesMergePoint() 649 Value *PredVal = isValueEqualityComparison(Pred->getTerminator()); in SimplifyEqualityComparisonWithOnlyPredecessor() 661 BasicBlock *PredDef = GetValueEqualityComparisonCases(Pred->getTerminator(), in SimplifyEqualityComparisonWithOnlyPredecessor() 690 DEBUG(dbgs() << "Threading pred instr: " << *Pred->getTerminator() in SimplifyEqualityComparisonWithOnlyPredecessor() 703 DEBUG(dbgs() << "Threading pred instr: " << *Pred->getTerminator() in SimplifyEqualityComparisonWithOnlyPredecessor() 772 DEBUG(dbgs() << "Threading pred instr: " << *Pred->getTerminator() in SimplifyEqualityComparisonWithOnlyPredecessor() 859 TerminatorInst *PTI = Pred->getTerminator(); in FoldValueComparisonIntoPredecessors() 1240 BranchInst *BI2 = dyn_cast<BranchInst>(BB2->getTerminator()); in SinkThenElseCodeToEnd() 1498 BasicBlock *EndBB = ThenBB->getTerminator()->getSuccessor(0); in SpeculativelyExecuteBB() 1688 BranchInst *BI = cast<BranchInst>(BB->getTerminator()); in BlockIsSimpleEnoughToThreadThrough() [all …]
|
D | CloneFunction.cpp | 149 if (ReturnInst *RI = dyn_cast<ReturnInst>(CBB->getTerminator())) in CloneFunctionInto() 398 const TerminatorInst *OldTI = BB->getTerminator(); in CloneBlock() 412 const TerminatorInst *TI = NewBB->getTerminator(); in CloneBlock() 467 const TerminatorInst *TI = BB->getTerminator(); in CloneBlock() 559 RemapInstruction(NewBB->getTerminator(), VMap, in CloneAndPruneIntoFromInst() 680 BranchInst *BI = dyn_cast<BranchInst>(I->getTerminator()); in CloneAndPruneIntoFromInst() 714 if (ReturnInst *RI = dyn_cast<ReturnInst>(I->getTerminator())) in CloneAndPruneIntoFromInst()
|
/external/llvm/tools/llvm-stress/ |
D | llvm-stress.cpp | 303 Value *V = new LoadInst(Ptr, "L", BB->getTerminator()); in Act() 322 new StoreInst(Val, Ptr, BB->getTerminator()); in Act() 344 Instruction* Term = BB->getTerminator(); in Act() 434 "E", BB->getTerminator()); in Act() 461 BB->getTerminator()); in Act() 477 "I", BB->getTerminator()); in Act() 505 new BitCastInst(V, DestTy, "PC", BB->getTerminator())); in Act() 514 new BitCastInst(V, DestTy, "BC", BB->getTerminator())); in Act() 522 new TruncInst(V, DestTy, "Tr", BB->getTerminator())); in Act() 527 new ZExtInst(V, DestTy, "ZE", BB->getTerminator())); in Act() [all …]
|
/external/llvm/lib/Transforms/Scalar/ |
D | MergedLoadStoreMotion.cpp | 201 BranchInst *BI = (BranchInst *)(BB->getTerminator()); in getDiamondTail() 203 BasicBlock *Tail = Succ0->getTerminator()->getSuccessor(0); in getDiamondTail() 213 if (!isa<BranchInst>(BB->getTerminator())) in isDiamondHead() 215 if (BB->getTerminator()->getNumSuccessors() != 2) in isDiamondHead() 218 BranchInst *BI = (BranchInst *)(BB->getTerminator()); in isDiamondHead() 223 Succ0->getTerminator()->getNumSuccessors() != 1) in isDiamondHead() 226 Succ1->getTerminator()->getNumSuccessors() != 1) in isDiamondHead() 229 BasicBlock *Tail = Succ0->getTerminator()->getSuccessor(0); in isDiamondHead() 231 if (Succ1->getTerminator()->getSuccessor(0) != Tail) in isDiamondHead() 302 Instruction *HoistPt = BB->getTerminator(); in hoistInstruction() [all …]
|
D | JumpThreading.cpp | 233 << "' with terminator: " << *BB->getTerminator() << '\n'); in runOnFunction() 241 BranchInst *BI = dyn_cast<BranchInst>(BB->getTerminator()); in runOnFunction() 678 TerminatorInst *BBTerm = BB->getTerminator(); in GetBestDestForJumpOnUndef() 719 const TerminatorInst *TI = SinglePred->getTerminator(); in ProcessBlock() 739 Instruction *Terminator = BB->getTerminator(); in ProcessBlock() 773 TerminatorInst *BBTerm = BB->getTerminator(); in ProcessBlock() 791 << "' folding terminator: " << *BB->getTerminator() << '\n'); in ProcessBlock() 813 BranchInst *CondBr = dyn_cast<BranchInst>(BB->getTerminator()); in ProcessBlock() 871 if (PN->getParent() == BB && isa<BranchInst>(BB->getTerminator())) in ProcessBlock() 877 CondInst->getParent() == BB && isa<BranchInst>(BB->getTerminator())) in ProcessBlock() [all …]
|
D | SimplifyCFGPass.cpp | 64 ReturnInst *Ret = dyn_cast<ReturnInst>(BB.getTerminator()); in mergeEmptyReturnBlocks() 96 cast<ReturnInst>(RetBlock->getTerminator())->getOperand(0)) { in mergeEmptyReturnBlocks() 105 Value *InVal = cast<ReturnInst>(RetBlock->getTerminator())->getOperand(0); in mergeEmptyReturnBlocks() 113 RetBlock->getTerminator()->setOperand(0, RetBlockPHI); in mergeEmptyReturnBlocks() 120 BB.getTerminator()->eraseFromParent(); in mergeEmptyReturnBlocks()
|
D | LoopIdiomRecognize.cpp | 531 IRBuilder<> Builder(Preheader->getTerminator()); in processLoopStridedStore() 548 Expander.expandCodeFor(Start, DestInt8PtrTy, Preheader->getTerminator()); in processLoopStridedStore() 571 Expander.expandCodeFor(NumBytesS, IntPtr, Preheader->getTerminator()); in processLoopStridedStore() 639 IRBuilder<> Builder(Preheader->getTerminator()); in processLoopStoreOfLoopLoad() 657 StrStart, Builder.getInt8PtrTy(StrAS), Preheader->getTerminator()); in processLoopStoreOfLoopLoad() 677 LdStart, Builder.getInt8PtrTy(LdAS), Preheader->getTerminator()); in processLoopStoreOfLoopLoad() 701 Expander.expandCodeFor(NumBytesS, IntPtrTy, Preheader->getTerminator()); in processLoopStoreOfLoopLoad() 790 dyn_cast<BranchInst>(LoopEntry->getTerminator()), LoopEntry)) in detectPopcountIdiom() 872 auto *PreCondBr = dyn_cast<BranchInst>(PreCondBB->getTerminator()); in detectPopcountIdiom() 912 if (&PH->front() != PH->getTerminator()) in recognizePopcount() [all …]
|
D | LoopInterchange.cpp | 529 dyn_cast<BranchInst>(OuterMostLoopLatch->getTerminator()); in processLoopList() 651 dyn_cast<BranchInst>(OuterLoopHeader->getTerminator()); in tightlyNested() 740 if (BranchInst *BI = dyn_cast<BranchInst>(LatchBlock->getTerminator())) { in getLoopLatchExitBlock() 1124 FromBB->getTerminator()->getIterator()); in moveBBContents() 1131 moveBBContents(OuterLoopPreHeader, InnerPreHeader->getTerminator()); in adjustOuterLoopPreheader() 1138 moveBBContents(InnerLoopPreHeader, OuterHeader->getTerminator()); in adjustInnerLoopPreheader() 1171 dyn_cast<BranchInst>(OuterLoopLatch->getTerminator()); in adjustLoopBranches() 1173 dyn_cast<BranchInst>(InnerLoopLatch->getTerminator()); in adjustLoopBranches() 1175 dyn_cast<BranchInst>(OuterLoopHeader->getTerminator()); in adjustLoopBranches() 1177 dyn_cast<BranchInst>(InnerLoopHeader->getTerminator()); in adjustLoopBranches() [all …]
|
D | LoopRotation.cpp | 135 BranchInst *BI = dyn_cast<BranchInst>(OrigHeader->getTerminator()); in rotateLoop() 218 TerminatorInst *LoopEntryBranch = OrigPreheader->getTerminator(); in rotateLoop() 264 TerminatorInst *TI = OrigHeader->getTerminator(); in rotateLoop() 291 BranchInst *PHBI = cast<BranchInst>(OrigPreheader->getTerminator()); in rotateLoop() 339 if (isa<IndirectBrInst>((*PI)->getTerminator())) in rotateLoop() 490 BranchInst *Jmp = dyn_cast<BranchInst>(Latch->getTerminator()); in simplifyLoopLatch() 498 BranchInst *BI = dyn_cast<BranchInst>(LastExit->getTerminator()); in simplifyLoopLatch()
|
D | LoopUnswitch.cpp | 537 TerminatorInst *TI = (*I)->getTerminator(); in processCurrentLoop() 788 loopPreheader->getTerminator(), TI); in UnswitchTrivialCondition() 789 LPM->deleteSimpleAnalysisValue(loopPreheader->getTerminator(), L); in UnswitchTrivialCondition() 790 loopPreheader->getTerminator()->eraseFromParent(); in UnswitchTrivialCondition() 810 TerminatorInst *CurrentTerm = CurrentBB->getTerminator(); in TryTrivialLoopUnswitch() 860 CurrentTerm = CurrentBB->getTerminator(); in TryTrivialLoopUnswitch() 1048 assert(NewExit->getTerminator()->getNumSuccessors() == 1 && in UnswitchNontrivialCondition() 1050 BasicBlock *ExitSucc = NewExit->getTerminator()->getSuccessor(0); in UnswitchNontrivialCondition() 1084 BranchInst *OldBR = cast<BranchInst>(loopPreheader->getTerminator()); in UnswitchNontrivialCondition() 1246 NewSISucc->getTerminator()->eraseFromParent(); in RewriteLoopBodyWithConditionConstant()
|
/external/llvm/lib/Target/NVPTX/ |
D | NVPTXLowerAggrCopies.cpp | 71 OrigBB->getTerminator()->setSuccessor(0, LoopBB); in convertMemCpyToLoop() 72 IRBuilder<> Builder(OrigBB->getTerminator()); in convertMemCpyToLoop() 165 new ICmpInst(OrigBB->getTerminator(), ICmpInst::ICMP_EQ, CopyLen, in convertMemMoveToLoop() 216 OrigBB->getTerminator()->setSuccessor(0, LoopBB); in convertMemSetToLoop() 217 IRBuilder<> Builder(OrigBB->getTerminator()); in convertMemSetToLoop()
|
/external/llvm/include/llvm/IR/ |
D | CFG.h | 121 return succ_iterator(BB->getTerminator()); in succ_begin() 124 return succ_const_iterator(BB->getTerminator()); in succ_begin() 127 return succ_iterator(BB->getTerminator(), true); in succ_end() 130 return succ_const_iterator(BB->getTerminator(), true); in succ_end()
|
/external/llvm/include/llvm/Transforms/Utils/ |
D | BasicBlockUtils.h | 136 return SplitCriticalEdge(BB->getTerminator(), SI.getSuccessorIndex(), 149 TerminatorInst *TI = (*PI)->getTerminator(); 164 TerminatorInst *TI = Src->getTerminator();
|
/external/llvm/lib/Transforms/IPO/ |
D | LoopExtractor.cpp | 107 L->getHeader()->getParent()->getEntryBlock().getTerminator(); in runOnLoop() 118 if (!isa<ReturnInst>(ExitBlocks[i]->getTerminator())) { in runOnLoop() 238 isa<InvokeInst>(Parent->getTerminator())) { in SplitLandingPadPreds() 304 dyn_cast<InvokeInst>(BlocksToExtract[i]->getTerminator())) in runOnModule()
|
D | PartialInlining.cpp | 54 BranchInst *BR = dyn_cast<BranchInst>(entryBlock->getTerminator()); in unswitchFunction() 62 if (isa<ReturnInst>(BB->getTerminator())) { in unswitchFunction() 110 newEntryBlock->getTerminator()->replaceUsesOfWith(preReturn, newReturnBlock); in unswitchFunction()
|
/external/llvm/lib/Analysis/ |
D | BranchProbabilityInfo.cpp | 123 TerminatorInst *TI = BB->getTerminator(); in calcUnreachableHeuristics() 183 TerminatorInst *TI = BB->getTerminator(); in calcMetadataWeights() 245 TerminatorInst *TI = BB->getTerminator(); in calcColdCallHeuristics() 300 BranchInst * BI = dyn_cast<BranchInst>(BB->getTerminator()); in calcPointerHeuristics() 391 BranchInst * BI = dyn_cast<BranchInst>(BB->getTerminator()); in calcZeroHeuristics() 473 BranchInst *BI = dyn_cast<BranchInst>(BB->getTerminator()); in calcFloatingPointHeuristics() 509 InvokeInst *II = dyn_cast<InvokeInst>(BB->getTerminator()); in calcInvokeHeuristics()
|
D | LoopInfo.cpp | 114 InsertPt = Preheader->getTerminator(); in makeLoopInvariant() 234 if (isa<IndirectBrInst>((*I)->getTerminator())) in isSafeToClone() 237 if (const InvokeInst *II = dyn_cast<InvokeInst>((*I)->getTerminator())) { in isSafeToClone() 262 LoopID = getLoopLatch()->getTerminator()->getMetadata(LoopMDName); in getLoopID() 268 TerminatorInst *TI = (*I)->getTerminator(); in getLoopID() 299 getLoopLatch()->getTerminator()->setMetadata(LoopMDName, LoopID); in setLoopID() 305 TerminatorInst *TI = (*I)->getTerminator(); in setLoopID()
|
/external/llvm/lib/IR/ |
D | BasicBlock.cpp | 124 TerminatorInst *BasicBlock::getTerminator() { in getTerminator() function in BasicBlock 129 const TerminatorInst *BasicBlock::getTerminator() const { in getTerminator() function in BasicBlock 360 assert(getTerminator() && "Can't use splitBasicBlock on degenerate BB!"); in splitBasicBlock() 402 TerminatorInst *TI = getTerminator(); in replaceSuccessorsPhiUsesWith()
|
/external/llvm/include/llvm/Analysis/ |
D | CFGPrinter.h | 102 if (const BranchInst *BI = dyn_cast<BranchInst>(Node->getTerminator())) 107 if (const SwitchInst *SI = dyn_cast<SwitchInst>(Node->getTerminator())) {
|