Lines Matching refs:CurMBB
377 void BranchFolder::MaintainLiveIns(MachineBasicBlock *CurMBB,
380 RS->enterBasicBlock(CurMBB);
381 if (!CurMBB->empty())
382 RS->forward(prior(CurMBB->end()));
395 MachineBasicBlock *CurMBB = OldInst->getParent();
400 MaintainLiveIns(CurMBB, NewDest);
408 MachineBasicBlock *BranchFolder::SplitMBBAt(MachineBasicBlock &CurMBB,
410 if (!TII->isLegalToSplitMBBAt(CurMBB, BBI1))
413 MachineFunction &MF = *CurMBB.getParent();
416 MachineFunction::iterator MBBI = &CurMBB;
417 MachineBasicBlock *NewMBB =MF.CreateMachineBasicBlock(CurMBB.getBasicBlock());
418 CurMBB.getParent()->insert(++MBBI, NewMBB);
421 NewMBB->transferSuccessors(&CurMBB);
423 // Add an edge from CurMBB to NewMBB for the fall-through.
424 CurMBB.addSuccessor(NewMBB);
427 NewMBB->splice(NewMBB->end(), &CurMBB, BBI1, CurMBB.end());
430 MaintainLiveIns(&CurMBB, NewMBB);
453 // CurMBB needs to add an unconditional branch to SuccMBB (we removed these
454 // branches temporarily for tail merging). In the case where CurMBB ends
457 static void FixTail(MachineBasicBlock *CurMBB, MachineBasicBlock *SuccBB,
459 MachineFunction *MF = CurMBB->getParent();
460 MachineFunction::iterator I = llvm::next(MachineFunction::iterator(CurMBB));
465 !TII->AnalyzeBranch(*CurMBB, TBB, FBB, Cond, true)) {
469 TII->RemoveBranch(*CurMBB);
470 TII->InsertBranch(*CurMBB, SuccBB, NULL, Cond, dl);
475 TII->InsertBranch(*CurMBB, SuccBB, NULL,
636 MachineBasicBlock *CurMBB = CurMPIter->getBlock();
637 if (SuccBB && CurMBB != PredBB)
638 FixTail(CurMBB, SuccBB, TII);