Lines Matching defs:BB

63   void setVPBBPredsFromBB(VPBasicBlock *VPBB, BasicBlock *BB);
64 void setRegionPredsFromBB(VPRegionBlock *VPBB, BasicBlock *BB);
66 VPBasicBlock *getOrCreateVPBB(BasicBlock *BB);
71 void createVPInstructionsForVPBB(VPBasicBlock *VPBB, BasicBlock *BB);
82 // Set predecessors of \p VPBB in the same order as they are in \p BB. \p VPBB
84 void PlainCFGBuilder::setVPBBPredsFromBB(VPBasicBlock *VPBB, BasicBlock *BB) {
85 auto GetLatchOfExit = [this](BasicBlock *BB) -> BasicBlock * {
86 auto *SinglePred = BB->getSinglePredecessor();
87 Loop *LoopForBB = LI->getLoopFor(BB);
96 if (auto *LatchBB = GetLatchOfExit(BB)) {
106 for (BasicBlock *Pred : predecessors(BB))
111 static bool isHeaderBB(BasicBlock *BB, Loop *L) {
112 return L && BB == L->getHeader();
116 BasicBlock *BB) {
117 // BB is a loop header block. Connect the region to the loop preheader.
118 Loop *LoopOfBB = LI->getLoopFor(BB);
174 // already created. If no region exists yet for the loop containing \p BB, a new
176 VPBasicBlock *PlainCFGBuilder::getOrCreateVPBB(BasicBlock *BB) {
177 if (auto *VPBB = BB2VPBB.lookup(BB)) {
183 StringRef Name = isHeaderBB(BB, TheLoop) ? "vector.body" : BB->getName();
186 BB2VPBB[BB] = VPBB;
188 // Get or create a region for the loop containing BB.
189 Loop *LoopOfBB = LI->getLoopFor(BB);
194 if (!isHeaderBB(BB, LoopOfBB)) {
282 // VPInstruction in \p BB have been visited before (except for Phi nodes).
284 BasicBlock *BB) {
286 for (Instruction &InstRef : BB->instructionsWithoutDebug(false)) {
344 // wraps the original preheader BB) and Plan.getEntry() (which represents the
369 // each BB and link it to its successor and predecessor VPBBs. Note that
385 for (BasicBlock *BB : RPO) {
386 // Create or retrieve the VPBasicBlock for this BB and create its
388 VPBasicBlock *VPBB = getOrCreateVPBB(BB);
390 createVPInstructionsForVPBB(VPBB, BB);
391 Loop *LoopForBB = LI->getLoopFor(BB);
392 // Set VPBB predecessors in the same order as they are in the incoming BB.
393 if (!isHeaderBB(BB, LoopForBB)) {
394 setVPBBPredsFromBB(VPBB, BB);
396 // BB is a loop header, set the predecessor for the region, except for the
400 setRegionPredsFromBB(Region, BB);
406 auto *BI = cast<BranchInst>(BB->getTerminator());
407 unsigned NumSuccs = succ_size(BB);
409 auto *Successor = getOrCreateVPBB(BB->getSingleSuccessor());
423 if (!LoopForBB || BB != LoopForBB->getLoopLatch()) {