Lines Matching refs:BB
72 BasicBlock *BB = I->getParent();
73 // Loop over all of the successors, removing BB's entry from any PHI
75 for (succ_iterator SI = succ_begin(BB), SE = succ_end(BB); SI != SE; ++SI)
76 (*SI)->removePredecessor(BB);
82 Intrinsic::getDeclaration(BB->getParent()->getParent(), Intrinsic::trap);
89 BasicBlock::iterator BBI = I, BBE = BB->end();
93 BB->getInstList().erase(BBI++);
115 static bool markAliveBlocks(BasicBlock *BB,
119 Worklist.push_back(BB);
120 Reachable.insert(BB);
123 BB = Worklist.pop_back_val();
128 for (BasicBlock::iterator BBI = BB->begin(), E = BB->end(); BBI != E;++BBI){
164 if (InvokeInst *II = dyn_cast<InvokeInst>(BB->getTerminator())) {
181 Changed |= ConstantFoldTerminator(BB, true);
182 for (succ_iterator SI = succ_begin(BB), SE = succ_end(BB); SI != SE; ++SI)
205 for (Function::iterator BB = ++F.begin(), E = F.end(); BB != E; ++BB) {
206 if (Reachable.count(BB))
209 for (succ_iterator SI = succ_begin(BB), SE = succ_end(BB); SI != SE; ++SI)
211 (*SI)->removePredecessor(BB);
212 BB->dropAllReferences();
233 BasicBlock &BB = *BBI++;
236 ReturnInst *Ret = dyn_cast<ReturnInst>(BB.getTerminator());
241 if (Ret != &BB.front()) {
246 while (isa<DbgInfoIntrinsic>(I) && I != BB.begin())
249 (!isa<PHINode>(I) || I != BB.begin() ||
257 RetBlock = &BB;
270 BB.replaceAllUsesWith(RetBlock);
271 BB.eraseFromParent();
289 // Turn BB into a block that just unconditionally branches to the return
292 RetBlockPHI->addIncoming(Ret->getOperand(0), &BB);
293 BB.getTerminator()->eraseFromParent();
294 BranchInst::Create(RetBlock, &BB);