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,
411 if (!TII->isLegalToSplitMBBAt(CurMBB, BBI1))
414 MachineFunction &MF = *CurMBB.getParent();
417 MachineFunction::iterator MBBI = &CurMBB;
419 CurMBB.getParent()->insert(++MBBI, NewMBB);
422 NewMBB->transferSuccessors(&CurMBB);
424 // Add an edge from CurMBB to NewMBB for the fall-through.
425 CurMBB.addSuccessor(NewMBB);
428 NewMBB->splice(NewMBB->end(), &CurMBB, BBI1, CurMBB.end());
431 MaintainLiveIns(&CurMBB, NewMBB);
454 // CurMBB needs to add an unconditional branch to SuccMBB (we removed these
455 // branches temporarily for tail merging). In the case where CurMBB ends
458 static void FixTail(MachineBasicBlock *CurMBB, MachineBasicBlock *SuccBB,
460 MachineFunction *MF = CurMBB->getParent();
461 MachineFunction::iterator I = llvm::next(MachineFunction::iterator(CurMBB));
466 !TII->AnalyzeBranch(*CurMBB, TBB, FBB, Cond, true)) {
470 TII->RemoveBranch(*CurMBB);
471 TII->InsertBranch(*CurMBB, SuccBB, NULL, Cond, dl);
476 TII->InsertBranch(*CurMBB, SuccBB, NULL,
637 MachineBasicBlock *CurMBB = CurMPIter->getBlock();
638 if (SuccBB && CurMBB != PredBB)
639 FixTail(CurMBB, SuccBB, TII);