Lines Matching refs:BasicBlock
34 void llvm::DeleteDeadBlock(BasicBlock *BB) { in DeleteDeadBlock()
42 for (BasicBlock *Succ : BBTerm->successors()) in DeleteDeadBlock()
62 void llvm::FoldSingleEntryPHINodes(BasicBlock *BB, in FoldSingleEntryPHINodes()
79 bool llvm::DeleteDeadPHIs(BasicBlock *BB, const TargetLibraryInfo *TLI) { in DeleteDeadPHIs()
83 for (BasicBlock::iterator I = BB->begin(); in DeleteDeadPHIs()
95 bool llvm::MergeBlockIntoPredecessor(BasicBlock *BB, DominatorTree *DT, in MergeBlockIntoPredecessor()
102 BasicBlock *PredBB = BB->getUniquePredecessor(); in MergeBlockIntoPredecessor()
112 BasicBlock *OnlySucc = BB; in MergeBlockIntoPredecessor()
123 for (BasicBlock::iterator BI = BB->begin(), BE = BB->end(); BI != BE; ++BI) { in MergeBlockIntoPredecessor()
171 void llvm::ReplaceInstWithValue(BasicBlock::InstListType &BIL, in ReplaceInstWithValue()
172 BasicBlock::iterator &BI, Value *V) { in ReplaceInstWithValue()
185 void llvm::ReplaceInstWithInst(BasicBlock::InstListType &BIL, in ReplaceInstWithInst()
186 BasicBlock::iterator &BI, Instruction *I) { in ReplaceInstWithInst()
196 BasicBlock::iterator New = BIL.insert(BI, I); in ReplaceInstWithInst()
206 BasicBlock::iterator BI(From); in ReplaceInstWithInst()
210 BasicBlock *llvm::SplitEdge(BasicBlock *BB, BasicBlock *Succ, DominatorTree *DT, in SplitEdge()
222 if (BasicBlock *SP = Succ->getSinglePredecessor()) { in SplitEdge()
241 for (BasicBlock &BB : F) { in SplitAllCriticalEdges()
251 BasicBlock *llvm::SplitBlock(BasicBlock *Old, Instruction *SplitPt, in SplitBlock()
253 BasicBlock::iterator SplitIt = SplitPt->getIterator(); in SplitBlock()
256 BasicBlock *New = Old->splitBasicBlock(SplitIt, Old->getName()+".split"); in SplitBlock()
278 static void UpdateAnalysisInformation(BasicBlock *OldBB, BasicBlock *NewBB, in UpdateAnalysisInformation()
279 ArrayRef<BasicBlock *> Preds, in UpdateAnalysisInformation()
296 for (BasicBlock *Pred : Preds) { in UpdateAnalysisInformation()
324 for (BasicBlock *Pred : Preds) { in UpdateAnalysisInformation()
350 static void UpdatePHINodes(BasicBlock *OrigBB, BasicBlock *NewBB, in UpdatePHINodes()
351 ArrayRef<BasicBlock *> Preds, BranchInst *BI, in UpdatePHINodes()
354 SmallPtrSet<BasicBlock *, 16> PredSet(Preds.begin(), Preds.end()); in UpdatePHINodes()
355 for (BasicBlock::iterator I = OrigBB->begin(); isa<PHINode>(I); ) { in UpdatePHINodes()
405 BasicBlock *IncomingBB = PN->getIncomingBlock(i); in UpdatePHINodes()
416 BasicBlock *llvm::SplitBlockPredecessors(BasicBlock *BB, in SplitBlockPredecessors()
417 ArrayRef<BasicBlock *> Preds, in SplitBlockPredecessors()
427 SmallVector<BasicBlock*, 2> NewBBs; in SplitBlockPredecessors()
436 BasicBlock *NewBB = BasicBlock::Create( in SplitBlockPredecessors()
459 for (BasicBlock::iterator I = BB->begin(); isa<PHINode>(I); ++I) in SplitBlockPredecessors()
474 void llvm::SplitLandingPadPredecessors(BasicBlock *OrigBB, in SplitLandingPadPredecessors()
475 ArrayRef<BasicBlock *> Preds, in SplitLandingPadPredecessors()
477 SmallVectorImpl<BasicBlock *> &NewBBs, in SplitLandingPadPredecessors()
484 BasicBlock *NewBB1 = BasicBlock::Create(OrigBB->getContext(), in SplitLandingPadPredecessors()
511 SmallVector<BasicBlock*, 8> NewBB2Preds; in SplitLandingPadPredecessors()
514 BasicBlock *Pred = *i++; in SplitLandingPadPredecessors()
522 BasicBlock *NewBB2 = nullptr; in SplitLandingPadPredecessors()
525 NewBB2 = BasicBlock::Create(OrigBB->getContext(), in SplitLandingPadPredecessors()
535 for (BasicBlock *NewBB2Pred : NewBB2Preds) in SplitLandingPadPredecessors()
577 ReturnInst *llvm::FoldReturnIntoUncondBranch(ReturnInst *RI, BasicBlock *BB, in FoldReturnIntoUncondBranch()
578 BasicBlock *Pred) { in FoldReturnIntoUncondBranch()
619 BasicBlock *Head = SplitBefore->getParent(); in SplitBlockAndInsertIfThen()
620 BasicBlock *Tail = Head->splitBasicBlock(SplitBefore->getIterator()); in SplitBlockAndInsertIfThen()
623 BasicBlock *ThenBlock = BasicBlock::Create(C, "", Head->getParent(), Tail); in SplitBlockAndInsertIfThen()
661 BasicBlock *Head = SplitBefore->getParent(); in SplitBlockAndInsertIfThenElse()
662 BasicBlock *Tail = Head->splitBasicBlock(SplitBefore->getIterator()); in SplitBlockAndInsertIfThenElse()
665 BasicBlock *ThenBlock = BasicBlock::Create(C, "", Head->getParent(), Tail); in SplitBlockAndInsertIfThenElse()
666 BasicBlock *ElseBlock = BasicBlock::Create(C, "", Head->getParent(), Tail); in SplitBlockAndInsertIfThenElse()
678 Value *llvm::GetIfCondition(BasicBlock *BB, BasicBlock *&IfTrue, in GetIfCondition()
679 BasicBlock *&IfFalse) { in GetIfCondition()
681 BasicBlock *Pred1 = nullptr; in GetIfCondition()
682 BasicBlock *Pred2 = nullptr; in GetIfCondition()
751 BasicBlock *CommonPred = Pred1->getSinglePredecessor(); in GetIfCondition()