/external/swiftshader/third_party/LLVM/lib/CodeGen/ |
D | SjLjEHPrepare.cpp | 171 LPad->getTerminator()->eraseFromParent(); in splitLandingPad() 411 if (ReturnInst *RI = dyn_cast<ReturnInst>(BB->getTerminator())) { in insertSjLjEHSupport() 415 } else if (InvokeInst *II = dyn_cast<InvokeInst>(BB->getTerminator())) { in insertSjLjEHSupport() 417 } else if (UnwindInst *UI = dyn_cast<UnwindInst>(BB->getTerminator())) { in insertSjLjEHSupport() 449 if (InvokeInst *II = dyn_cast<InvokeInst>(F.begin()->getTerminator())) { in insertSjLjEHSupport() 495 if (InvokeInst *II = dyn_cast<InvokeInst>(BB->getTerminator())) in insertSjLjEHSupport() 518 EntryBB->getTerminator()); in insertSjLjEHSupport() 523 EntryBB->getTerminator()); in insertSjLjEHSupport() 527 EntryBB->getTerminator()); in insertSjLjEHSupport() 532 EntryBB->getTerminator()); in insertSjLjEHSupport() [all …]
|
/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 | 38 TerminatorInst *BBTerm = BB->getTerminator(); in DeleteDeadBlock() 108 if (PredBB->getTerminator()->isExceptional()) in MergeBlockIntoPredecessor() 215 TerminatorInst *LatchTerm = BB->getTerminator(); in SplitEdge() 232 assert(BB->getTerminator()->getNumSuccessors() == 1 && in SplitEdge() 234 return SplitBlock(BB, BB->getTerminator(), DT, LI); in SplitEdge() 242 TerminatorInst *TI = BB.getTerminator(); in SplitAllCriticalEdges() 448 assert(!isa<IndirectBrInst>(Preds[i]->getTerminator()) && in SplitBlockPredecessors() 450 Preds[i]->getTerminator()->replaceUsesOfWith(BB, NewBB); in SplitBlockPredecessors() 498 assert(!isa<IndirectBrInst>(Preds[i]->getTerminator()) && in SplitLandingPadPredecessors() 500 Preds[i]->getTerminator()->replaceUsesOfWith(OrigBB, NewBB1); in SplitLandingPadPredecessors() [all …]
|
D | LoopUnrollRuntime.cpp | 117 Instruction *InsertPt = PrologExit->getTerminator(); in ConnectProlog() 247 Instruction *InsertPt = NewExit->getTerminator(); in ConnectEpilog() 307 InsertTop->getTerminator()->setSuccessor(0, NewBB); in CloneLoopBlocks() 313 VMap.erase((*BB)->getTerminator()); in CloneLoopBlocks() 315 BranchInst *LatchBR = cast<BranchInst>(NewBB->getTerminator()); in CloneLoopBlocks() 470 BranchInst *PreHeaderBR = cast<BranchInst>(PreHeader->getTerminator()); in UnrollRuntimeLoopRemainder() 506 NewPreHeader = SplitBlock(PreHeader, PreHeader->getTerminator(), DT, LI); in UnrollRuntimeLoopRemainder() 513 EpilogPreHeader = SplitBlock(NewExit, NewExit->getTerminator(), DT, LI); in UnrollRuntimeLoopRemainder() 520 PrologExit = SplitBlock(PrologPreHeader, PrologPreHeader->getTerminator(), in UnrollRuntimeLoopRemainder() 524 NewPreHeader = SplitBlock(PrologExit, PrologExit->getTerminator(), DT, LI); in UnrollRuntimeLoopRemainder() [all …]
|
D | UnifyFunctionExitNodes.cpp | 54 if (isa<ReturnInst>(I.getTerminator())) in runOnFunction() 56 else if (isa<UnreachableInst>(I.getTerminator())) in runOnFunction() 109 PN->addIncoming(BB->getTerminator()->getOperand(0), BB); in runOnFunction()
|
D | LoopSimplify.cpp | 131 if (isa<IndirectBrInst>(P->getTerminator())) return nullptr; in InsertPreheaderForLoop() 167 if (isa<IndirectBrInst>(P->getTerminator())) return nullptr; in rewriteLoopExitBlock() 272 if (isa<IndirectBrInst>(PN->getIncomingBlock(i)->getTerminator())) in separateNestedLoop() 373 if (isa<IndirectBrInst>(P->getTerminator())) in insertUniqueBackedgeBlock() 445 TerminatorInst *TI = BackedgeBlocks[i]->getTerminator(); in insertUniqueBackedgeBlock() 494 TerminatorInst *TI = P->getTerminator(); in simplifyOneLoop() 506 if (BranchInst *BI = dyn_cast<BranchInst>(ExitingBlock->getTerminator())) in simplifyOneLoop() 624 BranchInst *BI = dyn_cast<BranchInst>(ExitingBlock->getTerminator()); in simplifyOneLoop() 641 Preheader ? Preheader->getTerminator() in simplifyOneLoop() 850 if (isa<IndirectBrInst>((*PI)->getTerminator())) { [all …]
|
D | LoopVersioning.cpp | 65 LAI.addRuntimeChecks(RuntimeCheckBB->getTerminator(), AliasChecks); in versionLoop() 71 Exp.expandCodeForPredicate(&Pred, RuntimeCheckBB->getTerminator()); in versionLoop() 82 I->insertBefore(RuntimeCheckBB->getTerminator()); in versionLoop() 96 SplitBlock(RuntimeCheckBB, RuntimeCheckBB->getTerminator(), DT, LI); in versionLoop() 110 Instruction *OrigTerm = RuntimeCheckBB->getTerminator(); in versionLoop()
|
D | SimplifyCFG.cpp | 313 BranchInst *BI = dyn_cast<BranchInst>(PBB->getTerminator()); in DominatesMergePoint() 741 Value *PredVal = isValueEqualityComparison(Pred->getTerminator()); in SimplifyEqualityComparisonWithOnlyPredecessor() 756 GetValueEqualityComparisonCases(Pred->getTerminator(), PredCases); in SimplifyEqualityComparisonWithOnlyPredecessor() 784 DEBUG(dbgs() << "Threading pred instr: " << *Pred->getTerminator() in SimplifyEqualityComparisonWithOnlyPredecessor() 798 DEBUG(dbgs() << "Threading pred instr: " << *Pred->getTerminator() in SimplifyEqualityComparisonWithOnlyPredecessor() 868 DEBUG(dbgs() << "Threading pred instr: " << *Pred->getTerminator() in SimplifyEqualityComparisonWithOnlyPredecessor() 954 TerminatorInst *PTI = Pred->getTerminator(); in FoldValueComparisonIntoPredecessors() 1341 BranchInst *BI2 = dyn_cast<BranchInst>(BB2->getTerminator()); in SinkThenElseCodeToEnd() 1603 BasicBlock *EndBB = ThenBB->getTerminator()->getSuccessor(0); in SpeculativelyExecuteBB() 1779 BranchInst *BI = cast<BranchInst>(BB->getTerminator()); in BlockIsSimpleEnoughToThreadThrough() [all …]
|
/external/llvm/tools/llvm-stress/ |
D | llvm-stress.cpp | 302 Value *V = new LoadInst(Ptr, "L", BB->getTerminator()); in Act() 321 new StoreInst(Val, Ptr, BB->getTerminator()); in Act() 343 Instruction* Term = BB->getTerminator(); in Act() 433 "E", BB->getTerminator()); in Act() 460 BB->getTerminator()); in Act() 476 "I", BB->getTerminator()); in Act() 504 new BitCastInst(V, DestTy, "PC", BB->getTerminator())); in Act() 513 new BitCastInst(V, DestTy, "BC", BB->getTerminator())); in Act() 521 new TruncInst(V, DestTy, "Tr", BB->getTerminator())); in Act() 526 new ZExtInst(V, DestTy, "ZE", BB->getTerminator())); in Act() [all …]
|
/external/swiftshader/third_party/LLVM/lib/Transforms/Utils/ |
D | LowerInvoke.cpp | 175 if (InvokeInst *II = dyn_cast<InvokeInst>(BB->getTerminator())) { in insertCheapEHSupport() 196 } else if (UnwindInst *UI = dyn_cast<UnwindInst>(BB->getTerminator())) { in insertCheapEHSupport() 412 if (ReturnInst *RI = dyn_cast<ReturnInst>(BB->getTerminator())) { in insertExpensiveEHSupport() 416 } else if (InvokeInst *II = dyn_cast<InvokeInst>(BB->getTerminator())) { in insertExpensiveEHSupport() 418 } else if (UnwindInst *UI = dyn_cast<UnwindInst>(BB->getTerminator())) { in insertExpensiveEHSupport() 460 EntryBB->getTerminator()); in insertExpensiveEHSupport() 464 EntryBB->getTerminator()); in insertExpensiveEHSupport() 465 new StoreInst(OldBuf, OldJmpBufPtr, true, EntryBB->getTerminator()); in insertExpensiveEHSupport() 468 new StoreInst(JmpBuf, JBListHead, true, EntryBB->getTerminator()); in insertExpensiveEHSupport() 486 InvokeNum, true, EntryBB->getTerminator()); in insertExpensiveEHSupport() [all …]
|
D | SimplifyCFG.cpp | 141 BranchInst *Pred1Br = dyn_cast<BranchInst>(Pred1->getTerminator()); in GetIfCondition() 142 BranchInst *Pred2Br = dyn_cast<BranchInst>(Pred2->getTerminator()); in GetIfCondition() 194 BranchInst *BI = dyn_cast<BranchInst>(CommonPred->getTerminator()); in GetIfCondition() 246 BranchInst *BI = dyn_cast<BranchInst>(PBB->getTerminator()); in DominatesMergePoint() 552 Value *PredVal = isValueEqualityComparison(Pred->getTerminator()); in SimplifyEqualityComparisonWithOnlyPredecessor() 561 BasicBlock *PredDef = GetValueEqualityComparisonCases(Pred->getTerminator(), in SimplifyEqualityComparisonWithOnlyPredecessor() 590 DEBUG(dbgs() << "Threading pred instr: " << *Pred->getTerminator() in SimplifyEqualityComparisonWithOnlyPredecessor() 603 DEBUG(dbgs() << "Threading pred instr: " << *Pred->getTerminator() in SimplifyEqualityComparisonWithOnlyPredecessor() 652 DEBUG(dbgs() << "Threading pred instr: " << *Pred->getTerminator() in SimplifyEqualityComparisonWithOnlyPredecessor() 696 TerminatorInst *PTI = Pred->getTerminator(); in FoldValueComparisonIntoPredecessors() [all …]
|
D | BasicBlockUtils.cpp | 39 TerminatorInst *BBTerm = BB->getTerminator(); in DeleteDeadBlock() 126 if (isa<InvokeInst>(PredBB->getTerminator())) return false; in MergeBlockIntoPredecessor() 243 TerminatorInst *Term = BB->getTerminator(); in GetSuccessorNumber() 261 TerminatorInst *LatchTerm = BB->getTerminator(); in SplitEdge() 278 assert(BB->getTerminator()->getNumSuccessors() == 1 && in SplitEdge() 280 return SplitBlock(BB, BB->getTerminator(), P); in SplitEdge() 471 assert(!isa<IndirectBrInst>(Preds[i]->getTerminator()) && in SplitBlockPredecessors() 473 Preds[i]->getTerminator()->replaceUsesOfWith(BB, NewBB); in SplitBlockPredecessors() 533 assert(!isa<IndirectBrInst>(Preds[i]->getTerminator()) && in SplitLandingPadPredecessors() 535 Preds[i]->getTerminator()->replaceUsesOfWith(OrigBB, NewBB1); in SplitLandingPadPredecessors() [all …]
|
D | LoopSimplify.cpp | 172 TerminatorInst *TI = (*I)->getTerminator(); in ProcessLoop() 174 (*I)->getTerminator()->eraseFromParent(); in ProcessLoop() 187 if (BranchInst *BI = dyn_cast<BranchInst>((*I)->getTerminator())) in ProcessLoop() 295 BranchInst *BI = dyn_cast<BranchInst>(ExitingBlock->getTerminator()); in ProcessLoop() 311 Preheader ? Preheader->getTerminator() : 0)) { in ProcessLoop() 374 if (isa<IndirectBrInst>(P->getTerminator())) return 0; in InsertPreheaderForLoop() 386 NewBB->getTerminator()->setDebugLoc(Header->getFirstNonPHI()->getDebugLoc()); in InsertPreheaderForLoop() 406 if (isa<IndirectBrInst>(P->getTerminator())) return 0; in RewriteLoopExitBlock() 544 if (isa<IndirectBrInst>(PN->getIncomingBlock(i)->getTerminator())) in SeparateNestedLoop() 649 if (isa<IndirectBrInst>(P->getTerminator())) in InsertUniqueBackedgeBlock() [all …]
|
D | UnifyFunctionExitNodes.cpp | 56 if (isa<ReturnInst>(I->getTerminator())) in runOnFunction() 58 else if (isa<UnwindInst>(I->getTerminator())) in runOnFunction() 60 else if (isa<UnreachableInst>(I->getTerminator())) in runOnFunction() 135 PN->addIncoming(BB->getTerminator()->getOperand(0), BB); in runOnFunction()
|
/external/llvm/lib/Transforms/Scalar/ |
D | JumpThreading.cpp | 209 << "' with terminator: " << *BB->getTerminator() << '\n'); in runImpl() 217 BranchInst *BI = dyn_cast<BranchInst>(BB->getTerminator()); in runImpl() 269 const TerminatorInst *BBTerm = BB->getTerminator(); in getJumpThreadDuplicationCost() 674 TerminatorInst *BBTerm = BB->getTerminator(); in GetBestDestForJumpOnUndef() 715 const TerminatorInst *TI = SinglePred->getTerminator(); in ProcessBlock() 738 Instruction *Terminator = BB->getTerminator(); in ProcessBlock() 772 TerminatorInst *BBTerm = BB->getTerminator(); in ProcessBlock() 790 << "' folding terminator: " << *BB->getTerminator() << '\n'); in ProcessBlock() 812 BranchInst *CondBr = dyn_cast<BranchInst>(BB->getTerminator()); in ProcessBlock() 870 if (PN->getParent() == BB && isa<BranchInst>(BB->getTerminator())) in ProcessBlock() [all …]
|
D | SimplifyCFGPass.cpp | 66 ReturnInst *Ret = dyn_cast<ReturnInst>(BB.getTerminator()); in mergeEmptyReturnBlocks() 98 cast<ReturnInst>(RetBlock->getTerminator())->getOperand(0)) { in mergeEmptyReturnBlocks() 107 Value *InVal = cast<ReturnInst>(RetBlock->getTerminator())->getOperand(0); in mergeEmptyReturnBlocks() 115 RetBlock->getTerminator()->setOperand(0, RetBlockPHI); in mergeEmptyReturnBlocks() 122 BB.getTerminator()->eraseFromParent(); in mergeEmptyReturnBlocks()
|
D | LoopIdiomRecognize.cpp | 763 IRBuilder<> Builder(Preheader->getTerminator()); in processLoopStridedStore() 780 Expander.expandCodeFor(Start, DestInt8PtrTy, Preheader->getTerminator()); in processLoopStridedStore() 803 Expander.expandCodeFor(NumBytesS, IntPtr, Preheader->getTerminator()); in processLoopStridedStore() 869 IRBuilder<> Builder(Preheader->getTerminator()); in processLoopStoreOfLoopLoad() 887 StrStart, Builder.getInt8PtrTy(StrAS), Preheader->getTerminator()); in processLoopStoreOfLoopLoad() 909 LdStart, Builder.getInt8PtrTy(LdAS), Preheader->getTerminator()); in processLoopStoreOfLoopLoad() 933 Expander.expandCodeFor(NumBytesS, IntPtrTy, Preheader->getTerminator()); in processLoopStoreOfLoopLoad() 1022 dyn_cast<BranchInst>(LoopEntry->getTerminator()), LoopEntry)) in detectPopcountIdiom() 1104 auto *PreCondBr = dyn_cast<BranchInst>(PreCondBB->getTerminator()); in detectPopcountIdiom() 1144 if (&PH->front() != PH->getTerminator()) in recognizePopcount() [all …]
|
/external/swiftshader/third_party/LLVM/lib/Transforms/Scalar/ |
D | JumpThreading.cpp | 167 << "' with terminator: " << *BB->getTerminator() << '\n'); in runOnFunction() 175 BranchInst *BI = dyn_cast<BranchInst>(BB->getTerminator()); in runOnFunction() 595 TerminatorInst *BBTerm = BB->getTerminator(); in GetBestDestForJumpOnUndef() 636 if (SinglePred->getTerminator()->getNumSuccessors() == 1 && in ProcessBlock() 660 Instruction *Terminator = BB->getTerminator(); in ProcessBlock() 691 TerminatorInst *BBTerm = BB->getTerminator(); in ProcessBlock() 709 << "' folding terminator: " << *BB->getTerminator() << '\n'); in ProcessBlock() 730 BranchInst *CondBr = dyn_cast<BranchInst>(BB->getTerminator()); in ProcessBlock() 792 if (PN->getParent() == BB && isa<BranchInst>(BB->getTerminator())) in ProcessBlock() 798 CondInst->getParent() == BB && isa<BranchInst>(BB->getTerminator())) in ProcessBlock() [all …]
|
D | SimplifyCFGPass.cpp | 160 if (InvokeInst *II = dyn_cast<InvokeInst>(BB->getTerminator())) in MarkAliveBlocks() 220 ReturnInst *Ret = dyn_cast<ReturnInst>(BB.getTerminator()); in MergeEmptyReturnBlocks() 253 cast<ReturnInst>(RetBlock->getTerminator())->getOperand(0)) { in MergeEmptyReturnBlocks() 262 Value *InVal = cast<ReturnInst>(RetBlock->getTerminator())->getOperand(0); in MergeEmptyReturnBlocks() 270 RetBlock->getTerminator()->setOperand(0, RetBlockPHI); in MergeEmptyReturnBlocks() 277 BB.getTerminator()->eraseFromParent(); in MergeEmptyReturnBlocks()
|
D | LoopUnswitch.cpp | 240 TerminatorInst *TI = (*I)->getTerminator(); in processCurrentLoop() 353 TerminatorInst *HeaderTerm = Header->getTerminator(); in IsTrivialUnswitchCondition() 541 loopPreheader->getTerminator()); in UnswitchTrivialCondition() 542 LPM->deleteSimpleAnalysisValue(loopPreheader->getTerminator(), L); in UnswitchTrivialCondition() 543 loopPreheader->getTerminator()->eraseFromParent(); in UnswitchTrivialCondition() 649 assert(NewExit->getTerminator()->getNumSuccessors() == 1 && in UnswitchNontrivialCondition() 651 BasicBlock *ExitSucc = NewExit->getTerminator()->getSuccessor(0); in UnswitchNontrivialCondition() 685 BranchInst *OldBR = cast<BranchInst>(loopPreheader->getTerminator()); in UnswitchNontrivialCondition() 774 LPM->deleteSimpleAnalysisValue(Pred->getTerminator(), L); in RemoveBlockIfDead() 775 Pred->getTerminator()->eraseFromParent(); in RemoveBlockIfDead() [all …]
|
D | LoopIdiomRecognize.cpp | 474 IRBuilder<> Builder(Preheader->getTerminator()); in processLoopStridedStore() 485 Preheader->getTerminator()); in processLoopStridedStore() 511 Expander.expandCodeFor(NumBytesS, IntPtr, Preheader->getTerminator()); in processLoopStridedStore() 563 IRBuilder<> Builder(Preheader->getTerminator()); in processLoopStoreOfLoopLoad() 575 Preheader->getTerminator()); in processLoopStoreOfLoopLoad() 591 Preheader->getTerminator()); in processLoopStoreOfLoopLoad() 617 Expander.expandCodeFor(NumBytesS, IntPtr, Preheader->getTerminator()); in processLoopStoreOfLoopLoad()
|
/external/swiftshader/third_party/LLVM/lib/Analysis/ |
D | BranchProbabilityInfo.cpp | 93 TerminatorInst *TI = BB->getTerminator(); in isReturningBlock() 116 return UINT32_MAX / BB->getTerminator()->getNumSuccessors(); in getMaxWeightFor() 147 TerminatorInst *TI = BB->getTerminator(); in calcMetadataWeights() 185 if (BB->getTerminator()->getNumSuccessors() == 1) in calcReturnHeuristics() 225 BranchInst * BI = dyn_cast<BranchInst>(BB->getTerminator()); in calcPointerHeuristics() 260 uint32_t numSuccs = BB->getTerminator()->getNumSuccessors(); in calcLoopBranchHeuristics() 324 BranchInst * BI = dyn_cast<BranchInst>(BB->getTerminator()); in calcZeroHeuristics()
|
/external/llvm/lib/Analysis/ |
D | LoopInfo.cpp | 90 InsertPt = Preheader->getTerminator(); in makeLoopInvariant() 196 if (isa<IndirectBrInst>(BB->getTerminator())) in isSafeToClone() 210 LoopID = getLoopLatch()->getTerminator()->getMetadata(LLVMContext::MD_loop); in getLoopID() 216 TerminatorInst *TI = BB->getTerminator(); in getLoopID() 247 getLoopLatch()->getTerminator()->setMetadata(LLVMContext::MD_loop, LoopID); in setLoopID() 253 TerminatorInst *TI = BB->getTerminator(); in setLoopID() 311 if (DebugLoc DL = PHeadBB->getTerminator()->getDebugLoc()) in getStartLoc() 317 return HeadBB->getTerminator()->getDebugLoc(); in getStartLoc()
|
/external/swiftshader/third_party/LLVM/include/llvm/Transforms/Utils/ |
D | BasicBlockUtils.h | 117 return SplitCriticalEdge(BB->getTerminator(), SI.getSuccessorIndex(), P); 127 TerminatorInst *TI = (*PI)->getTerminator(); 142 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() 305 dyn_cast<InvokeInst>(BlockToExtract->getTerminator())) in runOnModule()
|