Lines Matching defs:MBB

68     bool EliminatePHINodes(MachineFunction &MF, MachineBasicBlock &MBB);
69 void LowerPHINode(MachineBasicBlock &MBB,
81 bool SplitPHIEdges(MachineFunction &MF, MachineBasicBlock &MBB,
86 bool isLiveIn(unsigned Reg, MachineBasicBlock *MBB);
87 bool isLiveOutPastPHIs(unsigned Reg, MachineBasicBlock *MBB);
183 MachineBasicBlock &MBB) {
184 if (MBB.empty() || !MBB.front().isPHI())
190 std::prev(MBB.SkipPHIsAndLabels(MBB.begin()));
192 while (MBB.front().isPHI())
193 LowerPHINode(MBB, LastPHIIt);
221 void PHIElimination::LowerPHINode(MachineBasicBlock &MBB,
228 MachineInstr *MPhi = MBB.remove(MBB.begin());
236 MachineFunction &MF = *MBB.getParent();
247 BuildMI(MBB, AfterPHIsIt, MPhi->getDebugLoc(),
263 BuildMI(MBB, AfterPHIsIt, MPhi->getDebugLoc(),
282 if (MachineInstr *OldKill = VI.findKill(&MBB)) {
285 DEBUG(MBB.dump());
312 SlotIndex MBBStartIndex = LIS->getMBBStartIdx(&MBB);
314 // Add the region from the beginning of MBB to the copy instruction to
330 // A dead PHI's live range begins and ends at the start of the MBB, but
340 // Otherwise, remove the region from the beginning of MBB to the copy
378 findPHICopyInsertPoint(&opBlock, &MBB, SrcReg);
535 for (const auto &MBB : MF)
536 for (const auto &BBI : MBB) {
546 MachineBasicBlock &MBB,
548 if (MBB.empty() || !MBB.front().isPHI() || MBB.isLandingPad())
551 const MachineLoop *CurLoop = MLI ? MLI->getLoopFor(&MBB) : nullptr;
552 bool IsLoopHeader = CurLoop && &MBB == CurLoop->getHeader();
555 for (MachineBasicBlock::iterator BBI = MBB.begin(), BBE = MBB.end();
560 // Is there a critical edge from PreMBB to MBB?
566 if (PreMBB == &MBB && !SplitAllCriticalEdges)
582 << PreMBB->getNumber() << " -> BB#" << MBB.getNumber()
585 // If Reg is not live-in to MBB, it means it must be live-in to some
589 // If Reg *is* live-in to MBB, the interference is inevitable and a copy
593 bool ShouldSplit = !isLiveIn(Reg, &MBB) || SplitAllCriticalEdges;
610 if (!PreMBB->SplitCriticalEdge(&MBB, this)) {
621 bool PHIElimination::isLiveIn(unsigned Reg, MachineBasicBlock *MBB) {
625 return LIS->isLiveInToMBB(LIS->getInterval(Reg), MBB);
627 return LV->isLiveIn(Reg, *MBB);
630 bool PHIElimination::isLiveOutPastPHIs(unsigned Reg, MachineBasicBlock *MBB) {
640 for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin(),
641 SE = MBB->succ_end(); SI != SE; ++SI) {
647 return LV->isLiveOut(Reg, *MBB);