Home
last modified time | relevance | path

Searched refs:getTerminator (Results 1 – 25 of 378) sorted by relevance

12345678910>>...16

/external/swiftshader/third_party/llvm-7.0/llvm/unittests/IR/
DDeferredDominanceTest.cpp82 EXPECT_EQ(BB0->getTerminator()->getNumSuccessors(), 4u); in TEST()
83 BB0->getTerminator()->eraseFromParent(); in TEST()
85 EXPECT_EQ(BB0->getTerminator()->getNumSuccessors(), 2u); in TEST()
94 ASSERT_FALSE(isa<UnreachableInst>(BB3->getTerminator())); in TEST()
98 ASSERT_TRUE(isa<UnreachableInst>(BB3->getTerminator())); in TEST()
139 EXPECT_EQ(BB0->getTerminator()->getNumSuccessors(), 3u); in TEST()
140 BB0->getTerminator()->eraseFromParent(); in TEST()
142 EXPECT_EQ(BB0->getTerminator()->getNumSuccessors(), 1u); in TEST()
152 EXPECT_EQ(BB0->getTerminator()->getNumSuccessors(), 1u); in TEST()
153 BB0->getTerminator()->eraseFromParent(); in TEST()
[all …]
DCFGBuilder.cpp44 if (isa<UnreachableInst>(From->getTerminator())) in ConnectBlocks()
45 From->getTerminator()->eraseFromParent(); in ConnectBlocks()
46 if (!From->getTerminator()) { in ConnectBlocks()
52 SwitchInst *SI = cast<SwitchInst>(From->getTerminator()); in ConnectBlocks()
63 SwitchInst *SI = cast<SwitchInst>(From->getTerminator()); in DisconnectBlocks()
174 EXPECT_TRUE(isa<SwitchInst>(B.getOrAddBlock("entry")->getTerminator())); in TEST()
175 EXPECT_TRUE(isa<SwitchInst>(B.getOrAddBlock("a")->getTerminator())); in TEST()
176 EXPECT_TRUE(isa<UnreachableInst>(B.getOrAddBlock("b")->getTerminator())); in TEST()
177 EXPECT_TRUE(isa<SwitchInst>(B.getOrAddBlock("d")->getTerminator())); in TEST()
179 auto *DSwitch = cast<SwitchInst>(B.getOrAddBlock("d")->getTerminator()); in TEST()
[all …]
DDomTreeUpdaterTest.cpp72 SwitchInst *SI = dyn_cast<SwitchInst>(BB0->getTerminator()); in TEST()
91 EXPECT_EQ(BB0->getTerminator()->getNumSuccessors(), 3u); in TEST()
99 EXPECT_EQ(BB0->getTerminator()->getNumSuccessors(), 2u); in TEST()
103 ASSERT_FALSE(isa<UnreachableInst>(BB3->getTerminator())); in TEST()
194 EXPECT_EQ(NewEntry->getTerminator()->getNumSuccessors(), 1u); in TEST()
195 NewEntry->getTerminator()->eraseFromParent(); in TEST()
197 EXPECT_EQ(BB0->getTerminator()->getNumSuccessors(), 1u); in TEST()
207 ASSERT_FALSE(isa<UnreachableInst>(BB0->getTerminator())); in TEST()
271 EXPECT_EQ(BB0->getTerminator()->getNumSuccessors(), 4u); in TEST()
272 BB0->getTerminator()->eraseFromParent(); in TEST()
[all …]
/external/llvm/lib/Transforms/Utils/
DFlattenCFG.cpp139 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 …]
DBasicBlockUtils.cpp38 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 …]
DLoopUnrollRuntime.cpp117 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 …]
DUnifyFunctionExitNodes.cpp54 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()
DLoopSimplify.cpp131 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 …]
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Utils/
DFlattenCFG.cpp152 BranchInst *PBI = dyn_cast<BranchInst>(Pred->getTerminator()); in FlattenParallelAndOr()
224 BranchInst *BPS = dyn_cast<BranchInst>(PS->getTerminator()); in FlattenParallelAndOr()
235 TerminatorInst *TBB = LastCondBlock->getTerminator(); in FlattenParallelAndOr()
238 BranchInst *PBI1 = dyn_cast<BranchInst>(PS1->getTerminator()); in FlattenParallelAndOr()
239 BranchInst *PBI2 = dyn_cast<BranchInst>(PS2->getTerminator()); in FlattenParallelAndOr()
244 (PS1->getTerminator()->getSuccessor(0) != PS2)) { in FlattenParallelAndOr()
247 (PS2->getTerminator()->getSuccessor(0) != PS1)) in FlattenParallelAndOr()
255 BranchInst *BI = dyn_cast<BranchInst>(CurrBlock->getTerminator()); in FlattenParallelAndOr()
282 BranchInst *PBI = dyn_cast<BranchInst>(FirstCondBlock->getTerminator()); in FlattenParallelAndOr()
293 PBI = cast<BranchInst>(FirstCondBlock->getTerminator()); in FlattenParallelAndOr()
[all …]
DBasicBlockUtils.cpp52 TerminatorInst *BBTerm = BB->getTerminator(); in DeleteDeadBlock()
134 if (PredBB->getTerminator()->isExceptional()) in MergeBlockIntoPredecessor()
268 TerminatorInst *LatchTerm = BB->getTerminator(); in SplitEdge()
285 assert(BB->getTerminator()->getNumSuccessors() == 1 && in SplitEdge()
287 return SplitBlock(BB, BB->getTerminator(), DT, LI); in SplitEdge()
295 TerminatorInst *TI = BB.getTerminator(); in SplitAllCriticalEdges()
515 assert(!isa<IndirectBrInst>(Preds[i]->getTerminator()) && in SplitBlockPredecessors()
517 Preds[i]->getTerminator()->replaceUsesOfWith(BB, NewBB); in SplitBlockPredecessors()
567 assert(!isa<IndirectBrInst>(Preds[i]->getTerminator()) && in SplitLandingPadPredecessors()
569 Preds[i]->getTerminator()->replaceUsesOfWith(OrigBB, NewBB1); in SplitLandingPadPredecessors()
[all …]
DLoopUnrollRuntime.cpp132 Instruction *InsertPt = PrologExit->getTerminator(); in ConnectProlog()
254 Instruction *InsertPt = NewExit->getTerminator(); in ConnectEpilog()
317 InsertTop->getTerminator()->setSuccessor(0, NewBB); in CloneLoopBlocks()
334 VMap.erase((*BB)->getTerminator()); in CloneLoopBlocks()
336 BranchInst *LatchBR = cast<BranchInst>(NewBB->getTerminator()); in CloneLoopBlocks()
547 BranchInst *LatchBR = cast<BranchInst>(Latch->getTerminator()); in UnrollRuntimeLoopRemainder()
600 BranchInst *PreHeaderBR = cast<BranchInst>(PreHeader->getTerminator()); in UnrollRuntimeLoopRemainder()
635 NewPreHeader = SplitBlock(PreHeader, PreHeader->getTerminator(), DT, LI); in UnrollRuntimeLoopRemainder()
644 auto *NewExitTerminator = NewExit->getTerminator(); in UnrollRuntimeLoopRemainder()
645 NewExitTerminator->setDebugLoc(Header->getTerminator()->getDebugLoc()); in UnrollRuntimeLoopRemainder()
[all …]
DUnifyFunctionExitNodes.cpp53 if (isa<ReturnInst>(I.getTerminator())) in runOnFunction()
55 else if (isa<UnreachableInst>(I.getTerminator())) in runOnFunction()
108 PN->addIncoming(BB->getTerminator()->getOperand(0), BB); in runOnFunction()
DLoopRotationUtils.cpp174 BasicBlock *HeaderExit = Header->getTerminator()->getSuccessor(0); in shouldRotateLoopExitingLatch()
176 HeaderExit = Header->getTerminator()->getSuccessor(1); in shouldRotateLoopExitingLatch()
208 BranchInst *BI = dyn_cast<BranchInst>(OrigHeader->getTerminator()); in rotateLoop()
301 TerminatorInst *LoopEntryBranch = OrigPreheader->getTerminator(); in rotateLoop()
377 TerminatorInst *TI = OrigHeader->getTerminator(); in rotateLoop()
423 BranchInst *PHBI = cast<BranchInst>(OrigPreheader->getTerminator()); in rotateLoop()
450 if (isa<IndirectBrInst>(ExitPred->getTerminator())) in rotateLoop()
569 BranchInst *Jmp = dyn_cast<BranchInst>(Latch->getTerminator()); in simplifyLoopLatch()
577 BranchInst *BI = dyn_cast<BranchInst>(LastExit->getTerminator()); in simplifyLoopLatch()
DBreakCriticalEdges.cpp105 assert((SplitBB->getFirstNonPHI() == SplitBB->getTerminator() || in createPHIsForSplitLoopExit()
122 SplitBB->isLandingPad() ? &SplitBB->front() : SplitBB->getTerminator()); in createPHIsForSplitLoopExit()
315 TerminatorInst *PredTerm = PredBB->getTerminator(); in findIBRPredecessor()
342 auto *IBI = dyn_cast<IndirectBrInst>(BB.getTerminator()); in SplitIndirectBrCriticalEdges()
371 for (unsigned I = 0, E = BodyBlock->getTerminator()->getNumSuccessors(); in SplitIndirectBrCriticalEdges()
393 Src->getTerminator()->replaceUsesOfWith(Target, DirectSucc); in SplitIndirectBrCriticalEdges()
416 assert(&*End == Target->getTerminator() && in SplitIndirectBrCriticalEdges()
DLoopSimplify.cpp130 if (isa<IndirectBrInst>(P->getTerminator())) return nullptr; in InsertPreheaderForLoop()
240 if (isa<IndirectBrInst>(PN->getIncomingBlock(i)->getTerminator())) in separateNestedLoop()
362 if (isa<IndirectBrInst>(P->getTerminator())) in insertUniqueBackedgeBlock()
438 TerminatorInst *TI = BackedgeBlocks[i]->getTerminator(); in insertUniqueBackedgeBlock()
446 BEBlock->getTerminator()->setMetadata(LoopMDKind, LoopMD); in insertUniqueBackedgeBlock()
491 TerminatorInst *TI = P->getTerminator(); in simplifyOneLoop()
503 if (BranchInst *BI = dyn_cast<BranchInst>(ExitingBlock->getTerminator())) in simplifyOneLoop()
608 BranchInst *BI = dyn_cast<BranchInst>(ExitingBlock->getTerminator()); in simplifyOneLoop()
622 Preheader ? Preheader->getTerminator() in simplifyOneLoop()
833 if (isa<IndirectBrInst>((*PI)->getTerminator())) {
[all …]
DLoopUnrollAndJam.cpp75 TerminatorInst *TI = BB->getTerminator(); in partitionOuterLoopBlocks()
248 BranchInst *BI = dyn_cast<BranchInst>(LatchBlock->getTerminator()); in UnrollAndJamLoop()
254 SubLoop->getLoopLatch()->getTerminator()->getSuccessor(0)); in UnrollAndJamLoop()
284 Header, LatchBlock, SubLoop->getLoopPreheader()->getTerminator(), in UnrollAndJamLoop()
439 cast<BranchInst>(ForeBlocksLast.back()->getTerminator()); in UnrollAndJamLoop()
457 cast<BranchInst>(ForeBlocksLast[It - 1]->getTerminator()); in UnrollAndJamLoop()
464 cast<BranchInst>(SubLoopBlocksLast.back()->getTerminator()); in UnrollAndJamLoop()
476 cast<BranchInst>(SubLoopBlocksLast[It - 1]->getTerminator()); in UnrollAndJamLoop()
488 BranchInst *Term = cast<BranchInst>(AftBlocksLast.back()->getTerminator()); in UnrollAndJamLoop()
502 cast<BranchInst>(AftBlocksLast[It - 1]->getTerminator()); in UnrollAndJamLoop()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/AMDGPU/
DAMDGPUUnifyDivergentExitNodes.cpp108 if (!DA.isUniform(Top->getTerminator())) in isUniformlyReached()
146 PN->addIncoming(BB->getTerminator()->getOperand(0), BB); in unifyReturnBlockSet()
149 BB->getTerminator()->eraseFromParent(); in unifyReturnBlockSet()
177 if (isa<ReturnInst>(BB->getTerminator())) { in runOnFunction()
180 } else if (isa<UnreachableInst>(BB->getTerminator())) { in runOnFunction()
183 } else if (BranchInst *BI = dyn_cast<BranchInst>(BB->getTerminator())) { in runOnFunction()
227 BB->getTerminator()->eraseFromParent(); in runOnFunction()
239 UnreachableBlock->getTerminator()->eraseFromParent(); in runOnFunction()
/external/llvm/tools/llvm-stress/
Dllvm-stress.cpp302 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-7.0/llvm/tools/llvm-stress/
Dllvm-stress.cpp347 Value *V = new LoadInst(Ptr, "L", BB->getTerminator()); in Act()
368 new StoreInst(Val, Ptr, BB->getTerminator()); in Act()
390 Instruction* Term = BB->getTerminator(); in Act()
488 "E", BB->getTerminator()); in Act()
516 BB->getTerminator()); in Act()
532 "I", BB->getTerminator()); in Act()
560 new BitCastInst(V, DestTy, "PC", BB->getTerminator())); in Act()
569 new BitCastInst(V, DestTy, "BC", BB->getTerminator())); in Act()
576 new TruncInst(V, DestTy, "Tr", BB->getTerminator())); in Act()
581 new ZExtInst(V, DestTy, "ZE", BB->getTerminator())); in Act()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Scalar/
DJumpThreading.cpp204 BranchInst *CondBr = dyn_cast<BranchInst>(BB->getTerminator()); in updatePredecessorProfileMetadata()
221 BranchInst *PredBr = dyn_cast<BranchInst>(PredBB->getTerminator()); in updatePredecessorProfileMetadata()
249 BranchInst *PredBr = cast<BranchInst>(PredBB->getTerminator()); in updatePredecessorProfileMetadata()
389 << "' with terminator: " << *BB.getTerminator() in runImpl()
400 auto *BI = dyn_cast<BranchInst>(BB.getTerminator()); in runImpl()
466 if (BB->getTerminator() == StopAt) { in getJumpThreadDuplicationCost()
945 TerminatorInst *BBTerm = BB->getTerminator(); in GetBestDestForJumpOnUndef()
986 const TerminatorInst *TI = SinglePred->getTerminator(); in ProcessBlock()
1042 Instruction *Terminator = BB->getTerminator(); in ProcessBlock()
1078 TerminatorInst *BBTerm = BB->getTerminator(); in ProcessBlock()
[all …]
DCallSiteSplitting.cpp133 auto *BI = dyn_cast<BranchInst>(From->getTerminator()); in recordCondition()
145 Conditions.push_back({Cmp, From->getTerminator()->getSuccessor(0) == To in recordCondition()
196 if (Preds.size() != 2 || isa<IndirectBrInst>(Preds[0]->getTerminator()) || in canSplitCallSite()
197 isa<IndirectBrInst>(Preds[1]->getTerminator())) in canSplitCallSite()
251 TerminatorInst *TI = SplitBB->getTerminator(); in copyMustTailReturn()
332 &*std::prev(SplitBlock->getTerminator()->getIterator()); in splitCallSite()
367 Splits[i]->getTerminator()->eraseFromParent(); in splitCallSite()
485 auto IE = BB.getTerminator()->getIterator(); in doCallSiteSplitting()
490 while (II != IE && &*II != BB.getTerminator()) { in doCallSiteSplitting()
DSimplifyCFGPass.cpp83 ReturnInst *Ret = dyn_cast<ReturnInst>(BB.getTerminator()); in mergeEmptyReturnBlocks()
115 cast<ReturnInst>(RetBlock->getTerminator())->getOperand(0)) { in mergeEmptyReturnBlocks()
124 Value *InVal = cast<ReturnInst>(RetBlock->getTerminator())->getOperand(0); in mergeEmptyReturnBlocks()
132 RetBlock->getTerminator()->setOperand(0, RetBlockPHI); in mergeEmptyReturnBlocks()
139 BB.getTerminator()->eraseFromParent(); in mergeEmptyReturnBlocks()
/external/llvm/lib/Transforms/Scalar/
DJumpThreading.cpp209 << "' 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 …]
DSimplifyCFGPass.cpp66 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()
/external/swiftshader/third_party/llvm-7.0/llvm/unittests/Analysis/
DProfileSummaryInfoTest.cpp118 BasicBlock *BB1 = BB0.getTerminator()->getSuccessor(0); in TEST_F()
154 BasicBlock *BB1 = BB0.getTerminator()->getSuccessor(0); in TEST_F()
155 BasicBlock *BB2 = BB0.getTerminator()->getSuccessor(1); in TEST_F()
186 BasicBlock *BB1 = BB0.getTerminator()->getSuccessor(0); in TEST_F()
187 BasicBlock *BB2 = BB0.getTerminator()->getSuccessor(1); in TEST_F()

12345678910>>...16