Lines Matching defs:BB
50 int64_t getNumBlocksFromCond(const BasicBlock &BB) {
52 if (const auto *BI = dyn_cast<BranchInst>(BB.getTerminator())) {
55 } else if (const auto *SI = dyn_cast<SwitchInst>(BB.getTerminator())) {
66 void FunctionPropertiesInfo::reIncludeBB(const BasicBlock &BB) {
67 updateForBB(BB, +1);
70 void FunctionPropertiesInfo::updateForBB(const BasicBlock &BB,
75 (Direction * getNumBlocksFromCond(BB));
76 for (const auto &I : BB) {
88 TotalInstructionCount += Direction * BB.sizeWithoutDebug();
91 unsigned SuccessorCount = succ_size(&BB);
99 unsigned PredecessorCount = pred_size(&BB);
118 for (const auto *Successor : successors(&BB)) {
126 if (const auto *BI = dyn_cast<BranchInst>(BB.getTerminator())) {
131 for (const Instruction &I : BB.instructionsWithoutDebug()) {
230 for (const auto &BB : F)
231 if (DT.isReachableFromEntry(&BB))
232 FPI.reIncludeBB(BB);
317 // The CB BB will change - it'll either be split or the callee's body (single
318 // BB) will be pasted in.
321 // The caller's entry BB may change due to new alloca instructions.
326 // with the CB BB ('Entry') between which the inlined callee will be pasted.
346 // need to invalidate and then re-account BB data is the successors of the
361 // Exclude the CallSiteBB, if it happens to be its own successor (1-BB loop).
362 // We are only interested in BBs the graph moves past the callsite BB to
364 // the callsite BB in this case would prematurely stop the traversal in
368 for (const auto *BB : Successors)
369 LikelyToChangeBBs.insert(BB);
372 // role - e.g. caller's entry BB may be the same as the callsite BB - set
375 for (const auto *BB : LikelyToChangeBBs)
376 FPI.updateForBB(*BB, -1);
454 const auto *BB = Reinclude[I];
455 FPI.reIncludeBB(*BB);
457 Reinclude.insert(succ_begin(BB), succ_end(BB));