Lines Matching refs:CurMBB
392 void BranchFolder::MaintainLiveIns(MachineBasicBlock *CurMBB,
395 RS->enterBasicBlock(CurMBB);
396 if (!CurMBB->empty())
397 RS->forward(std::prev(CurMBB->end()));
408 MachineBasicBlock *CurMBB = OldInst->getParent();
413 MaintainLiveIns(CurMBB, NewDest);
421 MachineBasicBlock *BranchFolder::SplitMBBAt(MachineBasicBlock &CurMBB,
424 if (!TII->isLegalToSplitMBBAt(CurMBB, BBI1))
427 MachineFunction &MF = *CurMBB.getParent();
430 MachineFunction::iterator MBBI = &CurMBB;
432 CurMBB.getParent()->insert(++MBBI, NewMBB);
435 NewMBB->transferSuccessors(&CurMBB);
437 // Add an edge from CurMBB to NewMBB for the fall-through.
438 CurMBB.addSuccessor(NewMBB);
441 NewMBB->splice(NewMBB->end(), &CurMBB, BBI1, CurMBB.end());
443 // NewMBB inherits CurMBB's block frequency.
444 MBBFreqInfo.setBlockFreq(NewMBB, MBBFreqInfo.getBlockFreq(&CurMBB));
447 MaintainLiveIns(&CurMBB, NewMBB);
470 // CurMBB needs to add an unconditional branch to SuccMBB (we removed these
471 // branches temporarily for tail merging). In the case where CurMBB ends
474 static void FixTail(MachineBasicBlock *CurMBB, MachineBasicBlock *SuccBB,
476 MachineFunction *MF = CurMBB->getParent();
477 MachineFunction::iterator I = std::next(MachineFunction::iterator(CurMBB));
482 !TII->AnalyzeBranch(*CurMBB, TBB, FBB, Cond, true)) {
486 TII->RemoveBranch(*CurMBB);
487 TII->InsertBranch(*CurMBB, SuccBB, nullptr, Cond, dl);
492 TII->InsertBranch(*CurMBB, SuccBB, nullptr,
666 MachineBasicBlock *CurMBB = CurMPIter->getBlock();
667 if (SuccBB && CurMBB != PredBB)
668 FixTail(CurMBB, SuccBB, TII);