Lines Matching defs:BB

103   BasicBlock *BB = nullptr;
105 /// Cache of BB->getTerminator().
131 bool isLive(BasicBlock *BB) { return BlockInfo[BB].Live; }
169 void markLive(BlockInfoType &BB);
170 void markLive(BasicBlock *BB) { markLive(BlockInfo[BB]); }
197 void makeUnconditional(BasicBlock *BB, BasicBlock *Target);
230 for (auto &BB : F) {
231 NumInsts += BB.size();
232 auto &Info = BlockInfo[&BB];
233 Info.BB = &BB;
234 Info.Terminator = BB.getTerminator();
241 for (Instruction &I : *BBInfo.second.BB)
266 std::pair<StatusMap::iterator, bool> insert(BasicBlock *BB) {
267 return StatusMap::insert(std::make_pair(BB, true));
271 void completed(BasicBlock *BB) { (*this)[BB] = false; }
273 // Return true if \p BB is currently on the active stack
275 bool onStack(BasicBlock *BB) {
276 auto Iter = find(BB);
285 for (auto *BB: depth_first_ext(&F.getEntryBlock(), State)) {
286 Instruction *Term = BB->getTerminator();
290 for (auto *Succ : successors(BB))
304 auto *BB = PDTChild->getBlock();
305 auto &Info = BlockInfo[BB];
308 LLVM_DEBUG(dbgs() << "post-dom root child is a return: " << BB->getName()
319 auto *BB = &F.getEntryBlock();
320 auto &EntryInfo = BlockInfo[BB];
328 BlocksWithDeadTerminators.insert(BBInfo.second.BB);
399 BlocksWithDeadTerminators.remove(BBInfo.BB);
403 for (auto *BB : successors(I->getParent()))
404 markLive(BB);
412 LLVM_DEBUG(dbgs() << "mark block live: " << BBInfo.BB->getName() << '\n');
416 NewLiveBlocks.insert(BBInfo.BB);
460 for (auto *PredBB : predecessors(Info.BB)) {
475 for (auto *BB : NewLiveBlocks)
476 dbgs() << "\t" << BB->getName() << '\n';
478 for (auto *BB : BlocksWithDeadTerminators)
479 dbgs() << "\t" << BB->getName() << '\n';
500 for (auto *BB : IDFBlocks) {
501 LLVM_DEBUG(dbgs() << "live control in: " << BB->getName() << '\n');
502 markLive(BB->getTerminator());
604 for (auto *BB : BlocksWithDeadTerminators)
605 dbgs() << '\t' << BB->getName()
606 << (BlockInfo[BB].Live ? " LIVE\n" : "\n");
614 for (auto *BB : BlocksWithDeadTerminators) {
615 auto &Info = BlockInfo[BB];
630 for (auto *Succ : successors(BB)) {
641 for (auto *Succ : successors(BB)) {
642 if (!First || Succ != PreferredSucc->BB) {
643 Succ->removePredecessor(BB);
648 makeUnconditional(BB, PreferredSucc->BB);
654 if (Succ != PreferredSucc->BB) {
656 << BB->getName() << " -> " << Succ->getName()
658 DeletedEdges.push_back({DominatorTree::Delete, BB, Succ});
684 for (auto &BB : F) {
685 if (!succ_empty(&BB))
687 for (BasicBlock *Block : inverse_post_order_ext(&BB,Visited))
692 void AggressiveDeadCodeElimination::makeUnconditional(BasicBlock *BB,
694 Instruction *PredTerm = BB->getTerminator();
705 LLVM_DEBUG(dbgs() << "making unconditional " << BB->getName() << '\n');