Lines Matching refs:BB

104   BasicBlock *BB = nullptr;
106 /// Cache of BB->getTerminator().
126 bool isLive(BasicBlock *BB) { return BlockInfo[BB].Live; }
164 void markLive(BlockInfoType &BB);
165 void markLive(BasicBlock *BB) { markLive(BlockInfo[BB]); }
192 void makeUnconditional(BasicBlock *BB, BasicBlock *Target);
225 for (auto &BB : F) {
226 NumInsts += BB.size();
227 auto &Info = BlockInfo[&BB];
228 Info.BB = &BB;
229 Info.Terminator = BB.getTerminator();
236 for (Instruction &I : *BBInfo.second.BB)
261 std::pair<StatusMap::iterator, bool> insert(BasicBlock *BB) {
262 return StatusMap::insert(std::make_pair(BB, true));
266 void completed(BasicBlock *BB) { (*this)[BB] = false; }
268 // Return true if \p BB is currently on the active stack
270 bool onStack(BasicBlock *BB) {
271 auto Iter = find(BB);
280 for (auto *BB: depth_first_ext(&F.getEntryBlock(), State)) {
281 Instruction *Term = BB->getTerminator();
285 for (auto *Succ : successors(BB))
299 auto *BB = PDTChild->getBlock();
300 auto &Info = BlockInfo[BB];
303 LLVM_DEBUG(dbgs() << "post-dom root child is a return: " << BB->getName()
314 auto *BB = &F.getEntryBlock();
315 auto &EntryInfo = BlockInfo[BB];
323 BlocksWithDeadTerminators.insert(BBInfo.second.BB);
394 BlocksWithDeadTerminators.remove(BBInfo.BB);
398 for (auto *BB : successors(I->getParent()))
399 markLive(BB);
407 LLVM_DEBUG(dbgs() << "mark block live: " << BBInfo.BB->getName() << '\n');
411 NewLiveBlocks.insert(BBInfo.BB);
455 for (auto *PredBB : predecessors(Info.BB)) {
470 for (auto *BB : NewLiveBlocks)
471 dbgs() << "\t" << BB->getName() << '\n';
473 for (auto *BB : BlocksWithDeadTerminators)
474 dbgs() << "\t" << BB->getName() << '\n';
495 for (auto *BB : IDFBlocks) {
496 LLVM_DEBUG(dbgs() << "live control in: " << BB->getName() << '\n');
497 markLive(BB->getTerminator());
566 for (auto *BB : BlocksWithDeadTerminators)
567 dbgs() << '\t' << BB->getName()
568 << (BlockInfo[BB].Live ? " LIVE\n" : "\n");
574 for (auto *BB : BlocksWithDeadTerminators) {
575 auto &Info = BlockInfo[BB];
590 for (auto *Succ : successors(BB)) {
601 for (auto *Succ : successors(BB)) {
602 if (!First || Succ != PreferredSucc->BB) {
603 Succ->removePredecessor(BB);
608 makeUnconditional(BB, PreferredSucc->BB);
615 if (Succ != PreferredSucc->BB) {
617 << BB->getName() << " -> " << Succ->getName()
619 DeletedEdges.push_back({DominatorTree::Delete, BB, Succ});
641 for (auto &BB : F) {
642 if (succ_begin(&BB) != succ_end(&BB))
644 for (BasicBlock *Block : inverse_post_order_ext(&BB,Visited))
649 void AggressiveDeadCodeElimination::makeUnconditional(BasicBlock *BB,
651 Instruction *PredTerm = BB->getTerminator();
662 LLVM_DEBUG(dbgs() << "making unconditional " << BB->getName() << '\n');